Viewing 15 posts - 4,306 through 4,320 (of 10,144 total)
deepkt (7/23/2013)
Thanks for the reply, IF/ELSE is straight forward I know this.But I want in a single select/Update statement.
Why? It will be inelegant and unwieldy, and confusing for whoever inherits...
July 23, 2013 at 5:20 am
Rob-350472 (7/23/2013)
There are very subtle differencs in the Exceution plans between the SP and the code, however, they are different.
Can you post them? The Actual plans?
Do you have TOP without...
July 23, 2013 at 5:08 am
This simple query will always run as a table (or index) scan. How long it takes to complete will depend upon quite a few factors and some of these are...
July 23, 2013 at 4:21 am
IF EXISTS(SELECT 1 FROM TableB)
update data in TableA with TableB
ELSE
update data in TableA with TableC
July 23, 2013 at 3:56 am
-- why cast [Phone no] AS VARCHAR(MAX)?
-- why use CHARINDEX? You don't need the character position, you only need to know if
-- one string exists inside the other.
SELECT [customer].[Customer...
July 23, 2013 at 3:37 am
nailosuper (7/23/2013)
I changed my query and verified(made some modifications) the indexes as the others said. So i could avoid the table spool, and i have the response in...
July 23, 2013 at 3:15 am
drop TABLE #Temp
CREATE TABLE #Temp (col1 INT)
INSERT INTO #Temp (col1) VALUES (5),(10),(15),(20)
;WITH SequencedData AS (SELECT col1, seq = ROW_NUMBER() OVER(ORDER BY col1) FROM #Temp)
SELECT
tr.col1,
col2 = ISNULL(nr.col1-1,24)
FROM...
July 23, 2013 at 2:25 am
"Not everyone can be a superstar-expert-architect that decides how the system is built. Not all architects should spend time coding basic insert/update/delete code or adding clustered indexes to tables. We...
July 23, 2013 at 2:06 am
mister.magoo (7/22/2013)
dwain.c (7/22/2013)
L' Eomot Inversé (7/22/2013)
Sean Lange (7/22/2013)
Gosh Tom, how do you really feel about that article??? :w00t:
Just as described, but if I'd realised who wrote it I would have...
July 23, 2013 at 1:43 am
L' Eomot Inversé (7/22/2013)
dwain.c (7/17/2013)
Brandie Tarvin (7/17/2013)
Not only did I just teach myself how to use MERGE (never had time or reason), but I managed to use it correctly...
July 23, 2013 at 1:08 am
or this?
select Date, Item, Sales, db_NAME() as SomeColumn
from SomeTable
July 22, 2013 at 9:31 am
nailosuper (7/22/2013)
Hi ChrisM@Work,I think, i didn't really understand howto and why replace with ROW_NUMBER() . Can you just explain a bit?
Your person and email tables are...
July 22, 2013 at 9:10 am
Voide (7/19/2013)
To obtain data from a stored procedure you need to have a select. ...[/code]
The OUTPUT clause of a DELETE will do just fine 😉
July 22, 2013 at 8:50 am
The view is a strange mix of naive coding (determined by the very inefficient subquery and suggestions that the view was created using a query designer) and index hints, which...
July 22, 2013 at 8:16 am
karunakar2351 (7/22/2013)
The datatype of the column is varchar(50)
Why? That's a question for you to ask, not answer. Are there any benefits at all in having this column typed as string...
July 22, 2013 at 7:04 am
Viewing 15 posts - 4,306 through 4,320 (of 10,144 total)