This is a discussion on SQL QUERY IN REPORTS 6i:Pls help within the Oracle Database forums, part of the Database category; Hi, I've the SQL query below in report builder to retrieve data in reports. In the query in line ...
|
|||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
SQL QUERY IN REPORTS 6i:Pls help
Hi,
I've the SQL query below in report builder to retrieve data in reports. In the query in line 14, i have specified the parameter &p for a donor code variable values that i'm specifying at run time separated by commas such as 1,2,3,4,5 etc But the SQL query in Reports doesnt accept the literal '&' even if i give ' _donor_code', it will take only one value at at time. I want to separate the values by ','SELECT ALL DONOR_TAB.DONOR_CODE, INITCAP(TITLE_TAB.TITLE_NAME||' '||DONOR_TAB.FIRST_NAME||' '||DONOR_TAB.MIDDLE_NAME||' '||DONOR_TAB.LAST_NAME) donor_name, RTRIM(INITCAP(RPAD(DONOR_TAB.ADDRESS1, 35, ' ')||RPAD(DONOR_TAB.ADDRESS2, 35, ' ')||RPAD(DONOR_TAB.STREET, 30, ' '))) DISPLAY_COL3, INITCAP(CITY_MASTER_TAB.CITY_NAME||' - '||DONOR_TAB.PIN) DISPLAY_COL4, INITCAP(CITY_MASTER_TAB.STATE_NAME||', '||CITY_MASTER_TAB.COUNTRY_NAME) DISPLAY_COL5, UPPER('DONOR CODE'||' - '||DONOR_TAB.DONOR_CODE) DISPLAY_COL6 FROM DONOR_TAB, CITY_MASTER_TAB, TITLE_TAB WHERE (DONOR_TAB.REMINDER IN ( _reminder)AND DONOR_TAB.LANG IN ( _lang)AND DONOR_TAB.DONOR_CODE IN (&p) ----line 14 AND ((DONOR_TAB.CITY_CODE = CITY_MASTER_TAB.CITY_CODE) AND (DONOR_TAB.TITLE_CODE = TITLE_TAB.TITLE_CODE))) ORDER BY DONOR_TAB.DONOR_CODE; |
|
|||
|
why dont u use a parameter form to pass the value of the same.
i dont think it can be done the way u have done in the SQL Query. You need to pass the value as a parameter. you can use the parameter form for the same and then use this value in the SQL Query. Hope it helps your query. Regards, RaJ |
![]() |
| Thread Tools | |
|
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to find second max sal of employee with the co | chandraismoon | Oracle Tutorials | 7 | 05-16-2008 03:08 AM |
| SQL Server FAQ | Limca | SQL Server | 1 | 04-27-2006 05:25 PM |
| Change Password for SQL Server User | admin | SQL Server 2005 Tutorials | 2 | 04-07-2006 11:09 AM |
| IBM - Oracle PL SQL / Crystal Reports, 2+Year Exp, Bangalore. | lokeshm | Experienced Job Seekers - India | 0 | 03-22-2006 12:23 PM |
| SQL Server CE 2.0 installation Problem | NareshShroff | SQL Server 2005 Tutorials | 2 | 07-17-2004 06:55 AM |