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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SQL Expression

Status
Not open for further replies.

rreddy01

Programmer
Apr 18, 2012
15
US
Can i use this below Query and write a SQL expression or atleast create any formula..

i have never used SQL like this in my reports.


SELECT
WEBTRNSP.PROPOSAL.PROPOSAL_ID,
WEBTRNSP.PROPOSAL.PROPOSAL_NM,
LISTAGG(WEBTRNSP.PROJECT.FEDPROJECTNUM, ' & ') WITHIN GROUP (ORDER BY WEBTRNSP.PROJECT.FEDPROJECTNUM) AS CONCAT_FEDPROJNUMS
FROM
WEBTRNSP.PROJECT,
WEBTRNSP.PROPOSAL
WHERE
( WEBTRNSP.PROJECT.PROPOSAL_ID=WEBTRNSP.PROPOSAL.PROPOSAL_ID(+) )
AND WEBTRNSP.PROPOSAL.PROPOSAL_NM IS NOT NULL
GROUP BY
WEBTRNSP.PROPOSAL.PROPOSAL_ID,
WEBTRNSP.PROPOSAL.PROPOSAL_NM


thanks,
rreddy
 
SQL expressions are used to return one value (or one value per group), not a series of values. If you have v. 9.0 or above, you can enter this query into the "Add Command" area (database->database expert->your datasource->above the list of tables.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top