Invalis Column error when doing select into

  • I want to use select into to create a table StockCode_Planstest and insert data from the cross

    join but keep getting error on the first line

    Any ideas..

    SELECT stockcode_id,plan_id,mc_id INTO StockCode_Planstest

    SELECT c.stockcode_id as stockcode_id,

    a.plan_id as plan_id, a.mc_id as mc_id

    FROM Plan_Values a

    CROSS JOIN Stock_Code_Rebates c

  • Patrick Ige (4/8/2008)


    I want to use select into to create a table StockCode_Planstest and insert data from the cross

    join but keep getting error on the first line

    Any ideas..

    SELECT stockcode_id,plan_id,mc_id INTO StockCode_Planstest

    SELECT c.stockcode_id as stockcode_id,

    a.plan_id as plan_id, a.mc_id as mc_id

    FROM Plan_Values a

    CROSS JOIN Stock_Code_Rebates c

    Try ...

    SELECT

    c.stockcode_id as stockcode_id

    ,a.plan_id as plan_id

    ,a.mc_id as mc_id

    INTO

    StockCode_Planstest

    FROM

    Plan_Values a

    CROSS JOIN Stock_Code_Rebates c

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg
  • Thanks Jason...

    I was just blind and i think :doze:

  • It happens to all of us...

    ______________________________________________________________________

    Personal Motto: Why push the envelope when you can just open it?

    If you follow the direction given HERE[/url] you'll likely increase the number and quality of responses you get to your question.

    Jason L. Selburg

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

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