Tuesday, 15 June 2010

sqlite : update record using value in another table -


does not support the table of joining in sqlite. I have a stock table:
Price (TEXT) Price (TEXT) PriceInUSD (for updating) - For example, Apple "USD 100" Faucet / Orange "HKD 50" null

and second exchange rate table - Currency rate - E.g. USD 1
HKD 0.13

How do I set PriceInUSD (substr (value, 5) * exchangeRate.Rate)

Post-text "itemprop =" text ">

You can use a sub query

  update stock set INUSD = (select substrost (stock, prix, 5) * Rate from the exchange where the substroke (stock .press, 1,3) = currency)  

No comments:

Post a Comment