April 17, 2006, 04:13 PM
SaraOracle SQL causing error in WebFocus but not SQL Nav
I receive the following error when executing a procedure that utilizes the SQL Wizard.
(FOC1400) SQLCODE IS 24373 (HEX: 00005F35)
: ORA-24373: invalid length specified for statement
L (FOC1405) SQL PREPARE ERROR.
0 ERROR AT OR NEAR LINE 290 IN PROCEDURE fdas5owvFOCEXEC *
(FOC205) THE DESCRIPTION CANNOT BE FOUND FOR FILE NAMED: SQLOUT
BYPASSING TO END OF COMMAND
When using SQL Navigator expected results are produced (i.e. I recieve no error). Does anyone know if there's a restriction on the size of a SQL query embedded into a procedue via the SQL Wizard? Or what exactly happens when WebFocus sends the code to the database?
April 18, 2006, 10:30 AM
S.J. KadishCould you send the full code for the SQL pass-through? Just as a guess you might have a problem with a Case statement, but we should see more.
April 18, 2006, 11:29 AM
SaraMy code does not include any case statements, the statements are mostly aggregation functions and datatype conversions.
Due to my company's security restrictions I cannot send the actual code however I could mock up the code with fictious tables and columns though. Would that yield something you could diagnose?
Also, after some additional research I was able to narrow down to a range of characters (space not included) in a query that produced results versus throwing the above error. I found this by replicating the same exact query using unions. This leads me to believe there is a character limit somewhere?
April 18, 2006, 11:38 AM
Tony ASara,
Check out
this document that gives info on the SQL supported. However, bear in mind that it does not cover SQL passthru.
I am not sure how long you have been using WF, but most folks find that resorting to SQL passthru provides many benefits, the most important being that WF does not change your SQL and only the target (Oracle in your case) SQL interpreter has to be satisfied.
T
April 19, 2006, 11:49 AM
KevinGSara,
We use DB2 and dynamically build most of our SQL statements based on parameter values. There is a limit to the size of the SQL statement we can pass (about 64kb)through the SQL Engine in WF. Some of our longer queries, have had to be rewritten using 2 or 3 charater aliases, rather than the full table names. I don't know if this is what you are running into or not, but if the query is lengthy, try shortening it using aliases.
April 20, 2006, 02:16 PM
SaraTony, great document...thanks so much!
Kevin, I found reducing the aliases alleviated the problem as well...thanks so much for your input!