Click here to Skip to main content
15,886,518 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a table with following fields:
TABLE dat(a int,dat date,freq int);
I want get a new value in ALIAS column by adding "dat" and "freq" data.

What I have tried:

I want get a new value in ALIAS column by adding "dat" and "freq" data.
I tried in following ways:
SQL
select a,dat,freq,date(dat,"+5 Year") as Due_Date from dat;

which working fine result is:
2|2020-01-01|3|2025-01-01

But my object is to add freq value in dat value so i tried as follow:
SQL
select a,dat,freq,date(dat,"+freq Year") as Due_Date from dat;

which is not giving result and remain result as:
2|2020-01-01|3


so I need to know how possibly method to get my required result.
Regards
Posted
Updated 10-May-21 20:36pm
v2

1 solution

I'd suggest to create computed column. Please, see: Can I create computed columns in SQLite? - Stack Overflow[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900