Viewing 15 posts - 4,546 through 4,560 (of 10,144 total)
softtesting2012 (6/5/2013)
Invalid: exec @sqlQueryValid: exec (@sqlQuery)
Not necessarily so. Read Gail's post above.
June 5, 2013 at 5:45 am
Try looking at this problem differently:
You want to insert some rows into a table [emp]. Any rows which will fail to insert into [emp] (e.g. duplicate key), should be inserted...
June 5, 2013 at 5:21 am
m.rajesh.uk (6/5/2013)
June 5, 2013 at 4:59 am
Hi Daniel and welcome to SSC. Thanks for doing an excellent job of posting up ddl.
danielb27 (6/5/2013)
June 5, 2013 at 2:29 am
ricardo_chicas (6/4/2013)
not an stats issue
There's no evidence to support anything else. Lowell's explanation seems the most likely.
June 4, 2013 at 9:36 am
ricardo_chicas (6/4/2013)
the query started working, then I removed the new index...
June 4, 2013 at 8:22 am
ricardo_chicas (6/3/2013)
if I remove field 2 from the equation it will work just fineAny ideas?
An actual plan from the whole original query with "field 2" commented out as you...
June 4, 2013 at 7:54 am
ricardo_chicas (6/4/2013)
I can't even generate the exec plan. It never ends, and none is using that table since it is a copy of the original
And none is blocking that spod...
June 4, 2013 at 6:56 am
Kingston Dhasian (6/4/2013)
ChrisM@Work (6/4/2013)
ALTER PROCEDURE update_use(
@name varchar(20),
@class nvarchar(30)
)
AS
UPDATE grts SET class = @class WHERE name = @name
IF @@ROWCOUNT = 0
INSERT INTO grts (name, class) VALUES (@name, @class)
Wow. This is the...
June 4, 2013 at 6:30 am
ricardo_chicas (6/4/2013)
Thanks but you are missing the point. The original query was something much bigger
I used a top 1 just to show you that there is something wrong with one...
June 4, 2013 at 6:10 am
ALTER PROCEDURE update_use
(
@name varchar(20),
@class nvarchar(30)
)
AS
UPDATE grts SET class = @class WHERE name = @name
IF @@ROWCOUNT = 0
INSERT INTO grts (name, class) VALUES (@name, @class)
June 4, 2013 at 6:08 am
immaduddinahmed (6/4/2013)
...and this is my data of shift Table
CompanyID--1
BranchID--2
ShiftID--12
ShiftName--G
LongName--GENERAL SHIFT (09 HRS)
Stype--null
timein--1/23/2013 9:00:00 AM
Timeout--1/23/2013 6:00:00 PM
Ltime--1/23/2013 9:16:00 AM
HdTime--1/23/2013 2:00:00 PM
Night--0
TotalTime--6/3/2013 9:00:00 AM
...
You are more likely to get effective help if...
June 4, 2013 at 2:19 am
ricardo_chicas (6/3/2013)
I have a big machine with 192gb, 16 cpus, and sql server 2012 RTM in it
I am trying to run this query
Select top 1
...
June 4, 2013 at 1:58 am
Instead of writing your second query like this:
vounum IN ('BC201203000073',
'BC201204000001',
'BC201204000002',
'BC201205000001',
'BC201206000001',
'BC201206000002')
write it like this:
vounum IN (
SELECT a.vounum
FROM actrna as a
INNER JOIN acinf as b ON a.comcod=b.comcod AND a.actcode=b.actcode
INNER JOIN sirinf as...
June 4, 2013 at 12:59 am
Viewing 15 posts - 4,546 through 4,560 (of 10,144 total)