I think I found part of the problem or another problem?
Using this code only 2 rows are Loaded into Swap2

    DROP TABLE swap2
    CREATE TEMP TABLE `swap2`  (`spcode` TEXT    (6) +
    NOT NULL  ('Value for spcode cannot be null.') ,  `soapcat` +
    TEXT    (1) ,  `spsort` TEXT    (4) ,  `spdesc` VARCHAR     ,  `sptxt` +
    TEXT    (60) )

LOAD `swap2` USING  spcode,soapcat,spsort,spdesc,sptxt
NONUM
'i11','3','a1',['cer2.LOB',TXT,0,280],'Movement less painful - spasm decrease+
d - day more comfort'
's5','3','b',['cer2.LOB',TXT,280,283],'releif short period but pain returns'
's6','3','b',['cer2.LOB',TXT,563,192],'SUB slight imp in ROM and ms, but basi+
cly same since last OV'
'sw1',,'0',['cer2.LOB',TXT,755,274],'SUB  worse, ADL''s aggravate pain, ms, R+
OM sl imp though'
'sw2',,'0',['cer2.LOB',TXT,1029,276],'SUB worse, ?? yd wk or hs wk, cautioned+
 pt take it easy'
'i13','3','a1',['cer2.LOB',TXT,1305,229],'SUB everything better, ADL''s dont +
cause as much discomfort'
'Ai','3','I',['cer2.LOB',TXT,1534,117],'progress as expected'
'i21','3','a1',['cer2.LOB',TXT,1651,305],'Adl sbetter'
'wn','3','b2',['cer2.LOB',TXT,1956,116],'Regressed due to:  (what caused regr+
ession?)'
**** there are hundreds of rows in this file
end

How can this be so hard?
Marc




From: MDRD 
Sent: Friday, June 18, 2010 9:18 AM
To: RBASE-L Mailing List 
Subject: [RBASE-L] - Append using Varchar


Hi

I want to Append rows from 1 table to another where the data in a Varchar filed 
does not exist 
95% of the data is already in the Target Table, and I only want to copy over 
the rows where that
are missing.

If I delete several rows from the target table or modify the data in the spdesc 
column on several 
rows I get 0 rows Appended.

Is there a better way to do this?
--   spdesc is a Varchar field
APPEND swap2 TO soapcode WHERE spdesc NOT IN (SELECT spdesc    FROM soapcode)

Thanks Marc

Reply via email to