SQL question


hi trying "like" find string in clause. works fine this:
<cfquery name="qrysales" datasource="mydatasource" >
select referer, visit, id
from clientinfo
where referer '%google%'
</cfquery>

but trying various , set them aliases:

<cfquery name="qrysales" datasource="mydatasource" >
select referer, visit, id
from clientinfo
where referer '%google%' google
and referer '%msn%' msn
</cfquery>

but error:
you have error in sql syntax; check manual corresponds mysql server version right syntax use near 'as google , referer '%msn%' msn' @ line 3

i doing right? syntax? tia

why on earth try create alias parameter in clause? expecting alias?

also, where referer '%google%' , referer '%msn%' return rows referer contained both google , msn in same row.


phil


More discussions in Getting Started


adobe

Comments

Popular posts from this blog

VIDIOC_S_FMT error 16, Device or resource busy - Raspberry Pi Forums

using a laptop skeleton to build a pi laptop - Raspberry Pi Forums

Forum for Joomla? - Joomla! Forum - community, help and support