Results 1 to 5 of 5
  1. #1
    berderder is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Jun 2016
    Posts
    2

    INSERT INTO statement

    Hi everyone,



    I'm having a hard time populating the table Employee with numerous records. It will be a 5x5 table full of records for lastName, firstName, employeeID, etc.

    I initially thought I could use one INSERT INTO statement to populate the entire table, but I can't seem to figure it out.

    Could someone put me in the right direction as to how to do this?

    By the way, this has to be done using SQL as it's my homework assignment.

    Thanks for any help you can give.

  2. #2
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    What have you tried?

  3. #3
    Perceptus's Avatar
    Perceptus is offline Expert
    Windows 7 64bit Access 2007
    Join Date
    Nov 2012
    Location
    Knoxville, Tennessee
    Posts
    659
    im not sure what a 5x5 table means. If it means 5 fields?

    CREATE TABLE table_name
    (
    column_name1 data_type(size),
    column_name2 data_type(size),
    column_name3 data_type(size),
    ....
    );

    Then you could

    Insert Into TableName (
    column_name1,column_name2,column_name3) Values ("Uno", "Duece", "Tray")


  4. #4
    berderder is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Jun 2016
    Posts
    2
    Quote Originally Posted by ssanfu View Post
    What have you tried?
    Quote Originally Posted by Perceptus View Post
    im not sure what a 5x5 table means. If it means 5 fields?

    CREATE TABLE table_name
    (
    column_name1 data_type(size),
    column_name2 data_type(size),
    column_name3 data_type(size),
    ....
    );

    Then you could

    Insert Into TableName (
    column_name1,column_name2,column_name3) Values ("Uno", "Duece", "Tray")

    Well, I mean 5 cells by 5 cells but I forget the terminology. I guess that's 5 columns with 5 rows of data.

    The CREATE TABLE statements are easy enough for me but I had to write like 15 INSERT INTO queries to populate the 3 different tables I have.

    That seems like a really inefficient way of doing it. Is there a way to populate all the data in a table with only one single INSERT INTO statement?

  5. #5
    ssanfu is offline Master of Nothing
    Windows XP Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    What have you tried??? I don't mind helping, but I don't want to do your homework.

    to populate the 3 different tables I have
    Now there are 3 tables? Table names? Field names?

    Is there a way to populate all the data in a table
    Where is the data coming from?

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Insert into with a WHERE statement
    By hazeleyre23 in forum Access
    Replies: 10
    Last Post: 04-06-2016, 08:28 AM
  2. INSERT statement
    By GraeagleBill in forum Programming
    Replies: 2
    Last Post: 03-29-2013, 12:53 PM
  3. Insert Into statement
    By TimMoffy in forum Programming
    Replies: 7
    Last Post: 07-13-2012, 07:10 AM
  4. Insert statement
    By crowegreg in forum Programming
    Replies: 2
    Last Post: 08-19-2011, 02:20 PM
  5. Replies: 4
    Last Post: 09-03-2010, 02:55 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums