Customize the operator for the SQL command
With JDeveloper 12.1.3, I created a search form "Panel with ADF Query Table". After having specified the search parameters, the SQL that is subject to the MSSQL root command generates the following error message:
< oracle.adf.controller > < Utils > < buildFacesMessage > < ADF: addition of the following JSF error: incorrect syntax [FMWGEN] [SQLServer JDBC Driver] [SQL Server] close to ' |'. >
java.sql.SQLException: incorrect syntax [FMWGEN] [SQLServer JDBC Driver] [SQL Server] close to ' |'.
Here is the part of SQL code that is the question:
WHERE (((city AS (?) || '%')) AND (State AS (?) || '%') ) ) ) )
Since MSSQL does not accept the "|" as an operator is valid, an error message is generated. MSSQL expects the CONCAT function or operator ' + '. Is it possible and easy to configure JDeveloper for change the operator of ' | ' to the CONCAT function?
OK, your settings are looking as it should.
You have two options to work around the problem.
(1) use your own sql generator, as shown here http://www.jobinesh.com/2013/02/customizing-sql-builder-class.html
(2) modify the sql code generated for the START WITH operator generate the right sql for sql server code. For this, you can override the method getViewCriteriaItem() as shown here https://tompeez.wordpress.com/2011/08/21/extending-viewcriteria-to-use-sql-contains-4/
Timo
Tags: Java
Similar Questions
-
creation of database using the SQL command * more
Hello
This isn't a matter of urgency.
I learn the Oracle DBA. I have installed Oracle 9.2 in my windows system. And I'm trying to create a database using the SQL command.
OracleVersion: 9.2
Windows XP operating system
I get the error like below when executing the CREATE DATABASE command.CREATE DATABASE suri USER SYS identified by manager USER system identified by surendra LOGFILE GROUP 1 ('F:\Oracle\oradata\suri\redo01.log') SIZE 100M, GROUP 2 ('F:\Oracle\oradata\suri\redo02.log') SIZE 100M, GROUP 3 ('F:\Oracle\oradata\suri\redo03.log') SIZE 100M MAXLOGFILES 5 MAXLOGMEMBERS 5 MAXLOGHISTORY 1 MAXDATAFILES 100 MAXINSTANCES 1 CHARACTER SET US7ASCII NATIONAL CHARACTER SET AL16UTF16 DATAFILE 'F:\Oracle\oradata\suri\system01.dbf' size 200M EXTENT MANAGEMENT LOCAL UNDO tablespace undots datafile 'F:\Oracle\oradata\suri\undots01.dbf' size 200M DEFAULT TEMPORARY TABLESPACE tempts1 DATAFILE 'F:\Oracle\oradata\suri\temp01.dbf' SIZE 100M EXTENT MANAGEMENT LOCAL
I have validated the syntax but not able to find where is the error.ERROR at line 16: ORA-25139: invalid option for CREATE TEMPORARY TABLESPACE
Please let me know if you need more details.
Thanks in advance for your help.
Kind regards
SuriOracleVersion: 9.2
Why a so old version (and desupported)? In any case...
TEMPORARY TABLESPACE tempts1 DATAFILE 'F:\Oracle\oradata\suri\temp01.dbf' SIZE 100 M EXTENT MANAGEMENT LOCAL default
.. try change DATAFILE with TEMPFILE.
-
Maximum length of the SQL command
I created a MySQL database and a LabView 8.6 application that inserts data into the database using the SQL Toolbox. I have a problem very long character data insertion in a LONGTEXT field. I determined that the problem occurs when the SQL command is more than 1 048 574 characters or the length of a particular field exceeds 1 048 326 characters (cannot say who).
The error I get is "error-2147467259 occurred at NI_Database_API.lvlib:Conn Execute.vi. "Exception occurred in the Microsoft OLE DB provider for ODBC drivers: [MySQL] [ODBC 5.1 Driver] [mysqld - 5.1.35 - community] MySQL version disappeared in NI_Database_API.lvlib:Conn Execute.vi.
According to the MYSQL documentation, a LONGTEXT can 4294967295 characters, so length shouldn't be a problem. The documentation also indicates "the effective maximum length of LONGTEXT columns also depends on the maximum packet size that is configured in the client/server protocol and available memory", but I don't know how to configure the packet size in LabView.
I enclose the code example that reproduces the problem, although it is based on a special run table structure effectively. The table definition is included on the diagram.
This setting must be configured outside of LabVIEW (UDL or DSN).
You must configure the server and the client:
I found this link while searching on stackoverflow
http://dev.MySQL.com/doc/refman/5.1/en/packet-too-large.html
You may need to select/Configure a specific vendor (different) in order to set this variable.
-
How to monitor the sql commands?
Hello
Are there opportunities to control all the SQL commands (ddl, dml) run from all the tools of database (sqlplus, sqldeveloper, Toad, etc.)? Precisious more... Is there something like .bash_history in Linux operating system?
Best.Hello
Reference: http://www.juliandyke.com/Diagnostics/Trace/EnablingTrace.html
http://download.Oracle.com/docs/CD/B19306_01/server.102/b14211/SQLTrace.htm#PFGRF01010It's an additional reference.
http://download.Oracle.com/docs/CD/B10501_01/EM.920/a88748/otdv.htm-Pavan Kumar N
-
Access to SQL previously saved in the SQL command window
Hi all
If I kept some codes SQL in the SQL command window, should we not available to other developers when they click on the saved SQL tab? I saved an example query and one of my other developers can't see it. I don't see any setting available on the developer account that controls whether or not the account can see others saved SQL.
If this is not allowed, then I see really the point of the drop in the saved SQL owner tab.
Any advice?
Thank you!!
JohnMy apologies - I've never used this tab so I was not aware of it.
I played a little and it seems that if you are an administrator of the workspace, but your other user is just a developer, then in fact he or she cannot see your SQL. If you were to switch to the workspace administrators, they should be able to see.
-
Hi I need help with my sql commands please.
1. build a query to list the name of the Department with pay the lowest.
2.construct a query to list the personnel number of the Manager (without duplicates) for managers who make more than twice the average salary of their employees
(Note that not all managers have a function of MANAGER).
I just need some advice please
Published by: 888669 on October 28, 2011 10:36888669 wrote:
I had the min() function before and I got a message error "function group is nested too deeply.Select dname, sum (sal) of the Department of inner join emp = dept.deptno emp.deptno group of dname with min (sum (sal));
Try:
select ... from .... group by deptno having sum(sal) <= ALL (SELECT sum(sal) from emp group by deptno)
-
ORA-00911 during addition of comment in the SQL command.
I work within the ORACLE Database Express Edition page "SQL Command".
The following query works fine for me:
SELECT *.
CUSTOMERS
As soon as I add comments, I get an error ORA-00911:
-It is a comment.
--
SELECT *.
CUSTOMERS
ORA-00911: invalid characterHello
Apex SQL worksheet don't like comments. What is reason you like add comments when you run the query?
You can trySELECT * /*This is a comment.*/ FROM CUSTOMERS
Kind regards
Jari -
ORA-00900 - the SQL commands: invalid SQL statement
Hello world
I installed Oracle Xe on a Centos 5.5 host yesteday.
Installation was Ok, I can connect to the web interface on "http://127.0.0.1:8080 / apex / '.
But when I want to use sql commands, regardless of the input control, I have the "ORA-00900: invalid SQL statement" message.
I can enter the command "Show all", for example, in a terminal after SQL > command prompt, it works... but not in the web interface...
I tried to import the .sql, script trought the web interface, no much result, no display in the window.
Can someone help me,
Thank youShow all is NOT a SQL command is a command that I think, not a command from pl/sql, sql more... Why not try to do a select on a table is know YOU the schema...
Thank you
Tony Miller
Webster, TX -
How to write the sql command in the batch file
Jin
I m using oracle 9i on windows. I want to know how I can write the sql on the command file command. I want to use a batch file to use the sql like shutdowm command & start command and any select command too.
so please tell how can I do?
thxsTried looking for what he superdba.
Can't connect to sqlplus using sys using a batch file
HTH
Aman... -
Cannot execute the sql command line
Please someone help me trobleshooting the following error.
SQL * MORE: Relese 11.2.0.2.0 production on 19 July 2013 Fri 12-34-23
Copyright (c) 1982,2010,oracle.all rights reserved.
Enter the user name: System
Enter the password: "when I tried to enter the master password is not accept, then if I press on enter, I get the following error,
Error:
ORA - 01017:invalid username or password; connection refused
Enter the user name: System
Instead of trying to system
Enter the user name: / as sysdba
If your OS username is a member of the OSDBA Group (normally dba on ORA_DBA on Windows, Linux/Unix), you should be able to connect. When you do that, you can do what you want (you are the user SYS), for example to change password:
SQL > alter the system of the user identified by
; -
suppress the output of the sql command
Hello
is it possible that I can delete the output of a command sql in a pl/sql script? I want to only display the output of dbms_output in my file queued. I tried power off and power of the echo set termout, but I'm still getting messages like: modified etc. trigger that I would like to delete.
Thank you.LEAVE YOUR COMMENTS.
-
Using WHERE command in the SQL property loader
Hi all
I hope that it will be a pretty simple question.
I'm trying to use the Loader to read within the confines of a SQL database test. There are many types of models that need to be tested, each containing a set of specific limits. I want to be able to retrieve the appropriate limits for the model of the product under test.
To do this, I have the model number of product available in a FileGlobal. The database contains a table containing information about limit test with an ID column "ModelNumber_Number."
I wrote the following SQL query to get there:
"SELECT * FROM TESTLIMITS WHERE ModelNumber_Number = + FileGlobals.ModelNumber.
However, it is where I am confused. I'm not sure the syntax to access a variable in the SQL command. I have the following error:
The multipart identifier "FileGlobals.ModelNumber" could not be bound.
Can someone please advise on how to do this?
Thank you very much
Cam.
Hello, I was able to resolve the problem by converting to a string.
"SELECT * FROM TESTLIMITS WHERE ModelNumber_Number ="+ str (FileGlobals.ModelNumber).
At soon Cam.
-
Use the lines of a text file as input to an SQL command
Hello
I have a text file containing the lines...
123
1234
I would like to use as input for a SQL command running in a script. ie
Update flag set < table > = 'Y' where job = < the text file lines >;
Any help much appreciated.
See you soon
External table will do.
For reference...
CREATE TABLE Hold'em (SEQ_NUM NUMBER (10));
insertion in hold select SEQ_NUM in task where proc like '% PROC;
update set hold_flag = task ' ' where in SEQ_NUM (select hold SEQ_NUM);
-
ETG assess "in order to" in the APEX SQL command window?
I need to recreate my table in order to change the order of the columns. When I use the SQL command window and run the SQL, it runs successfully, creates the table, but is not rearrange the columns.
This is expected behavior?
user648567 wrote:
Please update your forum profile with a real handle instead of 'user648567 '.
I need to recreate my table in order to change the order of the columns. When I use the SQL command window and run the SQL, it runs successfully, creates the table, but is not rearrange the columns.
What do you mean by "in order to"?
A clause using "ORDER BY" in a DEC (in SUMMIT or other anywhare) has no effect on the order of the columns , which is determined by the order in which the columns appear in the projection. It will affect the order in which the rows are returned from this query, and it will not determine the order in which lines will be returned by querying the new table in the future.
To change the order of columns, the columns in the SELECT of the ETG clause must be in a different order than the original table,
-
execute sql commands in the browser
I use Oracle 10 g standard edition in the windows platform.
I am getting SQL prompt, but I want to run the SQL commands in the browser. But I'm not.
Please help me!You must start the iSQL * Plus service. Check starting the iSQL * Plus Application Server.
Maybe you are looking for
-
New bug? Horizontal white background interrupts the background image tiles after 1 to 2 pages
My site was going on well on Firefox (and all the other major browsers), until recently. Now Firefox interrupts the white tile background image, bottom horizontal bar across the width of the page and about an inch long. What's up with that? This BUG
-
Apple Support communities - no email no answers / more
Hello! I find so much valuable information here. I double checked my subscriptions and on notifications by e-mail and made sure all the groups and people I follow are there. But since yesterday the mails fail. Clearly, I did something - my settings a
-
This is my old dads computer and he died so I did not kno no password and I want to factory reset the computer and make it like new
-
Gradient and flickering U2312HM red lines problems
Then I found this post here and now have exactly the same question. I made the diagnosis, as written in the post linked above and here is the result: The images are too big for here so this link should suffice: http://imgur.com/a/UfBfc#0 Next step fo
-
I had some problems malware for about two months, despite the help of hw and microsoft... finallyon this forum today, I think that I got rid of the Trojan/powessere. However, when this issue developed my cc cleaner analyserions only 25% I finally do