SELECT INTO Brain Glitch

  • I knew it would happen sooner or later but what am I missing here???? This is not a difficult thing to do and I am drawing blanks.

    SELECT AcctID

    , Name

    , Payer

    , Payer_Name

    , Account

    FROM tbl_Customers

    WHERE Account IN (113, 372, 135, 021)

    INTO NewDatabase.Customers.tbl_Table

  • If you are inserting into an existing table you want this:

    Insert INTO NewDatabase.Customers.tbl_Table

    SELECT AcctID

    , Name

    , Payer

    , Payer_Name

    , Account

    FROM tbl_Customers

    WHERE Account IN (113, 372, 135, 021)

    If you are creating the table using Select Into you want this:

    SELECT AcctID

    , Name

    , Payer

    , Payer_Name

    , Account

    INTO NewDatabase.Customers.tbl_Table

    FROM tbl_Customers

    WHERE Account IN (113, 372, 135, 021)

  • Thanks Jack! I knew it was simple and for whatever reason [it's Monday] was just having a brain glitch. Worked like a charm. Thanks again.

Viewing 3 posts - 1 through 2 (of 2 total)

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