i have created ms access tool data oracle tables through pass through query. have created local tables queried oracle tables (around 120 tables oracle) , named pre_[oracle table name]
. , again have queried oracle tables , created local tables post_[oracle table name]
. query used simple. select * pre_[oracle table name] [pass through query (select * [oracle table] id in ('20150201','20150202')]
. when tried compare pre , post tables in ms access through vba, found of tables sorted though having same data. tell me why data getting sorted when use same pass through query? there anyway rectify this?
planning change vba code compare pre , post tables. below code. how change code compare entire row of pre present in post? code should not restrict columns because columns vary tables.
set curdb = currentdb() strsql = "select * tbl_table_list" set rsdfs = currentdb.openrecordset(strsql) rsdfs if not .bof , not .eof .movelast .movefirst while (not .eof) tbldfs = rsdfs.fields("dfs_table") strsql = "select * pre_" & tbldfs set rs = curdb.openrecordset(strsql) strsql1 = "select * post_" & tbldfs set rs1 = curdb.openrecordset(strsql1) strsql2 = "select * tbl_dfs_table_compare_data" set rs2 = curdb.openrecordset(strsql2) = 1 until rs.eof x = 0 rs.fields.count - 1 val1 = rs.fields(x).value val2 = rs1.fields(x).value if val1 <> val2 rs2.addnew rs2!dfs_table = tbldfs rs2!pre_tbl_row_no = rs2!pre_tbl_col_name = rs.fields(x).name rs2!pre_tbl_col_value = rs.fields(x).value rs2!post_tbl_row_no = rs2!post_tbl_col_name = rs1.fields(x).name rs2!post_tbl_col_value = rs1.fields(x).value rs2.update
Comments
Post a Comment