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.
| Author |
Topic |
|
JASONPCS
Starting Member
2 Posts |
Posted - 2010-05-04 : 03:17:09
|
| Hi,I am trying to SELECT data from 2 tables where a field in one table is like a field in another.EG. Select * from STOCKTRAN where STOCKTRAN.REF LIKE ____PURCHTRAN.NumI know the above is not correct but im guessing similar.the ____ stands for 4 characters that are in front of the number in PURCHTRAN.num which are not in STOCKTRAN.REFAny help would be great,Cheers |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-05-04 : 03:53:26
|
| if you want to look for 4 specific preceding characters you can useLIKE '____' + p.Num------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
JASONPCS
Starting Member
2 Posts |
Posted - 2010-05-04 : 04:22:26
|
| Thanks a million! Bunch of legends! |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2010-05-04 : 04:28:02
|
| welcome------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|