Viewing 15 posts - 256 through 270 (of 627 total)
Roles are your friend here...you should add the user to the db_datareader role which will have the same effect. You have to ask yourself, do you really want to...
June 20, 2016 at 7:04 am
That was a great article Gail! Thanks for sharing, It's one of those subtle things most probably learn the hard way.
So with that in mind here is update code......
June 13, 2016 at 9:12 am
GilaMonster (6/13/2016)
Y.B. (6/13/2016)
Do you have any examples/articles you can point me to so I can check it out
You mean other than the one I linked in my first...
June 13, 2016 at 8:40 am
GilaMonster (6/13/2016)
Y.B. (6/13/2016)
Also Phil is right...better to make use of a MERGE here anyway.
I disagree MERGE is NOT atomic (it should be, it isn't) and hence both it and the...
June 13, 2016 at 8:35 am
ChrisM@Work (6/13/2016)
Y.B. (6/13/2016)
IF EXISTS (SELECT 1 FROM SomeTable WHERE ID = @id)
UPDATE SomeTable SET SomeText = @SomeText
ELSE
INSERT INTO SomeTable VALUES (@ID, @SomeText)
EDIT: Although...
June 13, 2016 at 8:13 am
Maybe something like this would be better suited...
IF EXISTS (SELECT 1 FROM SomeTable WHERE ID = @id)
UPDATE SomeTable SET SomeText = @SomeText WHERE ID = @ID
ELSE
INSERT INTO SomeTable VALUES (@ID,...
June 13, 2016 at 7:33 am
Greg Edwards-268690 (6/9/2016)
Y.B. (6/9/2016)
I realize that there...
June 9, 2016 at 9:15 am
So what do you say when your boss announces in a meeting that 'we' should look into NoSQL? No really...what do you say?
I realize that there are good use...
June 9, 2016 at 8:10 am
Ed Wagner (6/8/2016)
TomThomson (6/8/2016)
HappyGeek (6/8/2016)
SkinflintPinchpenny
Cheap
Me 😉
June 8, 2016 at 1:01 pm
amy26 (6/8/2016)
Don't worry, those aren't the actual names...
June 8, 2016 at 12:55 pm
You might be over complicating things...is this what you want?
DECLARE @myTable TABLE (Code VARCHAR(7))
INSERT INTO @myTable
VALUES ('AB10003'), ('RG42421'), ('RG42421'), ('RG42421'), ('DG31311')
SELECT DENSE_RANK() OVER (ORDER BY Code) AS RowNum, Code FROM...
June 8, 2016 at 9:57 am
Erik de Jonge (6/8/2016)
June 8, 2016 at 9:46 am
I understand when stuff goes wrong in production usually the panic sets in. However, before you reset SQL did you at least capture an execution plan of the long...
June 8, 2016 at 8:37 am
Grant Fritchey (6/1/2016)
yb751 (6/1/2016)
Steve Jones - SSC Editor (6/1/2016)
yb751 (6/1/2016)
The purchase of some Red Gate tools finally got approved by my boss. 😀
Feels like I've been begging...
June 1, 2016 at 1:27 pm
Trust me, I'm not crazy about it either. I have a couple of other ideas but until I hear from the OP I'd just be taking more shots in...
June 1, 2016 at 1:23 pm
Viewing 15 posts - 256 through 270 (of 627 total)