Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Display data flagged by one field

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
I have a database with several fields. I wish to display only those lines of data containing "888" in field "aircode" on one result page and on another page all the lines of data NOT containing "888". How could I write these scripts?
Any help in any direction would be grateful.

Thanks
 
SELECT * FROM databasetable WHERE line ilike '%888%';

SELECT * FROM databasetable WHERE line NOT ilike '%888%';

You can use ~* as well (instead of ilike) check out SQL pages. mcvdmvs
-- "It never hurts to help" -- Eek the Cat
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top