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

not getting anywhere - in my SQL need to compare number

Status
Not open for further replies.

mwhalen

Programmer
Oct 31, 2000
217
CA
with year. I'm losing my mind, please help. What I want to do is an EXISTS in my SQL and I want to bring in only those records where the year portion of my table A.date field is less than or equal to my table B.number field

I have to do this in my SQL of my Crystal report as well, it's not an option to do it in my record selection. I'm using Crystal 7, SQL Server with an Oracle Database.
 
The record selection is how Crystal built the SQL in version 7, so:

"I have to do this in my SQL of my Crystal report as well, it's not an option to do it in my record selection."

doesn't make sense to me.

An exists would be a very inefficient means to do this SQL anyway.

I don't think that you'll be able to get CR to pass that SQL based on the record selection criteria, but you can try:

year({MyTableA.MyDate}) = year({MyTableB.MyDate})

-k kai@informeddatadecisions.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top