SQL VIEW

Rayne
Rayne used Ask the Experts™
on
Hello to All SQL Gurus,
Got a SQL server table that has just two columns - Amt1 and Amt2. Need to create a VIEW of this existing table like so that we have three more extra columns in addition to the amt1,amt2…..that gets created on fly…like
AdjustedRaw (Amt1+ Amt2)
AdjustedIN ((Amt1+ Amt2)*0.68)
AdjustedPut (Amt1+ Amt2)*0.2)

VIEW like this below:
Amt_1      Amt_2      AdjustedRaw      AdjustedIN      AdjustedOUT

So what the SQL server code to create this view?
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Senior .Net Developer
Commented:
create view my_view
as

select
amt_1,
amt_2,
Amt1+ Amt2 as AdjustedRaw,
((Amt1+ Amt2)*0.68) as AdjustedIN,
(Amt1+ Amt2)*0.2) as AdjustedPut
from table

Author

Commented:
thanks GED325 :)

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial