Showing posts with label contain. Show all posts
Showing posts with label contain. Show all posts

Tuesday, March 20, 2012

Check for unicode within an ntext

Hey all,
I've got to check an ntext column if it actually does contain unicode characters or not. I would prefer to not have to iterate through every character in each column, is there a simple way to do this in sql server 2000?
Cheers,
-KilkaCAST or CONVERT it to text, and monitor for errors.|||That's a great idea, thanks Blindman.

Cheers,
-Kilka

Monday, March 19, 2012

check field

Hi, how to find out what table, field contain "mysearchtext" in side? Thanks
a lot.Check out the INFORMATION_SCHEMA system views for more info, but here's
something you can use fight now:
select INFORMATION_SCHEMA.[COLUMNS].TABLE_NAME
from INFORMATION_SCHEMA.[COLUMNS]
where (INFORMATION_SCHEMA.[COLUMNS].COLUMN_NAME = 'mysearchtext')
ML
http://milambda.blogspot.com/|||"js" <js@.someone.com> wrote in message
news:eLWFGf1TGHA.2656@.TK2MSFTNGP10.phx.gbl...
> Hi, how to find out what table, field contain "mysearchtext" in side?
> Thanks a lot.
You want to search through all tables and columns?
A combination of the undocumented stored procedure "sp_MSforeachtable",
this statement: select column_name from INFORMATION_SCHEMA.COLUMNS where
table_name = 'tableName'
a cursor,
dynamic SQL
and: select ... from tableName where columnName like '%mysearchtext%'|||Thanks ML,
How about search field content? hwo to do that?
"ML" <ML@.discussions.microsoft.com> wrote in message
news:C744B478-EE78-4378-9528-13106F88443C@.microsoft.com...
> Check out the INFORMATION_SCHEMA system views for more info, but here's
> something you can use fight now:
> select INFORMATION_SCHEMA.[COLUMNS].TABLE_NAME
> from INFORMATION_SCHEMA.[COLUMNS]
> where (INFORMATION_SCHEMA.[COLUMNS].COLUMN_NAME = 'mysearchtext')
>
> ML
> --
> http://milambda.blogspot.com/