Gossamer Forum
Home : General : Databases and SQL :

Making SQL Query problem

Quote Reply
Making SQL Query problem
ok, heres the problem I have.

I have 2 table, one called 'Property' and the other 'Booking'.

Property has the column 'PropertyID' containing the values '1','2','3','4' and '5'

Booking has a FK 'PropertyID' containing the values '1','1','2' and '2'

I want to make a query to return the values '3','4' and '5'. Returning '1' and '2' is simple, but cant find how to return the inverse of this. Can anyone help?????
Quote Reply
Re: [marco-marco] Making SQL Query problem In reply to
Maybe this?

SELECT UNIQUE(PropertyID) FROM Property,Booking

?

Cheers

Andy (mod)
andy@ultranerds.co.uk


IMPORTANT: I've now moved to ultranerds.co.uk, and the .com will no longer work!
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package (plugins total "value" $3,325 & rising, for just $350)| GLinks ULTRA Package PRO (plugins total "value" $5,625 & rising, for just $500)
Support Forum | Links SQL Plugins | DMOZ Dumps | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Compare our different Plugin packages *new* Free CSS Templates