Qw M
asked on
How to insert a inner join query in a table
Hi
I have this query:
SELECT tbhy_logdata_20120821.User , tbhy_logdata_20120821.User Name, tbhy_logdata_20120821.Desk , tbhy_logdata_20120821.Acti on, tbhy_logdata_20120821.Fiel d, CONCAT(tbhy_logdata_201208 21.Project ,'<|1|>',t bhy_logdat a_20120821 .Desk,'<|1 |>',tbhy_l ogdata_201 20821.Acti on,'<|1|>' ,tbhy_logd ata_201208 21.Field) AS CON, tbasys_timeline_a.TimeLine , tbasys_timeline_a.Concaten ate FROM tbhy_logdata_20120821 INNER JOIN tbasys_timeline_a ON Concat(tbhy_logdata_201208 21.Project ,'<|1|>',t bhy_logdat a_20120821 .Desk,'<|1 |>',tbhy_l ogdata_201 20821.Acti on,'<|1|>' ,tbhy_logd ata_201208 21.Field) =tbasys_timeline_a.Concate nate
And I have to insert this into a table that has 7 fields: User, UserName, Desk, Action, Field, Concat, TimeLine!
Thank you,
I have this query:
SELECT tbhy_logdata_20120821.User
And I have to insert this into a table that has 7 fields: User, UserName, Desk, Action, Field, Concat, TimeLine!
Thank you,
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
@angelIII: I get an error: Column count dosen't match value count at row 1!
Thank you,
Thank you,
well, your SELECT indeed returns 8 columns, so you need to remove the one you don't want be inserted to the final table
ASKER
@angelIII: Got it! I missed 1 column.
Thank you for your support!
Thank you for your support!
Open in new window