Viewing 15 posts - 11,221 through 11,235 (of 15,381 total)
OK so you tried to post some code but you missed the mark. The code you posted is full of syntax errors and variables not declared. There are columns referenced...
July 25, 2012 at 7:39 am
Nice straight forward question. Keep them coming Pradeep.
July 25, 2012 at 7:14 am
You are welcome. Glad you were able to figure out a solution.
July 25, 2012 at 6:58 am
Matt Miller (#4) (7/24/2012)
Sean Lange (7/24/2012)
True and good reminder. You could however do something like this:
update blah
set mycol='SomeNewValue'
output @@rowcount
(snipped for brevity)
Neat idea, but unfortunately it...
July 24, 2012 at 2:51 pm
Matt Miller (#4) (7/24/2012)
Sean Lange (7/24/2012)
http://www.sqlservercentral.com/Forums/Topic1325508-391-1.aspx
There is nothing magical about try/catch blocks in t-sql. They work just like the same...
July 24, 2012 at 1:55 pm
Welsh Corgi (7/24/2012)
Sean Lange (7/24/2012)
http://www.sqlservercentral.com/Forums/Topic1325508-391-1.aspx
There is nothing magical about try/catch blocks in t-sql. They work just like the same constructs...
July 24, 2012 at 1:33 pm
I tossed together a quick flowchart to demonstrate what this is doing. Maybe it will help. Look down below for the attachment.
July 24, 2012 at 1:07 pm
Smash125 (7/24/2012)
DECLARE @Table TABLE
(
FirstName NVARCHAR(255),
MiddleName NVARCHAR(255),
LastName NVARCHAR(255),
ContactID INT
)
INSERT INTO @Table
SELECT FirstName,MiddleName,LastName,ContactID FROM Person.Contact
DECLARE @FirstName NVARCHAR(255)
SET @FirstName='kim'
IF EXISTS(SELECT * FROM...
July 24, 2012 at 12:51 pm
AND your update statement has no where clause. I guess this is OK if you want everyone to be named 'Sam'. 😛
July 24, 2012 at 12:45 pm
This thread has a good example of using OUTPUT with MERGE.
http://www.sqlservercentral.com/Forums/Topic1325508-391-1.aspx
There is nothing magical about try/catch blocks in t-sql. They work just like the same constructs in every programming language.
July 24, 2012 at 12:44 pm
D-SQL (7/24/2012)
Yes agreed. But this is coming from our VP and this is what he wants done.
I understand you there and I am trying to help you protect yourself. Have...
July 24, 2012 at 11:04 am
D-SQL (7/24/2012)
Is there an easy way to...
July 24, 2012 at 10:59 am
lokeshvij (7/24/2012)
[His Post :-)]Another example to clarify:
SELECT *FROM table_name
WHERE DateOfIncidentDte >= '01-01-2012'
AND DateOfIncidentDte < '01-01-2013'
Hope, you agree with me now - Sean 🙂
I absolutely agree with you...I just misread...
July 24, 2012 at 10:28 am
Lynn Pettis (7/24/2012)
Sean Lange (7/24/2012)
lokeshvij (7/24/2012)
July 24, 2012 at 10:25 am
jeezontorst (7/24/2012)
Well basically i use it because I've been learning sql for 6 months only, and this is what i have been shown by other...
July 24, 2012 at 10:22 am
Viewing 15 posts - 11,221 through 11,235 (of 15,381 total)