I've had a period table added to the database. The dates are in DateTime format with time set as 12:00 AM. When I do a left join on the period table, I only get records from the second table showing records with Open_Time (a DateTime field) have the time as 12:00 AM. The DBA said I'd have to go into the SQL statement and modify it to format the DateTime field as a Date. He suggested I truncate the field. I'm not sure how to format the trucate function (haven't worked with SQL much). Haven't been able to find much information in the help files, online, or in the book I have.
My current SQL statement reads:
SELECT
SPR_DATES."DATESTAMP",
SPR_INCIDENTS."INCIDENT_ID", SPR_INCIDENTS."OPEN_TIME", SPR_INCIDENTS."PRODUCT_TYPE"
FROM
"SCTR"."SPR_DATES" SPR_DATES,
"SCTR"."SPR_INCIDENTS" SPR_INCIDENTS
WHERE
SPR_DATES."DATESTAMP" = SPR_INCIDENTS."OPEN_TIME" (+)
I'm working in Crystal Reports version 8.0.1.0
Any advise would be welcome. Also, any direction on the best book or resource to find syntax and function information for SQL would be great. The book I have is very basic.