Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Error trying to create SQL Report
Go
New
Search
Notify
Tools
Reply
  
Error trying to create SQL Report
 Login/Join
 
<AM>
posted
I am trying to create a procedure in WebFocus using SQL. When I run the sql directly on the database the sql runs fine with no errors. But when I try to create a procedure using the "Type SQL" or SQL from file I get the below message? There is no error in the SQL for right paren?? Is there a limitation to the lines of SQL to be used in WebFocus, my sql code has 120 lines? Any idea's?

(FOC1400) SQLCODE IS 907 (HEX: 0000038B)
: ORA-00907: missing right parenthesis
: Error context area: NUM <= 100
L (FOC1405) SQL PREPARE ERROR.
(FOC205) THE DESCRIPTION CANNOT BE FOUND FOR FILE NAMED: SQLOUT
BYPASSING TO END OF COMMAND
 
Reply With QuoteReport This Post
Guru
posted Hide Post
Could you post your code? Then we can help you better with solving this issue.


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 450 | Location: Europe | Registered: February 05, 2007Reply With QuoteReport This Post
Expert
posted Hide Post
You don't say what DBMS the table is in.

What is the (+) syntax - I've never seen that.

You should check the Adapter Administration
for UNIX, Windows, OpenVMS, i5/OS, and z/OS manual to see if there are any restrictions to the SQl you can pass to WebFOCUS.


Francis


Give me code, or give me retirement. In FOCUS since 1991

Production: WF 7.7.05M, Dev Studio, BID, MRE, WebSphere, DB2 / Test: WF 8.1.05M, App Studio, BI Portal, Report Caster, jQuery, HighCharts, Apache Tomcat, MS SQL Server
 
Posts: 10577 | Location: Toronto, Ontario, Canada | Registered: April 27, 2005Reply With QuoteReport This Post
Guru
posted Hide Post
Does the SQL run if you do this:
  
SQL SQLORA
..your sql code..
;
END


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 450 | Location: Europe | Registered: February 05, 2007Reply With QuoteReport This Post
<AM>
posted
Oracle is the DB, right join(+)
 
Reply With QuoteReport This Post
<AM>
posted
quote:
Originally posted by Frans:
Does the SQL run if you do this:
  
SQL SQLORA
..your sql code..
;
END


No it does not
 
Reply With QuoteReport This Post
Guru
posted Hide Post
It looks like your doing multiple selects and your merging these selects. I'm not sure if the Oracle driver can handle this.

What you could do is break up the select statements and putting them in a holdfile. You can concatenate these holdfiles to get your final result.

To be sure contact IBI support or Oracle support to see if union select is supported in their ODBC.


Test: WF 8.2
Prod: WF 8.2
DB: Progress, REST, IBM UniVerse/UniData, SQLServer, MySQL, PostgreSQL, Oracle, Greenplum, Athena.
 
Posts: 450 | Location: Europe | Registered: February 05, 2007Reply With QuoteReport This Post
Virtuoso
posted Hide Post
There is no limitation on # of lines as far as I know. We have a couple of procedures that use a couple hundred lines of SQL (don't ask!) If it does not run inside of SQL SQLORA and END as Frans suggests, there is something else wrong. That method is called SQL passthru, which instructs WF to completely pass the entire statement directly to the DBMS without parsing anything.
Your other alternative is to create a stored procedure which eliminates WF completely except for the fact that there is a master file that can use the results of the procedure. This is all in the documentation.


Regards,

Darin



In FOCUS since 1991
WF Server: 7.7.04 on Linux and Z/OS, ReportCaster, Self-Service, MRE, Java, Flex
Data: DB2/UDB, Adabas, SQL Server Output: HTML,PDF,EXL2K/07, PS, AHTML, Flex
WF Client: 77 on Linux w/Tomcat
 
Posts: 2298 | Location: Salt Lake City, Utah | Registered: February 02, 2007Reply With QuoteReport This Post
Member
posted Hide Post
Try removing the comments you have in your WHERE statements. You cannot use -- to comment a statement in a SQL Passthru. Use -* instead

WHERE request_type_id = 34395 -- Old Decom PPM Style

WHERE request_type_id = 38285 -- Lean Decom PPM Style
 
Posts: 4 | Registered: April 18, 2007Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  WebFOCUS/FOCUS Forum on Focal Point     Error trying to create SQL Report

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.