|
-
Nov 4th, 2006, 10:05 AM
#1
Thread Starter
Junior Member
[RESOLVED] Date Problem with Crystal 8.5 SQL Query
Hi. I am using the SQL Query in Crystal 8.5 to run a select statement. When I run it, it gives no errors, but returns no data. When I run the same query in SQL Plus, it returns records. I believe the offending piece of code is:
"FREQUENCY_DATA"."FREQUENCY_DATE" = TO_CHAR(SYSDATE - 1, 'DD-MON-YY')
this is in my where clause and when I remove it on Crystal, it returns all records. When I keep it in there like I said, no records, but it will return records on SQL Plus. Any assistance would be greatly appreciated!
-
Nov 4th, 2006, 11:22 AM
#2
Thread Starter
Junior Member
Re: Date Problem with Crystal 8.5 SQL Query
It also works when I use actual dates instead of sysdate. Am I using sysdate incorreclty?
-
Nov 5th, 2006, 06:43 AM
#3
Re: Date Problem with Crystal 8.5 SQL Query
If you want to use system date In the crystal report then take it from the othere table and call from there.
What is sysdate??
-
Nov 5th, 2006, 12:26 PM
#4
Thread Starter
Junior Member
Re: Date Problem with Crystal 8.5 SQL Query
sysdate is what you use to get the system date on Oracle databases. It's not in a table, it's a system generated thing.
-
Nov 5th, 2006, 12:36 PM
#5
Re: Date Problem with Crystal 8.5 SQL Query
But you are using it with formula or the query with the crviewer.
-
Nov 6th, 2006, 11:51 AM
#6
Thread Starter
Junior Member
Re: Date Problem with Crystal 8.5 SQL Query
I am using it with the SQL Query under Database - Show SQL Query.
-
Nov 6th, 2006, 02:28 PM
#7
Re: Date Problem with Crystal 8.5 SQL Query
 Originally Posted by ydarb
I am using it with the SQL Query under Database - Show SQL Query.
How would you use it in a VB6 Program?
Regards,
Mark
Please remember to rate posts! Rate any post you find helpful. Use the link to the left - "Rate this Post". Please use [highlight='vb'] your code goes in here [/highlight] tags when posting code. When a question you asked has been resolved, please go to the top of the original post and click "Thread Tools" then select "Mark Thread Resolved."
-
Nov 6th, 2006, 10:07 PM
#8
Re: Date Problem with Crystal 8.5 SQL Query
 Originally Posted by ydarb
I am using it with the SQL Query under Database - Show SQL Query.
Post the query and code of the crystal report how you are using, I want to test the code.
-
Nov 7th, 2006, 11:27 AM
#9
Thread Starter
Junior Member
Re: Date Problem with Crystal 8.5 SQL Query
Hi, I was able to resolve this using the Crystal functions and using Current date rather that embedding sysdate within my sql query. Thanks for all the posts!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|