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
 SQL Server 2000 Forums
 Transact-SQL (2000)
 patIndex question

Author  Topic 

bbasir
Yak Posting Veteran

76 Posts

Posted - 2008-04-23 : 19:11:22
patindex compares a string with a column in a databse table....

I need to compare column a in a table1 with column b in table 2

is there a wfunction where I could compare using column names.

basically I need a patindex like function which will compare two columns in one table or two different tables..

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2008-04-23 : 19:12:45
If the tables can be joined together, then patindex can still be used.

Otherwise, please provide a data example.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/
Go to Top of Page

chandan_joshi80
Starting Member

30 Posts

Posted - 2008-04-24 : 01:16:26
IN SQL SERVER PATINDEX USED TO FIND THE POSITION OF A CHARACTER IN A STRING.

SELECT * FROM TEMPTABLE2 T WHERE EXISTS (SELECT COL2 FROM TEMPTABLE2
WHERE COL2=T.COL2)
THIS TYPE OF SQL STATEMENT ALSO COMPARING TWO COLUMNS VALUES.

chandan Joshi
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-04-24 : 01:21:11
Post your full requirement with some sample data.
Go to Top of Page
   

- Advertisement -