in Education by
I have a dilemma, I'm using Java and Oracle and trying to keep queries on PL/SQL side. Everything is OK, until I have these complex queries which may and may not have conditions. It's not hard in Java to put together WHERE clause with conditions, but it's not nice. And on PL/SQL side I also found out that the only possibility for dynamic queries is string manipulations like IF inputname IS NOT NULL THEN query := query ||' and NAME=' || inputname; END IF; Now I'm thinking, I'm leaving query in PL/SQL and sending WHERE clause with function parameter. Any good recommendations or examples please? JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
SQLBuilder might be useful to you from the Java side. It allows you to write compile-time checked Java code that dynamically builds sql: String selectQuery = (new SelectQuery()) .addColumns(t1Col1, t1Col2, t2Col1) .addJoin(SelectQuery.JoinType.INNER_JOIN, joinOfT1AndT2) .addOrderings(t1Col1) .validate().toString();

Related questions

0 votes
    I have a dilemma, I'm using Java and Oracle and trying to keep queries on PL/SQL side. Everything ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 21, 2022 in Education by JackTerrance
0 votes
    What is meant by a memory leak in Java, and how to implement it. Select the correct answer from above options...
asked Jan 21, 2022 in Education by JackTerrance
0 votes
    Which of these is used to perform all input & output operations in Java? (a) streams (b) Variables (c) classes ... O & Applets of Java Select the correct answer from above options...
asked Feb 24, 2022 in Education by JackTerrance
0 votes
    Which of these class object can be used to form a dynamic array? (a) ArrayList (b) Map (c) Vector ... Collections Framework of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    How is the dynamic interception of requests and responses to transform the information done? (a) servlet container ... Servlet of Java Select the correct answer from above options...
asked Feb 22, 2022 in Education by JackTerrance
0 votes
    Which of these class is used for creating a client for a server-client operations? (a) serverClientjava (b) ... Framework of Java Select the correct answer from above options...
asked Mar 1, 2022 in Education by JackTerrance
0 votes
    I am trying to make a a query against a table and am kind of stuck in constructing the WHERE ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked May 1, 2022 in Education by JackTerrance
0 votes
    I tried to create following function: CREATE OR REPLACE function CATEGORYTEST(n in number) return VARCHAR(200 ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 18, 2022 in Education by JackTerrance
0 votes
    I have function that receives department name and an aggregation operation (average, maximum, minimum) and applies ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 17, 2022 in Education by JackTerrance
0 votes
    I tried to create following function: CREATE OR REPLACE function CATEGORYTEST(n in number) return VARCHAR(200 ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 17, 2022 in Education by JackTerrance
0 votes
    I tried to create following function: CREATE OR REPLACE function CATEGORYTEST(n in number) return VARCHAR(200 ... for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 16, 2022 in Education by JackTerrance
0 votes
    If no header is specified, the block is said to be an _______________ PL/SQL block. (a) Strong (b ... Answers, Database Interview Questions and Answers for Freshers and Experience...
asked Oct 11, 2021 in Education by JackTerrance
0 votes
    We use ______________ name PL/SQL program objects and units. (a) Lexical Units (b) Literals (c) ... Answers, Database Interview Questions and Answers for Freshers and Experience...
asked Oct 11, 2021 in Education by JackTerrance
0 votes
    A line of PL/SQL text contains groups of characters known as (a) Lexical Units (b) Literals (c ... Query Optimization in portion Query Processing Techniques of Database Management...
asked Oct 10, 2021 in Education by JackTerrance
0 votes
    _______________ has made PL/SQL code run faster without requiring any additional work on the part of the ... topic in chapter Query Processing Techniques of Database Management...
asked Oct 10, 2021 in Education by JackTerrance
...