Afternoon guys
I have an SQL problem
I have 2 files that the data from one needs to be inserted into the other.
They both have the same number of fields
here are the 2 layouts
FileA FileB
Field
Name Type Length Dec Loc Type
Length Dec Loc
SDCAT A 2 1 A 2
1
SDITEM A 6 3 A 2
1
SDSKUNO A 6 9 A 6
9
SDSUFIX A 4 15 A 4
15
SIZE A 10 19 A 10
19
SDVPRC P 7 2 29 S 7 2
31
SQTY P 5 0 33 S 5 0
38
PORDMX A 5 36 A 5
43
SDORGC A 2 41 A 2
50
SDORGP P 7 2 43 S 7 2
54
SDORG# A 4 47 A 4
61
SDVPKODE A 1 51 A 1
67
When I try the following
INSERT INTO FILEA
SELECT * FROM FILEB
I get the error
Statement contains wrong number of values.
The only thing that I can think of is that FILEA has PACKED numeric fields
while FILEB has ZONED numeric fields
Anyone any ideas how to circumvent this within SQL
This mailing list archive is Copyright 1997-2026 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact
[javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.