Viewing 10 posts - 1 through 10 (of 10 total)
WHERE (@ID > 0 And ID=@)
Or (@Id = 0 and RMARequestedDate > (GetDate()- @D)
January 21, 2011 at 2:50 pm
Where StartDate Between startDateInput and EndDateInput
OR EndDate Between startDateInput and EndDateInput
OR (StartDate "Less than" startDateInput and StartDate "greater than" EndDateInput)
February 11, 2009 at 1:52 pm
SELECT ResourceID, sum(Case When (Status <> 5) AND (MRN IS NOT NULL)
...
December 16, 2008 at 3:30 pm
Easiest and clearlest syntax for YTD takes advantage of implicit character conversion:
declare @FirstDate datetime
select @FirstDate = '01/01/' + convert(char(4),datepart(year,getdate()))
Select ..... where Orderdate >= @FirstDate
September 6, 2005 at 2:12 pm
Temp table solution:
select app_id,current_start=max(start_date) into #a
from tempbookings
group by app_id
select a.app_id,current_start,last_start = max(start_date) into #b
from #a a, tempbookings b
where a.app_id = b.app_id
and start_date < current_start
group by a.app_id
select * from #b where...
March 29, 2005 at 11:24 am
declare @year int
declare @period int
select @year = 2004,@period = 2
select * from MEMBERS where datepart(year,effective_dte) = @year
and datepart(month,effective_dte) = @period
That way, in a proc, all you have to pass is...
February 6, 2004 at 10:23 am
For most purposes I just take advantage of what default time is for a user input date.
between UserinputDate1 and
...
November 13, 2003 at 2:07 pm
Just a note on using like. If the syntax is always "Somename%", ie., begins with, using
the following is a much more efficient use of the index:
where name between "Somename" and...
November 13, 2003 at 1:59 pm
The only reason to reply to an RFP you're not proposinging on is to insure you get future RFP's from that source. They're Linux, you don't do Linux, why reply?...
October 24, 2003 at 7:53 pm
Viewing 10 posts - 1 through 10 (of 10 total)