var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Getting the correct "Date" problem?
In a procedure that I am writing I have a select statement and need to say give me such and such results from the table where DateEntered is the first of the previous month??
Could somebody help me with that please?
I can get you to the "first of the prior month", but you'll have to do the dirty deed from there on in. I'd use:
SELECT DateAdd(month, -1, Convert(CHAR(8), GetDate(), 121) + '01')
Well that is great!!!!
This procedure will run a query once a month in the background,how can capture that data in a file and save it on my pc without doing it manually???
Last edited by zobernjik; 05-19-04 at 01:33.
Use OSQL.EXE to execute the stored procedure. You may want to start osql.exe from a job in the SQL Agent.
configure a job which runs monthly which does this for you.
Originally Posted by zobernjik