Viewing 15 posts - 1,081 through 1,095 (of 1,923 total)
Tel me, your client is giving all the data in a single variable ? i mean, all the rows combined into a variable ?
Some more Qs:
1. Will rows be...
September 30, 2010 at 1:02 am
Whats your error message ? can you post it ?
September 30, 2010 at 12:58 am
Chris Morris-439714 (9/29/2010)
Here's the other thread we were all thinking of:
U are a rock-star CM... thats what exactly i was saying about...
September 29, 2010 at 5:57 am
Ashish, i would suggest you read YOUR signature line to get the best help from the forumites :w00t:
September 29, 2010 at 5:53 am
Try this:
DECLARE @Tab TABLE
(
[Date] DATETIME ,
[Level] INT
)
INSERT INTO @Tab ([Date] ,[Level] )
SELECT '9/28/2010 1:00', 12
UNION ALL
SELECT '9/28/2010 1:01',...
September 29, 2010 at 5:41 am
Mark-101232 (9/29/2010)
WITH CTE1 AS (
SELECT ID,Value,
ID-ROW_NUMBER() OVER(PARTITION BY Value ORDER BY ID) AS rn
FROM @SourceTable),
CTE2 AS (
SELECT ID,
...
September 29, 2010 at 5:00 am
Chris Morris-439714 (9/29/2010)
Funny - I've had to do this recently in a production system but I couldn't find the code or even remember the method. Age sucks.
Here's something...
September 29, 2010 at 4:58 am
Venkataraman R (9/29/2010)
If you want to assign set number, based on the list of values, then every time the list of values can change, as we are not having...
September 29, 2010 at 12:52 am
sayedkhalid99 (9/29/2010)
Declare @ResultTable Table
(
ID int identity(1,1),
[value] int,
[setnumber] int
)
declare @Newvalue int
declare @OldValue int
declare @counter int
set @counter=0
declare abc cursor
for
select value from sourcetable
open abc
fetch next...
September 29, 2010 at 12:52 am
Try this:
; WITH cte0 AS
(
SELECT S_NO , PRODUCT_NAME,PRODUCT_ID
, [COUNT] = ROW_NUMBER() OVER (PARTITION BY PRODUCT_NAME,PRODUCT_ID ORDER BY S_NO)
FROM TABLE_1
)
UPDATE TAB
SET TAB.COUNT_1 = CTE.[COUNT]
FROM TABLE_1 TAB
JOIN cte0 CTE
...
September 29, 2010 at 12:01 am
Try this:
CREATE TABLE TABLE_1 ( S_NO INT IDENTITY,PRODUCT_NAME VARCHAR(10),PRODUCT_ID INT,COUNT_1 INT DEFAULT 0 )
INSERT INTO TABLE_1 (PRODUCT_NAME,PRODUCT_ID)
SELECT 'SOAP',10001 UNION ALL
SELECT 'SOAP',10001 UNION ALL
SELECT 'SOAP',10001 UNION ALL
SELECT 'RUM',10002 UNION ALL
SELECT 'RUM',10002...
September 28, 2010 at 11:41 pm
You can use this query get the column names and it's data types..
SELECT TABLE_NAME , COLUMN_NAME , DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS
I honestly dint understand your requirement..
September 28, 2010 at 10:31 pm
Try this :
--***get the information from both tables and concatenate date and city
select t1.eForm53_GUID, t1.fullname, convert(varchar(10),b,101) as RecCreatedDate,
ISNULL ( (select convert(varchar(10),b,101) + ' ' + c as 'data()'...
September 28, 2010 at 6:34 am
My dig at this one:
Advantage of my query over steve's is that, steve's is built on the assumption that the Priority list will always remain the same (He has used...
September 28, 2010 at 5:47 am
craig 33233 (9/27/2010)
I have a source text file that for one type of record (inactive) has 25 fields, but for another type of record (active) has up to 36 fields
Ah,...
September 28, 2010 at 12:33 am
Viewing 15 posts - 1,081 through 1,095 (of 1,923 total)