Microsoft SQL Server
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsDatabaseMicrosoft SQL Server

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old May 11th, 2005, 09:13 PM
zobernjik zobernjik is offline
Contributing User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Location: Australia
Posts: 139 zobernjik User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 10 h 31 m 10 sec
Reputation Power: 5
date field as a critieria- help

HOw do I write correctly a query where I want to say give me everything where Created is before 1/6/2004 and InvoiceReceived are not after 1/6/2004.

So some of these results can be created before 1/6/2004 but we are still using them and invoicing is coming through, but I want to find what was created before that date and Invoicing is not coming through any more, therefore we are not using their services.

Thanks to whoever helps me.

Reply With Quote
  #2  
Old May 12th, 2005, 07:07 AM
nofriends's Avatar
nofriends nofriends is offline
Senior Water Wizard
ASP Free God 11th Plane (10000 - 10499 posts)
 
Join Date: Aug 2004
Location: Cape Town, RSA
Posts: 10,186 nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)nofriends User rank is Brigadier General (60000 - 70000 Reputation Level)  Folding Points: 106940 Folding Title: Super Ultimate Folder - Level 1Folding Points: 106940 Folding Title: Super Ultimate Folder - Level 1Folding Points: 106940 Folding Title: Super Ultimate Folder - Level 1Folding Points: 106940 Folding Title: Super Ultimate Folder - Level 1Folding Points: 106940 Folding Title: Super Ultimate Folder - Level 1Folding Points: 106940 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 3 Months 2 Weeks 2 Days 7 h 36 m 24 sec
Reputation Power: 699
Hi,

Do you want both dates to be before 1/6/2004?
try
Code:
 select * from table where Created < '2004-06-01' AND InvoiceReceived < '2004-06-01'
 

or must the InvoiceReceived be after 1/6/2004?
try
Code:
 select * from table where Created < '2004-06-01' AND InvoiceReceived > '2004-06-01'
 

hope this helps
__________________
Look! Its a ShemZilla



Reply With Quote
Reply

Viewing: ASP Free ForumsDatabaseMicrosoft SQL Server > date field as a critieria- help


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway
Stay green...Green IT