Cetin,
I won't do the coding manually. Once I know what to do, I'll create a SQL builder that will generate whatever code it takes based on the table.
Thanks again for your ideas.
>Before insert you could do a select on identity column for existing records. ie:
>SQLExec(lnHandle,'select identitycol from myTable my where exists (select * from ##temptable tmp where my.f1=tmp.f1 and my.f2=tmp.f2 ...)','Existing')
>But of course if fields are a lot coding this is cumbersome (if manually done:).
>Cetin
>
Daniel