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
 Data Type Incompatibility with inner join

Author  Topic 

genius_palli
Starting Member

42 Posts

Posted - 2009-02-19 : 06:55:14
I am using Text and char data types with inner join.
But receiving an error message that char and text are incompatible with = operator.
Please suggest..

Regards
genius_palli

sridhar.dbe
Starting Member

34 Posts

Posted - 2009-02-19 : 07:04:10
hi,
try using like operator instead of =


isk
Go to Top of Page

genius_palli
Starting Member

42 Posts

Posted - 2009-02-19 : 07:07:44
Thanks for your reply..
But how can we use LIKE with inner join.. Because we always use ON with inner joins..
Could you please explain your point bit more..

Ill be highly grateful..

Regards
genius_palli
Go to Top of Page

sridhar.dbe
Starting Member

34 Posts

Posted - 2009-02-19 : 07:11:48
select s1.val,d1.val from s as s1
inner join d as d1 on d1.q like s1.a


quote:
Originally posted by genius_palli

Thanks for your reply..
But how can we use LIKE with inner join.. Because we always use ON with inner joins..
Could you please explain your point bit more..

Ill be highly grateful..

Regards
genius_palli




isk
Go to Top of Page

genius_palli
Starting Member

42 Posts

Posted - 2009-02-19 : 07:20:23
Thanks Sridhar
Using LIKE may not be possible in my case as the query is containing a number of inner joins. Rather i used CAST Method to convert my fields into varchar and that worked using ON with inner joins..
So thats what we were looking for.
Thanks again buddy. Keep in touch. Have a nice time.

Regards
genius_palli
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-02-19 : 09:24:11
are you using sql 2005 by any chance?
Go to Top of Page
   

- Advertisement -