Viewing 15 posts - 946 through 960 (of 1,124 total)
Microsoft SQL Server 2005 - 9.00.3054.00 (Intel X86) Mar 23 2007 16:28:52 Copyright (c) 1988-2005 Microsoft Corporation Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 1)
Its the service...
--Ramesh
October 31, 2007 at 10:17 am
Look for database_id
--Ramesh
October 31, 2007 at 10:13 am
ma (10/31/2007)
Msg 8159, Level 16, State 1, Line 1'RecordHeaderCTE' has fewer columns than were specified in the column list.
I missed one thing....
; WITHRecordHeaderCTE( RowNum, RecordHeaderID, RecordStatus )
AS
(
SELECTROW_NUMBER() OVER( PARTITION BY...
--Ramesh
October 31, 2007 at 10:12 am
If you just want the first 10 characters of the account then use the derived table in the queries.
SELECT SUBSTRING( Account, 1, 10 ) AS Account, COUNT( * ) NoOfMatches
FROM...
--Ramesh
October 31, 2007 at 10:09 am
Here it is...
SELECT T1.Account, T2.NoOfMatches
FROM Account T1
INNER JOIN
(
SELECT SUBSTRING( Account, 1, 10 ) AS Account,
COUNT( * ) NoOfMatches
FROM Account
GROUP BY SUBSTRING( Account, 1, 10 )
HAVING...
--Ramesh
October 31, 2007 at 5:50 am
You could give a try on this....
; WITHRecordHeaderCTE( RowNum, RecordHeaderID, RecordStatus )
AS
(
SELECTROW_NUMBER() OVER( PARTITION BY TypeNo ORDER BY RecordHeaderID ) AS RowNum,
RecordHeaderID
FROM(
SELECTRecordHeaderID, TYPECODE, ( CASE WHEN TYPECODE = 'vinyl' THEN...
--Ramesh
October 31, 2007 at 5:40 am
You can only create full-text indexes on tables or on indexed views.
1. Create the view with SCHEMABINDING option.
2. Create a UNIQUE INDEX on this view.
3. Create FULL-TEXT INDEX...
--Ramesh
October 31, 2007 at 5:07 am
It might be the case that the total length of the entire row (including columns other than there in update) is exceeding the limit.
Well, in this case you...
--Ramesh
October 31, 2007 at 4:38 am
Just a point to make...
@@IDENTITY and SCOPE_IDENTITY return the last identity value generated in any table in the current session. However, SCOPE_IDENTITY returns the value only within the current scope;...
--Ramesh
October 31, 2007 at 4:20 am
There are many third party tools available in the market, such as SQL Compare from RedGate, SQLDiff from ApexSQL with 30 day free trial editions...
--Ramesh
October 31, 2007 at 4:14 am
A variable can only be declared once within a batch or in a loop. IF...ELSE is a branching statement whereas IIF not a valid statement in SQL but in...
--Ramesh
October 30, 2007 at 11:54 am
David (10/30/2007)
'' is being treated as 0. That's the problem when i want one result set for 0 and a different one for ''.
If it treats the empty string...
--Ramesh
October 30, 2007 at 11:42 am
You can achieve it by using variables in an UPDATE statement like
DECLARE @Counter INT
SET @Counter = 0
UPDATE Table1
SET @Counter = @Counter + 1, Email = Col1+'.'+Col2+ CAST(@Counter AS VARCHAR(10) )+'@email.com'...
--Ramesh
October 30, 2007 at 11:34 am
jacob.ostop (10/30/2007)
I am getting this errorMsg 8116, Level 16, State 1, Line 13
Argument data type text is invalid for argument 1 of replace function.
This is because the column program is...
--Ramesh
October 30, 2007 at 11:29 am
Viewing 15 posts - 946 through 960 (of 1,124 total)