I agree with both of you.  I do not use the append anymore, and I don't use 
"select * " in my inserts

Karen

 

 

 

-----Original Message-----
From: Dennis McGrath <[email protected]>
To: RBASE-L Mailing List <[email protected]>
Sent: Tue, Nov 4, 2014 12:43 pm
Subject: [RBASE-L] - RE: Insert into not inserting all records



I moved away from the APPEND command many years ago for the same reason.
 
Dennis McGrath
 

From: [email protected] [mailto:[email protected]] On Behalf Of Javier Valencia
Sent: Tuesday, November 04, 2014 12:27 PM
To: RBASE-L Mailing List
Subject: [RBASE-L] - RE: Insert into not inserting all records

 
Dennis,
 
I have gotten away from using wildcards on INSERT statements since they can 
create problems and they are difficult to debug, as you are finding out.
I would use a format like this:
 
INSERT INTO daily1 (ColumnA, ColumnB, OtherColumns) +
SELECT ColumnA, ColumnB, OtherColumns FROM rda1
 
Which is pretty much what you have in your first INSERT statement. Is there a 
reason why you are not using the same format for all your INSERT statements?
Using this approach, there is no doubt where every value comes from and where 
it goes.
 
Also, without seeing the structure of all the tables involved, it is very 
difficult to pinpoint what the problem might be.
 

Javier,
 
Javier Valencia, PE
O: 913-829-0888
H: 913-397-9605
C: 913-915-3137

 

From: [email protected] [mailto:[email protected]] On Behalf Of Hodges, Dennis
Sent: Tuesday, November 04, 2014 11:23 AM
To: RBASE-L Mailing List
Subject: [RBASE-L] - Insert into not inserting all records

 
I have a process that extracts a single day’s records, edits them and reinserts 
them into the permanent file.
I am running the following code in an EEP.  Everything is working correctly 
except the next to last line (INSERT INTO daily3 SELECT * FROM rda3). 
 
The problem is that I can run this exact code from the r:Prompt and it works 
fine, which in my sample data replaces 2 records,  but in the EEP it only 
inserts the first of the 2 records.  I have reviewed the table columns, 
keys/indexes, rules and triggers and can find no conflicts, in fact the daily3 
table has no rules, etc.  All rules are applied to the rda3 table.
 
Here is the segment of code in question.
DELETE ROWS FROM daily1 WHERE datex EQ "11/15/14" AND (priflag EQ "Y" OR 
priflag EQ "X")
DELETE ROWS FROM daily2 WHERE datex EQ "11/15/14"
DELETE ROWS FROM daily3 WHERE datex EQ "11/15/14"
DELETE ROWS FROM daily4 WHERE datex EQ "11/15/14"
DROP COL chekval FROM rda1
INSERT INTO daily1 (crew, datex, units1, units2, units3, units4, cmpsite1, 
cmpsite2, cmpsite3, cmpsite4, cr_page, priflag) SELECT crew, datex, units1, 
units2, units3, units4, cmpsite1, cmpsite2, cmpsite3, cmpsite4, cr_page, 
priflag FROM rda1
INSERT INTO daily2 SELECT * FROM rda2
INSERT INTO daily3 SELECT * FROM rda3
INSERT INTO daily4 SELECT * FROM rda4               
 
Dennis Hodges
Maintenance Management Manager
FDOT Office of Maintenance MS #52
PH: (850) 410-5635
FAX: (850) 410-5511
[email protected]
 
As far as we know, our computer has never had an undetected error.
 
Please note: e-mail may be subject to public disclosure.
 


Reply via email to