...

View Full Version : Search string in database field



Kal
02-13-2006, 05:17 PM
Hi,

Is it possible to search for a particular string within a database field,

for example string = 'Program Finished' field name = 'Output'

if so how?

Any help would be good.

Thanks in advance.

Kid Charming
02-13-2006, 05:36 PM
SELECT
column
FROM
table
WHERE
output LIKE '%Program Finished%'


The above will return all rows where the output column contains the string anywhere within it. The LIKE keyword indicates a non-exact search, and the '%' characters are wildcards that let the database know that there can be any number of unknown characters before or after the string you're searching for.

Kal
02-13-2006, 05:44 PM
thanks for that, i'll have a go at it.

degsy
02-14-2006, 03:19 PM
more info
http://www.w3schools.com/sql/sql_where.asp



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum