I'm fairly new to java. we have 2 databases (AS400 and SQL Server2000). There's a table in AS400 (named: ORHDR) with fields HORDNO, HOSTAT(P,W,X,) where x stands for "cancelled". In sql server, i have a table named Order with fields order_num, order_status(F,C,A).
i want to search the order table in SQL Server where order_status is "a" and then look up the corrosponding row in AS400. If the HOSTAT is "x", then update the field in SQL server to "C".
I know how to connect to both databases and select statement where order_status is "a". I just don't know how to compare that row with the corrosponding row of AS400 and then update the status adn keep doing this till the whole table is finished. Any hints or sample code would be greatly appreciated. Thanks for your time
i can go for just one way. i dont know whether there is some better way. but we can always get that row as String in our code and update the other on a certain condition. using some loops and if..else.