Jump to content

Recommended Posts

Posted

I want to do a search for a string but I don't want to specify a column to search.

Is this possible?

SELECT * FROM Persons WHERE "any column"='Sandnes'

At the moment I'm getting all rows and doing a stringinStr() for each row but I'm hoping I can do it with the sql statement instead.

Thanks

Chris

Posted

I would imagine that your will have to structure your query for all Columns, e.g.

SELECT * FROM Persons WHERE (Column1 = 'Sandnes') or (Column2 = 'Sandnes') or (Column3 = 'Sandnes') ...

Thats how I would do it in any other SQL database

----[ SandyD ]---

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...