Viewing 15 posts - 346 through 360 (of 2,038 total)
Hi Jacques
J-F Bergeron (9/3/2009)
Is there a way to use a cursor, or a foreach, and cycle through a list of database servers?
We have 100 branches here,...
September 3, 2009 at 11:36 am
Hi Paul
Maybe you don't know where your data from, but I'm quite sure that you know the required destination for them.
I think a completely generic approach makes it impossible to...
September 3, 2009 at 4:57 am
Accidentally 😛
Noticed the menu item as I started with SSMS 2005 some years ago and remembered that SQLCMD is the new command line tool for SQL Server 2005. Thought "command...
September 2, 2009 at 3:33 pm
Hi Tim
Could you please give a short description of what your procedure does?
Thanks
Flo
September 2, 2009 at 2:21 pm
GSquared (9/2/2009)
Flo, not sure if you know, but inserts count as updating every row, so using If Update() in an After Insert trigger is kind of meaningless.
Thanks for the correction,...
September 2, 2009 at 9:29 am
Hi
You can use the UPDATE() function which is available within triggers:
USE tempdb
GO
IF (OBJECT_ID('TestTrigger') IS NOT NULL)
DROP TABLE TestTrigger;
GO
CREATE TABLE TestTrigger
(
Id INT NOT NULL IDENTITY...
September 2, 2009 at 8:51 am
Hi
Problem seems to be the size of your varchar not the type.
This works:
DECLARE @v VARCHAR(36);
SELECT @v = NEWID();
This doesn't work:
DECLARE @v VARCHAR(30);
SELECT @v = NEWID();
Greets
Flo
September 2, 2009 at 8:44 am
Hi
You can set your query window to SQLCMD mode (menu -> Query -> SQLCMD) and use the ":connect" method
:connect MyServer1 -U MyUserName -P MyPwd
SELECT @@SERVERNAME
GO
:connect MyServer2\MyInstance
SELECT @@SERVERNAME
Greets
Flo
September 2, 2009 at 7:36 am
Have a look to BOL (Books Online) for REPLACE and STUFF functions.
September 2, 2009 at 4:50 am
Everybody of us uses techniques stolen from somebody else. From a book, a thread, a blog or the guy next to us at work.
It's not just the answers you give,...
September 1, 2009 at 3:10 pm
Bob Hovious (9/1/2009)
Truly, you are the man, Flo. 😉
And you stay my mentor. 🙂
September 1, 2009 at 2:56 pm
Glad we could help! 🙂
Thanks for the feedback
September 1, 2009 at 2:41 pm
Hi Paul
Sorry for saying that, but this sounds like a coding for fun project. :crazy:
Probably this might be possible with hundreds and thousands of lines SQL using thinks like ISNUMERIC()...
September 1, 2009 at 2:35 pm
Sorry, I miss read your post at first time... Try this
UPDATE m SET
m.Date = t.Date
,m.Description = t.Description
...
September 1, 2009 at 2:17 pm
Hi washawgolla
Try to avoid the query-method. You can use value() directly:
DECLARE @xml XML
SELECT @xml = '
1
10629
10629
31524
31524
Gwadz
Marya
Viorst
102713
900017303
32166
2
2008-05-27T00:00:00
'
--code
SELECT x.legacy_data.value('(./id/text())[1]', 'int'),
x.legacy_data.value('(./prot/text())[1]', 'varchar(20)'),
...
September 1, 2009 at 2:11 pm
Viewing 15 posts - 346 through 360 (of 2,038 total)