Reputation: 1933
I need to return measurement data from a database. Unfortunatly the data is in a different quantity (kWatt, I need Watt) and want to do the transformation preferably in the SQL statement
So I want to multiple the measuremententry with 1000 in
SELECT measuremententry FROM log
Is this possible?
Thanks
Upvotes: 1
Views: 88
Reputation: 4673
SELECT measuremententry * 1000 FROM log
Works for me in PostGre, should work for you
Upvotes: 1
Reputation: 881653
How about something like:
SELECT kilowatts * 1000 as watts FROM log
Upvotes: 2