Viewing 15 posts - 1 through 15 (of 43 total)
no one said cursors are bad and should not be used, i have done lots of loops with cursors
and i also wanted to know how this code can be changed...
November 21, 2014 at 2:31 pm
Luis Cazares (11/21/2014)
Damian-167372 (11/21/2014)
yes your absolutely right I agree table variable is a overhead for this query,
but for any other large queries I can use this method slightly...
November 21, 2014 at 10:44 am
Sean Lange (11/21/2014)
Damian-167372 (11/21/2014)
November 21, 2014 at 10:23 am
ok this what i have come up.. so you can do it
DECLARE @tbl_var TABLE( servername varchar (100 ), ...
November 21, 2014 at 10:03 am
so your saying you cant loop it through that record set for each server in that server_list table?
November 21, 2014 at 8:47 am
Sean Lange (11/21/2014)
Damian-167372 (11/21/2014)
Did you read the very first post from Koen? This is one of those rare times when a cursor really is the best approach.
Thanks, yes...
November 21, 2014 at 8:39 am
well you got my answere hope its clear now
Luis Cazares (11/21/2014)
Damian-167372 (11/21/2014)
is there a way we can do this in WHILE Loop?
What do you think this is? A pizza?
WHILE @@FETCH_STATUS...
November 21, 2014 at 8:29 am
ok this is what i do
DECLARE @server_namevarchar(200)
Declare cr cursor for
SELECT server_name FROM dbo.Tbl_ServerList
Open cr
Fetch cr into @server_name
WHILE @@FETCH_STATUS = 0
begin
SET @cmd = 'select *...
November 21, 2014 at 8:15 am
is there a way we can do this in WHILE Loop?
November 21, 2014 at 8:01 am
this query will just go into a stored procedure only, no functions or any other method.
November 21, 2014 at 7:43 am
Thanks,
how about having a seperate server to handle all the FTP upload and download stuff and then SQL server access a shared folder on that server over the network?
November 14, 2014 at 7:29 am
Hi
what about open transactions on memory (pages in buffer pool). If that's not taken into consideration, when you attach the database or files on the remote location, you may...
November 13, 2014 at 8:35 am
April 24, 2013 at 9:51 am
did you try with [] like
SELECT [ROLE] FROM dbo.Mgr_List_Role WITH (nolock) WHERE id = 'xxx15119'
the Role is a keyword may be that's giving a time out
April 24, 2013 at 8:58 am
may be you can try some telnet commands to send an email first and see if there is any ports are blocked to access the smtp server from your server.
April 24, 2013 at 8:22 am
Viewing 15 posts - 1 through 15 (of 43 total)