creating temporary table

  • Hi,

    I use a VB 6.0 application. At run time I need to create a temporary table, to copy the contents from a SQL table which has more than 7 digit number of records.

    I need to perform operations on the temporary table created. And then finally truncate the temporary table once all operations are done. Please help me with the SP that I have to write.

  • PADMAPRIYA3.G (11/5/2008)


    Hi,

    I use a VB 6.0 application. At run time I need to create a temporary table, to copy the contents from a SQL table which has more than 7 digit number of records.

    I need to perform operations on the temporary table created. And then finally truncate the temporary table once all operations are done. Please help me with the SP that I have to write.

    You are not require to create any temp tables. Use recordsets, that will work faster than the tables, if you are doing all these on the Visual basic 6 platform

    kshitij kumar
    kshitij@krayknot.com
    www.krayknot.com

  • PADMAPRIYA3.G (11/5/2008)


    I need to perform operations on the temporary table created.

    What kind of operations?

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

  • I need to select operations which are needed in different functions in the VB 6.0 application. I have to write out them to a CSV file as well.

  • Then, I have to agree with kshitij... unless I'm missing something, those all sound like "read" operations and there's no need for the overhead of building a 1+ million row temp table... just read from the original tables.

    That notwithstanding, you can used SELECT/INTO to quickly build a Temp Table. And, no... it doesn't freeze TempDB... they fixed that way back in 6.5.

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.

    Change is inevitable... Change for the better is not.


    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply