Hi I am trying add the value from Table 1 column slprice to another table Table 2 column slprice1 using one line of SQL. I have tried using nested SQL, but all fails. The only code that works is with a for loop which I tried to avoid. Any suggestion?
- Table result = Table.query("UPDATE Test3 SET slprice1 = (SELECT slprice FROM Test2 WHERE Test3.ROW_NUMBER=Test2.ROW_NUMBER)"); //Nested SQL
- Table result = Table.query("SELECT slprice FROM Test2");
- for (int j=1; j<=result.numRows; j++)
- {
- Table result1 = Table.query("UPDATE Test3 SET slprice1= $1",result[j]["slprice"]);
- }