Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
1
Reply
how to calculate the booking seats using sql server
narasiman rao
Nov 27 2014 4:43 AM
676
Reply
i have two query as follows
select top 1 Total_Seats from batch_seats where cbm_batch_id ='B5176 '
When i run the above query output as follows
Total_Seats
24
select top 1 Avil_seats from batch_seats where cbm_batch_id = 'B5176'
When i run the above query output as follows
Avil_seats
6
Using the above two query i want output as follows
Booked Seats
18 (Total_Seats 24 - Avil_seats 6)
for getting output 18 how can i write the query.
Please help me.
Regards,
Narasiman P.
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
Create Database cloning of existing database
Update a row with max effective date