Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

MULTIPLE INSERT?

Status
Not open for further replies.

kerick

IS-IT--Management
Nov 17, 2000
40
US
I would like to take 5 columns and insert them into another table. Then I would like to take 5 more columns and insert them into the other table. If I do this I get an invalid use of keyword.


INSERT INTO "T:\PARADOX\REPORT.DB"
SELECT Sort26."Project Number", Sort26."Cost Code", Sort26."Variance Code", Qty, Price
FROM "T:\PARADOX\SORT26.DB" Sort26

INSERT INTO "T:\PARADOX\REPORT.DB"
SELECT Sort26."Project Number2", Sort26."Cost Code2", Sort26."Variance Code2", Qty2, Price2
FROM "T:\PARADOX\SORT26.DB" Sort26

What should I do?
Thanks
Eric
 
Hi Eric,

Can you describe the table structure for report.db and Sort26.db? Maybe also the complet error message?

Brad
 
sort26 has these fields
vpo# autoincrement
project number character 10
project number 2 character 10
thru proj16
same with cost code, variance code,
qty and price are numbers.
all have 16 columns representing qty1,qty2 etc.

Report just has one column for each type
project number
cost code
qty
variance
and price

the sql statement by itself is fine
but if I try to run a second insert I get this

Invalid use of keyword.
line number : 6
token:insert

this is in paradox8


I want to take
qty1, project1, cost1,var1 and price 1 and put them in
the report columns.
then I want to do it with all the other columns
basically I am trying to merge 16 sets of columns into 1 long set of columns so I can filter out the blanks and or to a cross tabulation.

Eric
 
Does paradox require a
GO
command after inserts? Malcolm
wynden@telus.net
 
apparently GO is not a keyword in paradox
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top