Sage SalesLogix
  • Contact Us
  • Sage North America
800-643-6400
Welcome Twitter Facebook LinkedIn
Community Home Blogs Share Ideas Search Request Access Resources
Reply
Copper Elite Contributor
slsl
Posts: 41
Registered: 03-09-2009
Accepted Solution

SQL "Date" Code - What am I Missing??

Hi Everyone,

 

I know this shouldn't be difficult, but none the less am stumped by this little item...

 

From ADMIN app I go and run a 2 line SQL code

 

Line 1: Select * from Activity

Line 2: Where Startdate < '12/31/2010'

 

Seems simple and easy enough!!

 

But then I get records with a Startdate after 1/1/2011 (Please see attached JPG).

 

So what am I missing??

 

As always, thanks in advance!!

 

Joe

Please use plain text.
Employee
EmmaNixon
Posts: 239
Registered: 05-19-2009

Re: SQL "Date" Code - What am I Missing??

This works fine for me. 

 

Try using the Build Query button and see if that works.

Please use plain text.
Copper Elite Contributor
slsl
Posts: 41
Registered: 03-09-2009

Re: SQL "Date" Code - What am I Missing??

Hi Emma,

 

Actually you gave me an idea with the Build Query tool!!  I slapped together a one line code snippet and I noticed the difference in how the STARTDATE field was selected/formatted -

 

where startdate < '20101231 00:00:00'

 

versus

 

where startdate < '12/31/2010'

 

and the "new" code presented the correct values!!

 

No, I don't know why, but hey, I'm not complaining so thanks a bazillion for the assist and have a good day!!

 

:smileyhappy:

Please use plain text.