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

converting sql to crystal report syntax

Status
Not open for further replies.

homerunkevin

IS-IT--Management
Jun 7, 2002
86
US
I am trying to put this column into crystal report, however I am
having trouble getting down the cyrstal report syntax.

This query is use with MSFT access sql.

IIf([tblChild].[DOB]
Between #5/8/2000# And #5/8/2003#,"I",
IIf([tblChild].[DOB] Between #5/8/1998# And #5/8/2000#,"P",
IIf([tblChild].[DOB] Between #5/8/1990# And #5/8/1998#,"S",
IIf([tblChild].[DOB] Between #5/8/1900# And
#5/8/1990#,"Xpired","xxx"))))
AS [Age Group]


Thanks a million

Love always,
Kevin Z
Techncial Support specailist
 
Try this:

IIf({av_rpt_AtsReportOfChecksNotApplied.dtsReceivedDate}
in [#5/8/2000#, #5/8/2003#],"I",
IIf({av_rpt_AtsReportOfChecksNotApplied.dtsReceivedDate} in [#5/8/1998#, #5/8/2000#],"P",
IIf({av_rpt_AtsReportOfChecksNotApplied.dtsReceivedDate} in [#5/8/1990#, #5/8/1998#],"S",
IIf({av_rpt_AtsReportOfChecksNotApplied.dtsReceivedDate} in [#5/8/1900#, #5/8/1990#],"Xpired","xxx"))))

or just use a Sql Expression containing:

IIf([tblChild].[DOB]
Between #5/8/2000# And #5/8/2003#,"I",
IIf([tblChild].[DOB] Between #5/8/1998# And #5/8/2000#,"P",
IIf([tblChild].[DOB] Between #5/8/1990# And #5/8/1998#,"S",
IIf([tblChild].[DOB] Between #5/8/1900# And
#5/8/1990#,"Xpired","xxx"))))

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top