anything like get rows or arrays for TSQL?

Results 1 to 2 of 2

Thread: anything like get rows or arrays for TSQL?

  1. #1
    Join Date
    Dec 1969

    Default anything like get rows or arrays for TSQL?

    Is there arrays or something similar to getrows for tsql? What I am trying to accomplish here is taking all my contractornumbers and doing some processing on them. I could just do fetch and do one at a time but i thought it would be better to put all the data someplace then do all the processing i need to do on them from there. If there isn&#039t then well i guess i have no option but to do it one a time.<BR><BR>Matt

  2. #2
    Garth Guest

    Default RE: anything like get rows or arrays for TSQL?

    T-SQL does not have arrays. In pre-2000 versions of the product you can use temporary tables. A temporary table is created just like a permanent table, but you preface the table&#039s name with a # sign. A single # sign (#TableName) defines the table as local--only the connection that created it can see it. Using two # signs (##TableName) defines the table as global--all connections can see it. The table is automatically deleted when the connection is terminated or you can explicitly delete it on your own. <BR><BR>SQL Server 2000 supports a table variable and a variant data type. This allows you to get real close to simulating an array.<BR><BR>Garth<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts