01-16-2009 03:50 AM
I'm using the ACTOLEDB connection to pull data through to an Excel worksheet & having a bit of trouble excluding records before a given date.
I'm using the following SQL:
SELECT tbl1.[HISTORY Created On], tbl1.[HISTORY Record Manager], tbl1.[HISTORY TYPES Name]
WHERE [HISTORY Created On] > 31/12/2007
Unfortunately this seems to still bring back ALL records, even those before 31/12
I thought the date value would need to be enclosed in hashes, e.g. > #31/12/2007# but get the following message:
Incorrect syntax near '#'.
Hope someone can advise?
01-16-2009 04:39 AM
As so often is the case, had a quick smoke away from the screen and the clarity of mind returned!
Dawned on me that I should have been putting the numeric equivalent of the date value in, i.e.
31/12/2007 = 39447
Anyways, thought it best to post to save anyone replying...