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!

how to SQL expresion 1

Status
Not open for further replies.
Sep 12, 2005
448
0
0
US
Hi all
cr 9.0
ms sql
I trying to get this query into an sql expression
-------------------------------------------------------
select distinct portfolio from funds where fund_group = '59' and CSTM_FundChannel = 'Age-B'
-------------------------------------------
can someone help plz

thanks


Durango122
if it moves and should not used Duck Tape
if does not move and should used WD-40
 
Generally speaking, you need to add parentheses around your SQL Expression, a la:

(
SELECT DISTINCT
portfolio
FROM
funds
WHERE
fund_group = '59'
AND CSTM_FundChannel = 'Age-B'
)

A SQL Expression field is essentially the same as a subquery in true SQL. You can choose to correlate the SQL Expression to your main query or not.

In this case, is CSTM_FundChannel a field in your main report? If so, I would erase the field, find it in the field tree and double-click it to reinsert it into the report. This will ensure that the field is referenced with the exact syntax.

~Kurt

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top