need some help with coding...i want to be able to search my table first off...i want to be able to update the table, ONLY if the record IS NOT ALREADY THERE. i dont know if a CASE command will work here or not....please help.
This is what I have, but it doesn’t quite work.
INSERT INTO "ripedata" (matteridstring)
select distinct
f.matteridstring
from contacts c, parties p, fileinfo f, listbox l, events e
where
c.contactid = p.contactid and
f.fileno = p.fileno and
f.filetype = l.id and
e.fileno = f.fileno and
f.isactive = 1 and
e.title like '%Converted to LL%' and
e.date >= '01/01/2007' and
f.matteridstring is not null
I dont want to insert existing data either
This is what I have, but it doesn’t quite work.
INSERT INTO "ripedata" (matteridstring)
select distinct
f.matteridstring
from contacts c, parties p, fileinfo f, listbox l, events e
where
c.contactid = p.contactid and
f.fileno = p.fileno and
f.filetype = l.id and
e.fileno = f.fileno and
f.isactive = 1 and
e.title like '%Converted to LL%' and
e.date >= '01/01/2007' and
f.matteridstring is not null
I dont want to insert existing data either