Viewing 15 posts - 391 through 405 (of 429 total)
--I got an error when I tried. So
/*
Server: Msg 145, Level 15, State 1,...
June 6, 2005 at 11:29 am
SELECT DATE_STAMP_ "DateTime", CONVERT(DECIMAL(Scale, Precision),DATA_VALUE_) "Value"
FROM dbo.trenddata
WHERE TID_ = @TID AND @StartDate <= DATE_STAMP_ AND @EndDate >= DATE_STAMP_ AND RECORD_TYPE_ = 2
June 6, 2005 at 10:58 am
DECLARE @MyDate DATETIME
SET @MyDate = '05/07/2005'
IF DATEDIFF(MONTH, @MyDate, GETDATE()) = 1
SELECT @MyDate MyDate, GETDATE() Todaye, 'PREVIOUS MONTH'
IF CONVERT(VARCHAR, DATEADD(MONTH, 1, @MyDate), 101) = CONVERT(VARCHAR, GETDATE(), 101)
SELECT @MyDate MyDate, GETDATE() Todaye,...
June 6, 2005 at 10:22 am
For errors like data integerity errors and schema errors sql statement will be terminated.
http://www.sommarskog.se/error-handling-I.html
Work around is use output paramenter and set it to success at the end of...
June 6, 2005 at 9:42 am
I have seen code like this in SQL Server 6.5 by some developers.
DECLARE @product VARCHAR(50)
DECLARE @ProductID INT -- I assume Product ID as primary Key
SELECT *
INTO #Products
FROM
Products
WHILE...
June 3, 2005 at 10:36 pm
In SQL Server 2000 it is 8000 and in SQL Server 6.5 it is 255. I am not sure about 7.0
If it is not specified it would take the length...
June 3, 2005 at 12:32 pm
Chiris I don't get the solution.
This would not allow more than one 0 in the uniqifier field. There can be one 0 and one 1 and rest will be nulls....
June 3, 2005 at 6:06 am
If you use a linked table in Access to the SQL Server table it can be accesses as local Access table. Then you can transfer data from linked table.
June 3, 2005 at 5:54 am
INSERT, UPDATE trigger can be used to check the existing values and enforce the rule. If you are updating/Inserting multiple rows use correlated query or cursor. Logic will some thing...
June 2, 2005 at 10:15 pm
Can we use this to find the error rows
Select DecimalCol FROM Table WHERE DecimalCol > 99.9
June 2, 2005 at 9:28 am
Other Transact-SQL statements that can be used with control-of-flow language statements are:
This means you can use these with control-of-flow language...
June 1, 2005 at 12:13 pm
Case is like a function.
Can you please provide a link. My Books onlins says this.
Evaluates a list of conditions and returns one of multiple possible result expressions.
CASE has...
June 1, 2005 at 11:45 am
Oops. I just tested with your query with slight change. Null is implicit I would say. (I removed Else NULL part)
Thank You.
DECLARE @SortTable TABLE
(INTCol INT, VarcharCol VARCHAR(50), DateCol DateTime)
INSERT @SortTable VALUES...
June 1, 2005 at 11:38 am
Viewing 15 posts - 391 through 405 (of 429 total)