so i've been working on a database in oracle for a booking system and I am trying to create dyanmic query results...

was just wondering if there is a way to create a query to add up all the seats in a arena with booking numbers (not necessarily the same booking number) assigned to them (meaning they are sold).

5 Years
Discussion Span
Last Post by JorgeM

Sure, shouldn't be too difficult. can you provide an example of the fields in this table or joined tables?

for example, let's say it is one table. and the booking numbers where in a field called bookingNum. If you wanted to count how many rows in the table had data in the bookingNum field, the query can look like this...

Asuming a Microsoft SQL Database table and bookingNum field contains null values where no value exist....

select count(bookingNum) from TABLE_NAME where bookingNum is not null

I am not sure about this query on Oracle. It should work, but the various SQL platforms have slight differences here and there. If there is a difference, it will be in the where portion of the query...

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.