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
<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
also, where referer '%google%' , referer '%msn%' return rows referer contained both google , msn in same row.
phil
More discussions in Getting Started
adobe
Comments
Post a Comment