Jul 19, 2002 #1 Packya IS-IT--Management Oct 18, 2000 29 US I have a condition in Oracle SQL: Field_name between ateParameter and ateParameter + 365 How do I do this in Crystal so that CR passes it to the SQL where clause?
I have a condition in Oracle SQL: Field_name between ateParameter and ateParameter + 365 How do I do this in Crystal so that CR passes it to the SQL where clause?
Jul 19, 2002 #2 synapsevampire Programmer Mar 23, 2002 20,180 US Use: {Field_name} >= {?DateParameter) and {Field_name} <= dateadd('yyyy',1,minimum({?DateParameter) )) in the record selection criteria. Note that I changed the 365 to just adding a year to allow for leap years. This will pass the SQL (using Oracle 9i native connection). -k http://www.informeddatadecisions.comkai@informeddatadecisions.com Upvote 0 Downvote
Use: {Field_name} >= {?DateParameter) and {Field_name} <= dateadd('yyyy',1,minimum({?DateParameter) )) in the record selection criteria. Note that I changed the 365 to just adding a year to allow for leap years. This will pass the SQL (using Oracle 9i native connection). -k http://www.informeddatadecisions.comkai@informeddatadecisions.com
Jul 19, 2002 #3 synapsevampire Programmer Mar 23, 2002 20,180 US Oooops, I had a residual MINIMUM in the previous post from my testing, use this instead: {Field_name} >= {?DateParameter) and {Field_name} <= dateadd('yyyy',1,{?DateParameter) ) in the record selection criteria. Note that I changed the 365 to just adding a year to allow for leap years. This will pass the SQL (using Oracle 9i native connection). -k http://www.informeddatadecisions.comkai@informeddatadecisions.com Upvote 0 Downvote
Oooops, I had a residual MINIMUM in the previous post from my testing, use this instead: {Field_name} >= {?DateParameter) and {Field_name} <= dateadd('yyyy',1,{?DateParameter) ) in the record selection criteria. Note that I changed the 365 to just adding a year to allow for leap years. This will pass the SQL (using Oracle 9i native connection). -k http://www.informeddatadecisions.comkai@informeddatadecisions.com