Viewing 15 posts - 151 through 165 (of 429 total)
I think this will work too (Holidays Not Considered)
DECLARE @LastWorkingDayOfPreMonth VARCHAR(12)
DECLARE @DateToCheck DATETIME
SET @DateToCheck = '05/10/2005'
SELECT @LastWorkingDayOfPreMonth = CONVERT(VARCHAR, DATEADD(DAY, 0 - ((DATEPART(DAY, @DateToCheck)) +
CASE WHEN DATENAME(WEEKDAY, DATEADD(DAY, 0...
September 14, 2005 at 2:37 pm
September 14, 2005 at 2:27 pm
select value from table
where
p1 = case when @p1 is null then p1 else @p1 end and
p2 = case when @p2 is null then p2 else @p2 end
if the columns are nullable...
September 2, 2005 at 3:00 pm
CREATE PROCEDURE Test
@statusID int = 0
AS
SELECT * FROM tblStatus
WHERE
fldstatus = CASE WHEN @statusID = 0 THEN fldstatus ELSE @statusID END
GO
/*******************************************
As mentioned by rqR'us ??????????!!!!!!!(R*m*)
Will...
September 2, 2005 at 8:05 am
declare
@SQLString varchar(1000),
@TableName varchar(30),
@PackageID int
set @TableName = 'INDP'
set @PackageID = 1
set @SQLString = 'insert into DTSAudit (ComboID, RecordCount)
select combo.CID, rc.RcCnt
from
(select ''' + @TableName + ''' as TblNm,...
August 26, 2005 at 9:59 am
Real takes 7 digits & Float takes 15 digits. I never had a chance to use this datatype. Can any one please give an example or use of this datatype.
BOL
August 23, 2005 at 12:59 pm
If it wouldn't be a problem to add another sequenced refernece number then it would be simple like
SELECT * FROM TableName WHERE NewSequence BETWEEN 0 to 10000
SELECT * FROM TableName...
August 23, 2005 at 9:02 am
If you are using SQL Server 2000 the length of VARCHAR is 8000.
If you are with a version limits to 256 character length you can combine two variables to...
August 23, 2005 at 8:55 am
exec govinn.GotoWeekEnd
followed by
exec govinn.ResumeNightSleep
with
exec govinn.TakeALotofbeer
Sounds like melody
August 19, 2005 at 1:37 pm
Yes. I see how I will be completing my Stored Procedure Now.
August 19, 2005 at 1:25 pm
I could not believe myself.
As I closed my query analyzer window I could not give the queries I was trying. was so stupid. But why am I not getting answers...
August 19, 2005 at 1:05 pm
I was able to make it. Thanks for your help??
Let me know if there are any easier ways.
SELECT CallDate, DataDate,
1. * Calls / Qty CallsPerCar
FROM
@MyCalls A
LEFT OUTER JOIN
@MyCars B
ON
DATEDIFF(DAY, DataDate,...
August 19, 2005 at 12:53 pm
/* I gave the results for firat 11 days it will continue like this */
/*
Calls are recorded daily and cars are counted weekly
I have to create a report how...
August 19, 2005 at 12:29 pm
You said
table F has most recent and correct data and can not be overwritten with values from table D
So In Table F key 1 has 12 and Table D...
August 19, 2005 at 11:34 am
Viewing 15 posts - 151 through 165 (of 429 total)