Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Like '%' table.field "%" Then table.field

Author  Topic 

kiddblaze44
Starting Member

2 Posts

Posted - 2011-09-29 : 00:01:25
Is it possible to do the following type of statement? I am using Navicat for MYSQl to try and perform this operation. My goal is to have a case statement that will look at one field to see if contains part of another field. If so, then it will assign a group to that email address.

Case
When table.field LIKE '%' table.field '%' Then table.field
End

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-09-29 : 00:05:29
the below will work in SQL Server. I dunno about MYSQL

Case
When table.field LIKE '%' + table.field + '%' Then table.field
End

Also this is MS SQL Server forum. solutions given here are SQL server specific.
So please try your luck in mysql forums if above is not working for you

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

kiddblaze44
Starting Member

2 Posts

Posted - 2011-09-29 : 00:07:54
Thanks for your attention. I really appreciate it.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2011-09-29 : 00:08:51
welcome

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -