Last post Jan 24, 2019 08:36 PM by yogyogi
Jan 24, 2019 07:28 AM|Adwin Jha|LINK
select ID,no,CDate,InTime,OutTime,AYN from App_COA where ANO='123456'
order by CDateselect name from app_name where no=no
I have two sql statement. The first sql statement will return these column "ID,no,CDate,InTime,OutTime,AYN " as per "ANO" . Now in second sql statement it will return a name as per "no" . These "no" will come after executing first sql statement. How I can
run both the statement parallel.
Jan 24, 2019 01:01 PM|mgebhard|LINK
Use a JOIN
select c.ID, c.no, c.CDate, c.InTime, c.OutTime, c.AYN, n.name
from App_COA as c
JOIN app_name a n ON c.no = n.no
order by CDate
Jan 24, 2019 08:36 PM|yogyogi|LINK
You can use sub query like this:
select name from app_name where no in (no from App_COA where ANO='123456' order by CDate)