Forum Stats

  • 3,855,317 Users
  • 2,264,499 Discussions


oracleadapter without selecting

741552 Member Posts: 1
Hi 2 all,

I've just started to work with .net & odp & my first assignment is to transfer some data from excel file
into an existing table in the DB.
some of the values from the file exist in the table & just need to be updated
whilst the others are new & need to be inserted & I don't have an indication which is which.
also the values in the excel are of type general & the types in the DB are of type 'number' & 'clob'.

what I've tried so far is to extract the data from the excel using OLEDB jet provider
convert it to the correct format & fill a datatable. from here I need to do some sort of
sql that will do update if the record exists or insert if it doesn't.

my questions:
1 - am i doing the correct process or is there a better faster shorter alternative?
2 - can i use oracleadapter to do the update & insert for me even though i did not initially selected data from the DB & the datatable i have
can't be marked which row to insert & which to update?
3 - can i use the merge statement with DUAL to do the 'UPSERT' or is it not safe?

any help would be great.
thanks in advance,
avi the newbie
This discussion has been closed.