Viewing 15 posts - 391 through 405 (of 430 total)
--I got an error when I tried. So ![]()
![]()
/*
Server: Msg 145, Level 15, State 1,...
Regards,
gova
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
Regards,
gova
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,...
Regards,
gova
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...
Regards,
gova
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 EXISTS (SELECT...
Regards,
gova
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...
Regards,
gova
June 3, 2005 at 12:32 pm
Good Idea. Cool.
Regards,
gova
June 3, 2005 at 7:39 am
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....
Regards,
gova
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.
Regards,
gova
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...
Regards,
gova
June 2, 2005 at 10:15 pm
Can we use this to find the error rows
Select DecimalCol FROM Table WHERE DecimalCol > 99.9
Regards,
gova
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...
Regards,
gova
June 1, 2005 at 12:13 pm
You can use a INSTEAD OF trigger.
Regards,
gova
June 1, 2005 at 12:08 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...
Regards,
gova
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...
Regards,
gova
June 1, 2005 at 11:38 am
Viewing 15 posts - 391 through 405 (of 430 total)