Home All Groups Group Topic Archive Search About

is there a table function for first occurence of a string?

Author
1 Jul 2005 8:41 PM
Rich
If a table contains 120 columns and contains data that is about a specific
subject matter - is there a way to search for the first occurence of a string
like "bipap" or "bi pap"?  The thing is that you don't know what column would
contain this kind of text.  I guess I could search each column individually -
kind of time consuming.  But does sql server have a function to do a table
search?

Thanks,
Rich

Author
1 Jul 2005 9:38 PM
Alejandro Mesa
> does sql server have a function to do a table search?

No, It does not have this function.

Here is a link that shows how to accomplish this.

How to search all columns of all tables in a database for a keyword?
http://vyaskn.tripod.com/search_all_columns_in_all_tables.htm


AMB

Show quote
"Rich" wrote:

> If a table contains 120 columns and contains data that is about a specific
> subject matter - is there a way to search for the first occurence of a string
> like "bipap" or "bi pap"?  The thing is that you don't know what column would
> contain this kind of text.  I guess I could search each column individually -
> kind of time consuming.  But does sql server have a function to do a table
> search?
>
> Thanks,
> Rich
Author
1 Jul 2005 11:06 PM
Rich
Thanks for your reply and reference to the procedure to accomplish my task of
searching a table for a word.  I will give that procedure a try.

Rich

Show quote
"Alejandro Mesa" wrote:

> > does sql server have a function to do a table search?
>
> No, It does not have this function.
>
> Here is a link that shows how to accomplish this.
>
> How to search all columns of all tables in a database for a keyword?
> http://vyaskn.tripod.com/search_all_columns_in_all_tables.htm
>
>
> AMB
>
> "Rich" wrote:
>
> > If a table contains 120 columns and contains data that is about a specific
> > subject matter - is there a way to search for the first occurence of a string
> > like "bipap" or "bi pap"?  The thing is that you don't know what column would
> > contain this kind of text.  I guess I could search each column individually -
> > kind of time consuming.  But does sql server have a function to do a table
> > search?
> >
> > Thanks,
> > Rich

AddThis Social Bookmark Button