TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
narasiman rao
NA
519
769.8k
how to calculate the booking seats using sql server
Nov 27 2014 4:43 AM
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.
Reply
Answers (
1
)
Create Database cloning of existing database
Update a row with max effective date