Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Insert with fields and text Post Reply Post New Topic
Author Message
mabrown
Newbie
Newbie


Joined: 08 Jun 2007
Online Status: Offline
Posts: 27
Quote mabrown Replybullet Topic: Insert with fields and text
    Posted: 03 Oct 2017 at 11:05am
We need to insert 2 text fields and 2 fields from another table.  When I mix the text and fields I always get an error so what is the best way to do this?  We can clear the table before we insert data if needed but prefer not to.

We need to import as below and we need it to repeat 5 times on inv.i_id (Col1) for data 2 through 6:
text 1, Col1, text 2, Col2
text 1, Col1, text 3, Col2
text 1, Col1, text 4, Col3
text 1, Col1, text 5, Col3
text 1, Col1, text 6, Col3

Insert into TBL1 ("type","key", T_N, T_V)
 SELECT '22', inv.i_id, 'Met', inv.l_d  
    FROM INVENTOR
        LEFT JOIN inv  ON inv.i_id = "key"

We are getting an error on the join. I am guessing from the key being used as the col name but it is the only col we can join on.
thank you.

IP IP Logged
kevlray
Admin Group
Admin Group
Avatar

Joined: 29 Oct 2009
Online Status: Offline
Posts: 1587
Quote kevlray Replybullet Posted: 03 Oct 2017 at 1:08pm
Is this a crystal question or a SQL question?  If is an SQL question, then please provide the data source type (MS-SQL, Oracle, Access, etc.). Also your join is incorrect on any data source I know of.  You need to join to a field on the main table.


Edited by kevlray - 03 Oct 2017 at 1:12pm
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.