Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL help

Status
Not open for further replies.

hlmnsbuggy

Technical User
Mar 25, 2002
72
0
0
US
cr 11, oracle

I would like to use the following oracle query to add demand to reports in crystal. There are some errors, Since I don't have have much SQL knowledge, I hope your expert can help me. Please let me know how to correct the query so I can run the sql in the crystal- add demand

SEL_INFORCE_POLICIES =
SELECT p.a00_pnum, p.a06_edition, to_char(p.A08_FDATE,\'MM/DD/YYYY\'), to_char(u.c26_year_built)
FROM SYSADM.policycommon p, SYSADM.policyunit u
WHERE p.a00_pnum = u.A00_PNUM and p.a06_edition = u.A06_EDITION
INTO :strA00_PNum, :nA06_edition, :strA08_Fdate, :strC26_year_built
ORDER BY P.A00_PNUM, P.A06_EDITION ;

String: SEL_COVA = "
SELECT to_char(c07_limit_1)
FROM SYSADM.policycoverage
WHERE a00_pnum = :strA00_PNum and A06_EDITION = :nA06_edition and (c87_coverage = \'900\' or c87_coverage = \'800\')
INTO :nC07_Limit1 "

Thank you for your help
Ann
 
What do you currently have in your record selection formula?
Report->Selection Formulas->Record
 
should be balnk in record selection since this is my first step to do in crystal, instead of using tables, I use add command so it will create a customized table. My problem is that someone wrote the query in oracle program, I need edit the query into sql to run in crystal - add demand, but I run into error messagess. Do you know how to correct the query?

Thanks!

 
What version of Oracle?

The code you show looks like it came from an Oracle Stored Procedure. In the Command you can only use a Select statement.

What do you need besides this?
SELECT p.a00_pnum, p.a06_edition, to_char(p.A08_FDATE,'MM/DD/YYYY'), to_char(u.c26_year_built)
FROM SYSADM.policycommon p, SYSADM.policyunit u
WHERE p.a00_pnum = u.A00_PNUM and p.a06_edition = u.A06_EDITION
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top