Welcome to Sign in | Help

SELECT pe o tabela (variabila locala)

  •  02-13-2007, 12:31 PM

    SELECT pe o tabela (variabila locala)

    salut, revin cu o intrebare

    de ce daca rulez:

    set @strSQL='select * from TempTable order by startTime'
    exec sp_executesql @strSQL

    imi afiseaza tot ce contine tabela respectiva

    iar daca vreau sa rulez astfel:

    set @strSQL='select * from '+@gTemp_table+' order by startTime'
    exec sp_executesql @strSQL

    nu-mi afiseaza nimic dar imi spune

    The command(s) completed successfully.

    cum pot afisa ce contine respectiva tabela daca ea este o variabila locala

    multumesc

View Complete Thread
Powered by Community Server (Commercial Edition), by Telligent Systems