Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need first day of previous month for criteria in a SQL view.

Status
Not open for further replies.

ljevans

Technical User
Apr 4, 2001
53
US
When this view is run, all of the discrepancies written the previous month are displayed. I've got the last day of the previous month, but I can't get the first day. Any help would be appreciated.

A criteria example: Between 10/1/2006 and 10/31/2006

So far I have:

Between 10/1/2006 and DateAdd("d", -Day(NOW()), NOW())
 
My all time favorite Celko answer
Code:
>> how to set the PK in SS Mgmt Studio ? << 


Who cares??  You are not not a real SQL programmer!!  You are a 
"mousey, mousey, click , click" non-programmer.  (with a French accent) 
we spit on you,  Video gamer! 

to be serious, real programmers use a text editor.  They know the 
language they write in.  Those stinking "video game tools"slow us down. 
And they lead us to ask questiosn like this in newsgroups where people 
liek me will maek fun of you.

Denis The SQL Menace
SQL blog:
Personal Blog:
 
I don't like people who are intentionally abusive. Celko has some great stuff, but he's also misguided at times and moreover (which makes it rather harder to forgive) does it in crusade style, with trumpets, banners, regalia, white horses, and the expectation of being treated like royalty.

Baaaaaaaaaaaaaarrrrrrrrrrrrrrrffffffff
 
So, LJEvans, did you get your view to work?

A wise man once said
"The only thing normal about database guys is their tables".
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top