Link to home
Start Free TrialLog in
Avatar of MrTV
MrTVFlag for Thailand

asked on

change sql from my sql to postgres

The code below is work for mysql but not work on postgresql
How can I change it   plese help

ERROR:  column t.open does not exist
LINE 12: join helpertable h on  t.Open - t.Low-h.value >= 0  
                                ^

SELECT
t.Date,
t.name,
t.Open,
t.Low,
t.dif,
t.sellprice,
h.value,t.sellprice-t.open+h.value as profitc, (t.sellprice-t.open+h.value )*2 as profitt,
(t.sellprice-t.open+h.value )*2 *100*t.multi/t.open as percentProfittMul
FROM
sename t
join helpertable h on  t.Open - t.Low-h.value >= 0
ASKER CERTIFIED SOLUTION
Avatar of gheist
gheist
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
t.Open - t.Low-h.value >= 0
OPTIMIZED
t.Open - t.Low >= h.value