Searching a table where the field doesnt exist - Access VBA -


i data consultant migrates data sent our system. have written code compares contents of table against has been put oracle, test. tables little convoluted due how relate each other. here question:

when match 2 field values , field doesnt exist parameter pop box. want run code if field exists.

i have tried many things, wrapping if statement around parameter box, can there must easier way this!

if not docmd.openquery("select top 1" & matchvalues!fieldname & " " &  matchvalues!oracle_table_name)    msgbox "moomins" '    strsql = "insert 002_tablevalueerrors(oracle_table_name,transform_table_name,field_name,oracle_field_value,transform_field_value) "  '   strsql = strsql & " values (" & matchvalues!oracle_table_name & "," & matchvalues!transform_table_name & "," & matchvalues!fieldname & ",'oracle: not found','oracle: not found')"  end if 

if deal oracle: have tried check if field exists querying all_tab_columns in oracle?

"select count(*) all_tab_columns table_name = " & matchvalues!oracle_table_name & " , column_name = " & matchvalues!fieldname 

(untestet cause have no oracle instance available)


Comments

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -