Results 1 to 4 of 4

Thread: Writing to a database using SQL ...

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 1999
    Location
    Decatur, AL US
    Posts
    14

    Post

    I'm using a SELECT statement to get information from a database ... and it works.

    NOW ... I can't figure out how to write the data back to the same database ...

    HELP!!!!

  2. #2
    Guest

    Post

    What database are you using and are you trying to create a new table or update a table or what? More information needed.

  3. #3
    Serge's Avatar
    Join Date
    Feb 1999
    Location
    Scottsdale, Arizona, USA
    Posts
    2,744

    Post

    If you want to Insert new record to a database use:

    Insert Into TableName (Field1, Field2, Field3) Values ('Value1', 2, True)


    Where: Field1 is a string(text) data type, Field2 is Integer(number), Field3 is Boolean(YesNo)

    If you want to update record in a database:

    Update TableName Set Field1 = 'ValueHere', Field2 = False Where Field2 = 2

    This will update one ore more records which have Field2 is equal to 2.

    Look in the Help. It has many examples on practically all SQL statements.


    Regards,

    ------------------

    Serge

    Software Developer
    [email protected]
    [email protected]



  4. #4

    Thread Starter
    New Member
    Join Date
    Jun 1999
    Location
    Decatur, AL US
    Posts
    14

    Post

    I'm using an Access database ... what I need to able to do is create another table and populate it with the information I'm selecting.

    I have ComboBoxes, being populated with AddNew statements (which comes from a table called Transcripts). I'm doing this with an SQL Select statement .. where StudID is equal to ...whatever .. then the student courses are listed in the ComboBoxes .. Then I need to be able to write what has been selected in the ComboBoxes to a new table (called checksheet) in the database .. I would like to do this with an SQL Statement ...

    Any Ideas ?

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