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).

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...

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.