Print Page | Close Window

Compare Strings...

Printed From: Web Wiz Forums
Category: General Discussion
Forum Name: Classic ASP Discussion
Forum Description: Discussion on Active Server Pages (Classic ASP).
URL: https://forums.webwiz.net/forum_posts.asp?TID=1791
Printed Date: 29 March 2026 at 8:40am
Software Version: Web Wiz Forums 12.08 - https://www.webwizforums.com


Topic: Compare Strings...
Posted By: pmormr
Subject: Compare Strings...
Date Posted: 12 April 2003 at 7:44pm
I have two strings (one in a database accessed using 'rs.fields("JokeName")' and one accessed using 'jn'). I want to compare these strings to test if they are simalar (notice i said simalar, like if jokename is 1 2 3 and jn is 3 then i want it the result to be true). Can anyone help?

-------------
Paul A Morgan

http://www.pmorganphoto.com/" rel="nofollow - http://www.pmorganphoto.com/



Replies:
Posted By: michael
Date Posted: 12 April 2003 at 9:28pm
well if the field just contain like 123 etc you can use the instring function of asp. but I guess your string may be more complex so, either the search in the database with LIKE or if you use sql you can use the sql server soundex function which you can use to get similar sounding words i.e. read and beat sound similar. Soundex will return how similar they are. But getting it from your fieldname Jokename the LIKE should be sufficient....

-------------
http://baumannphoto.com" rel="nofollow - Blog | http://mpgtracker.com" rel="nofollow - MPG Tracker


Posted By: pmormr
Date Posted: 13 April 2003 at 9:22am
Could i use this as "If jn LIKE jokename then ..."?

-------------
Paul A Morgan

http://www.pmorganphoto.com/" rel="nofollow - http://www.pmorganphoto.com/



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.08 - https://www.webwizforums.com
Copyright ©2001-2026 Web Wiz Ltd. - https://www.webwiz.net