ChrisL Posted March 20, 2007 Posted March 20, 2007 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.ThanksChris [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire
CrewXp Posted March 20, 2007 Posted March 20, 2007 Granted your table and database names are correct, that's the correct syntax to use in sql.
sandyd Posted March 20, 2007 Posted March 20, 2007 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 ]---
ChrisL Posted March 20, 2007 Author Posted March 20, 2007 Thank you, you are correct I seem to have to specify each column name with the OR statement [u]Scripts[/u]Minimize gui to systray _ Fail safe source recoveryMsgbox UDF _ _procwatch() Stop your app from being closedLicensed/Trial software system _ Buffering Hotkeys_SQL.au3 ADODB.Connection _ Search 2d Arrays_SplashTextWithGraphicOn() _ Adjust Screen GammaTransparent Controls _ Eventlogs without the crap_GuiCtrlCreateFlash() _ Simple Interscript communication[u]Websites[/u]Curious Campers VW Hightops Lambert Plant Hire
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now