where clauses | SQL Server Performance Forums

SQL Server Performance Forum – Threads Archive

where clauses

Hi How do i write a where clause for a SELECT query on a view like below: SELECT * FROM {VIEW} WHERE some of the fullname is contained within one of the column data in the database already. e.g. Name in database = "Drawing1"
Name in search criteria = "Drawing1_Draft" so i want to pick up the row relating to "Drawing1" with search criteria above???? CE
select * from VIEW
where CHARINDEX(fieldname, ‘Drawing1_Draft’) > 0 May do it. Regards, Robert.