DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 3 of 3

Thread: putting the contents of a temp. recordset into a table

  1. #1
    Colleen Guest

    putting the contents of a temp. recordset into a table


    I am trying to put two temporary recordsets, one that gets its information
    from a query and another that gets its information from a stored procedure,
    into one table. I am unsure about the syntax necessary to do this. Any
    help would be appreciated.

  2. #2
    Tonny H Guest

    Re: putting the contents of a temp. recordset into a table


    Are you in SQL 7 or what?
    If in SQL 7 or any version use
    SELECT <YOUR QUERY> INTO <TABLE NAME>
    You can put this in your stored procedure too

    -t-

    "Colleen" <cav471@mizzou.edu> wrote:
    >
    >I am trying to put two temporary recordsets, one that gets its information
    >from a query and another that gets its information from a stored procedure,
    >into one table. I am unsure about the syntax necessary to do this. Any
    >help would be appreciated.



  3. #3
    sbrown999 Guest

    Re: putting the contents of a temp. recordset into a table


    or if you need a more universal way:

    insert into <table_name> (<col1_name>, <col2_name>, etc...) values (<val1>
    ,<val2>, etc...)

    <col1_name>: the name of the column that you inserting a value into

    <val1>: the value that you are going to insert into the named column(col1_name)

    -or-

    insert into <table_name> select <values> from <table_name>

    *be sure that the table that you are inserting into has the same number and
    type of values that you are selecting from. (this is not the preffered method,
    things tend to change and could easily break this code)


    "Tonny H" <tonnyh@medianetworks.net> wrote:
    >
    >Are you in SQL 7 or what?
    >If in SQL 7 or any version use
    >SELECT <YOUR QUERY> INTO <TABLE NAME>
    >You can put this in your stored procedure too
    >
    >-t-
    >
    >"Colleen" <cav471@mizzou.edu> wrote:
    >>
    >>I am trying to put two temporary recordsets, one that gets its information
    >>from a query and another that gets its information from a stored procedure,
    >>into one table. I am unsure about the syntax necessary to do this. Any
    >>help would be appreciated.

    >



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center