Viewing 15 posts - 4,936 through 4,950 (of 10,144 total)
Sean Lange (4/2/2013)
Can somebody help here. http://www.sqlservercentral.com/Forums/Topic1437758-391-1.aspxI know it isn't too difficult I just can't seem to figure out what they want.
Touched.
It will still be tricky, even with a full...
April 3, 2013 at 2:02 am
What's confusing folks here is that this sample datainsert into #sample
select '11003291001-----NOB30000','0V003','A00A00',269,285,305,1 union all
select '11003291001-----NOB30000','03003','A00A00',287,30,305,2
is both an order and a description of the available stock. Split them out and...
April 3, 2013 at 2:01 am
Thanks for the ddl and dml, it makes a real difference. I'd recommend you split this into two steps. It will make the end result easier to understand, test and...
April 3, 2013 at 1:43 am
theashishtrivedi (4/2/2013)
Thanks for the reply Chris,I have already posted some sample data in my earlier post. Due to some legal restrictions, I can't post more data.
Can you please read the...
April 2, 2013 at 4:31 am
The SELECT query is no longer using index IX_suspect_status_rsn_shipopt, it's now using IX_sessionID, same as the UDATE query, because of the changes made in the last iteration. Using IX_sessionID, the...
April 2, 2013 at 4:17 am
-- Some reformatting to make the code easier to read
-- and a small change to make the logic a little easier to follow.
-- Please check that this query returns the...
April 2, 2013 at 2:35 am
Try modifying this instead;
;WITH Dupechecker AS (
SELECT ID, NUM, ECD, ?,
dupecount = COUNT(*) OVER(PARTITION BY Col1,Col2,COl3,COl4)
FROM Table_A
WHERE ID = 5628
)
INSERT INTO table_b (A,B, C, D)
SELECT
ID, NUM, ECD,
ERR_MSG_TXT...
March 28, 2013 at 10:17 am
HiralChhaya (3/28/2013)
So Inner Join will work... right? I was confused weather to use Left Outer Join or not.Thanks a lot for help
Yes, it will work.
You will have to correct...
March 28, 2013 at 10:06 am
HiralChhaya (3/28/2013)
They are 4select
A.ID, 1
A.NUM, 2
A.ECD, 3
Col1||Col2||Col3||Col4 as ERR_MSG_TXT 4 this is concatenation of columns of Table_A, the error_mesg_text will display duplicate rows data
Thanks
-- why...
March 28, 2013 at 10:00 am
HiralChhaya (3/28/2013)
table have only 4 columns
You've listed 7 columns in table A in your query - it would help us if you were to correct the column names.
March 28, 2013 at 9:44 am
Neither, use OVER() with COUNT:
;WITH Dupechecker AS (
SELECT
A.ID,
A.NUM,
A.ECD,
Col1||Col2||Col3||Col4 as ERR_MSG_TXT,
dupecount = COUNT(*) OVER(PARTITION BY Col1,Col2,COl3,COl4)
FROM Table_A
WHERE A.ID = 5628
)
SELECT *
FROM Dupechecker
WHERE dupecount > 1
March 28, 2013 at 9:32 am
kmundt (3/28/2013)
March 28, 2013 at 8:29 am
writearjun53 (3/28/2013)
Hello Kingston Dhasian,I have tried this query but it has show error "Invalid column name DS.ITEM".
I have converted this query as my table structure.
Regards,
Arjun
You will need to a) read...
March 28, 2013 at 5:36 am
ERIC CRUDELI (3/28/2013)
4 millions from DI81SW (#TEMP1)I have to insert 1.3 millions (#TEMP2)
I used the following script but I'm anxious because I have to insert 1.3 millions of line :doze:
Are...
March 28, 2013 at 4:20 am
Please run this query and post the result:
SELECT COUNT(*)
FROM [DI81SW].[CNET_EXP].[dbo].[NOYAU_NUM_TELEPHONE] AS CNet WITH (NOLOCK)
WHERE (CNet.[SMS] = 1)
March 28, 2013 at 3:47 am
Viewing 15 posts - 4,936 through 4,950 (of 10,144 total)