Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Like Statement

Status
Not open for further replies.

Steve95

MIS
Nov 3, 2004
265
US
Hi All

I am doing web stats and have url code where I am looking for lines which contain 2 words, so I the code I written is:
if {URL.field} like ['*redirect*','*tailoredextranet*'] then 1 else 0

But this is not bringing the correct resultset I need to see both (redirect and tailoredextranet) words in the url hence =1 else 0. So I need a 'and' statement somewhere....I dont know where..been a long hard day....

Please can you help....
tc

 
Try:

if {URL.field} like '*redirect*' and
{URL.field} like '*tailoredextranet*' then 1 else 0

Or you could use:

if instr({URL.field},'redirect') > 0 and
instr({URL.field},'tailordextranet') > 0 then 1 else 0

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top