Results 1 to 5 of 5

Thread: create and insert same time

  1. #1

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2005
    Posts
    1,170

    create and insert same time

    I would like to create the table, then insert at the same time, how can I do that with sql?

  2. #2
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: create and insert same time

    Sigh!
    More information please such as which database server are you using?
    Do you want to execute multiple sql strings or stored procedure?
    Are you using VB6 or VBA or .NET?

    There is a SQL statement called Select ... Into which is known as a "make-table" query.

  3. #3
    PowerPoster techgnome's Avatar
    Join Date
    May 2002
    Posts
    34,687

    Re: create and insert same time

    You can do it by Removing the eels from your hovercraft. It's amazing the trouble those little buggers can cause.
    * I don't respond to private (PM) requests for help. It's not conducive to the general learning of others.*
    * I also don't respond to friend requests. Save a few bits and don't bother. I'll just end up rejecting anyways.*
    * How to get EFFECTIVE help: The Hitchhiker's Guide to Getting Help at VBF - Removing eels from your hovercraft *
    * How to Use Parameters * Create Disconnected ADO Recordset Clones * Set your VB6 ActiveX Compatibility * Get rid of those pesky VB Line Numbers * I swear I saved my data, where'd it run off to??? *

  4. #4

    Thread Starter
    Frenzied Member
    Join Date
    Jun 2005
    Posts
    1,170

    Re: create and insert same time

    It will be .net and it will be the sql server one single database.

    Bascially, I allow users to create a "table" in my db, after the table is created, they will have ability to create columns too... I don' tknow how to approach this.

  5. #5
    A SQL Server fool GaryMazzone's Avatar
    Join Date
    Aug 2005
    Location
    Dover,NH
    Posts
    7,493

    Re: create and insert same time

    You mean you want to give the user the ability to create and modify any table they want?

    OK

    Create Table blah (
    ColumnName DataType Nullable,
    .............
    )

    Exeute on a command object

    Alter Table blah .......

    I will say I find this a very strange request. How will you be able to use the table and columns added if the app knows nothing about them.
    Sometimes the Programmer
    Sometimes the DBA

    Mazz1

Posting Permissions

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



Click Here to Expand Forum to Full Width