Viewing 15 posts - 8,476 through 8,490 (of 8,760 total)
I believe you will find the answer here
😎
Note that sysusers is depreciated, use sys.database_principals instead.
April 26, 2014 at 9:37 am
TJT (4/26/2014)
OK thanks, this is what I was thinking, but wanted confirmation on this.Any other thoughts on this are appreciated
Kind of a "must read"
April 26, 2014 at 8:06 am
greeshatu (4/26/2014)
How can I update it
Complete listing using the MERGE statement
😎
USE tempdb;
GO
CREATE TABLE Table1(
[ID] int,
[Version] int,
...
April 26, 2014 at 7:59 am
rohanbajaj90 (4/26/2014)
This link talks about nested transactions. But I don't have any nested transactions. They are normal.
Sorry, seams like I jumped the gun here:-D
I formatted the code and added few...
April 26, 2014 at 7:27 am
TJT (4/26/2014)
I am trying to imagine...
April 26, 2014 at 6:40 am
Just a thought, how would you use the SSMS message? If you need the count of records affected you can use the output clause or simply either @@ROWCOUNT or ROWCOUNT_BIG()
😎
DECLARE...
April 26, 2014 at 6:18 am
April 26, 2014 at 6:05 am
TJT (4/26/2014)
Department has one or more Employees
Department has one or more Divisions
Divisions have one or more Units
Units have...
April 26, 2014 at 5:46 am
This is a simple version of timezone handling and time adjustments:
😎
USE tempdb;
GO
/*
NOTE: GMT is an obsolete standard, use UTC instead!
000 Dateline Standard Time (GMT-12:00) International Date Line West ...
April 26, 2014 at 5:36 am
Just add a filter to the update statement
😎
DECLARE @child TABLE
(
ID INT NOT NULL
,PID INT NOT NULL
);
INSERT INTO @child(ID,PID)
SELECT CH.ID,CH.PID FROM
(VALUES
(101,10)
,(102,10)
,(103,5 )
,(104,6...
April 26, 2014 at 3:49 am
dastagiri16 (4/26/2014)
and modified my procedure as below.lll
alter procedure limitedupdate(@i nvarchar(max),@j int)
WITH EXECUTE AS OWNER
as
begin
set rowcount @j-2 ;
execute sp_executesql @i
set rowcount...
April 26, 2014 at 3:39 am
J Livingston's solution is the proper way of doing this but for clarification, here is a corrected version of what you where trying to do using dynamic sql.
😎
declare @cmd nvarchar(255)...
April 26, 2014 at 1:56 am
Port1433 (4/26/2014)
Does any one know whether learning about Tableau would help for someone who is trying to break into IT with few course of SQL.
In my opinion, learning the software...
April 26, 2014 at 1:47 am
MVIT (4/26/2014)
But in the procedure before processing the date, I need to convert the date
to...
April 26, 2014 at 1:40 am
Viewing 15 posts - 8,476 through 8,490 (of 8,760 total)