Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 3354

Populating a column with the result of a query from the same table

$
0
0

Hello good people,

 

I want to populate a column("APR_REV") in my table by using an SQL query on the same table. The query is:

 

select "REVENUE" FROM "MySCHEMA".MYTABLE"

WHERE "Month" = 'APRIL' group by "ID", "REVENUE" ;

 

Note that Month is of varchar type

 

I tried  many different queries with the below one showing most promise as it showed rows wffected in the result but nothing is printed in the column.

 

insert into "D063375"."MySCHEMA".MYTABLE"("APR_REV")

select "REVENUE" FROM "MySCHEMA".MYTABLE"

WHERE "Month" = 'APRIL' group by "ID", "REVENUE" ;

 

 

My question is, is it possible to do that? if yes any guidance on the how would be much appreciated as I'm a bit of a novice with HANA and SQL.


Viewing all articles
Browse latest Browse all 3354

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>