Forum Replies Created

Viewing 15 posts - 1 through 15 (of 43 total)

  • RE: tsql with out using cursors

    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...

  • RE: tsql with out using cursors

    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...

  • RE: tsql with out using cursors

    Sean Lange (11/21/2014)


    Damian-167372 (11/21/2014)


    Two issues here. This doesn't do the same thing as what you posted. The second...and bigger issue is that a while loop is going to be slower...

  • RE: tsql with out using cursors

    ok this what i have come up.. so you can do it

    DECLARE @tbl_var TABLE( servername varchar (100 ), ...

  • RE: tsql with out using cursors

    so your saying you cant loop it through that record set for each server in that server_list table?

  • RE: tsql with out using cursors

    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...

  • RE: tsql with out using cursors

    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...

  • RE: tsql with out using cursors

    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 *...

  • RE: tsql with out using cursors

    is there a way we can do this in WHILE Loop?

  • RE: tsql with out using cursors

    this query will just go into a stored procedure only, no functions or any other method.

  • RE: FTP on SQL Server

    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?

  • RE: SAN replication

    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...

  • RE: 127rows and I get timeouts?

    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

  • RE: Database Mail

    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.

Viewing 15 posts - 1 through 15 (of 43 total)