I need to do a query or join from two tables, but rather than a straight equal, I need SQL to "search" the field looking for text from the other table.
I have:
Table a:
TableName SQL
A CREATE INDEX [idx_account_id] ON [dbo].[COUNTY] ( [ACCOUNT_ID] ASC ) WITH ( PAD_INDEX = ON, ALLOW_PAGE_LOCKS = ON, ALLOW_ROW_LOCKS = ON, STATISTICS_NORECOMPUTE = OFF ,FILLFACTOR = 60 ,DROP_EXISTING = ON ) ON [PRIMARY]
In table b I have:
Table Column
A ACCOUNT_ID
I need to do a query or join from tableb.column to tablea.sql.
I was thinking of
SELECT * FROM tablea, tableb where tablea.tablename = tableb.tablename and CHARINDEX(strcolumn,IndexCreateSQL)>0
But that does not work.