R
Rob Meade
Hi all,
As above really...I have the following SQL statement (I've dumped this from
my ASP page running it so it has some values, and I've moved it around to
try and prevent wrapping)...
SELECT
WebsiteID, WebsiteName, WebsiteDesc, WebsiteURL,
WebsiteMetaKeywords, WebsiteMetaDescription, 0 AS Relevance
FROM view_Websites
WHERE
(
' ' + WebsiteName + ' ' LIKE '% para% %' OR ' ' + WebsiteName + ' '
LIKE '% companies %'
OR ' ' + WebsiteName + ' ' LIKE '% ir35 %'
)
OR
(
' ' + WebsiteDesc + ' ' LIKE '% para% %' OR ' ' + WebsiteDesc + ' '
LIKE '% companies %'
OR ' ' + WebsiteDesc + ' ' LIKE '% ir35 %'
)
OR
(
' ' + WebsiteMetaKeywords + ' ' LIKE '% para% %'
OR ' ' + WebsiteMetaKeywords + ' ' LIKE '% companies %'
OR ' ' + WebsiteMetaKeywords + ' ' LIKE '% ir35 %'
)
OR
(
' ' + WebsiteMetaDescription + ' ' LIKE '% para% %'
OR ' ' + WebsiteMetaDescription + ' ' LIKE '% companies %'
OR ' ' + WebsiteMetaDescription + ' ' LIKE '% ir35 %'
)
AND WebsiteID = '1'
My problem is that I have at least one datatype of TEXT which doesn't seem
to happy with me trying to concatenate a space either end of the field.
I've tried putting it in brackets, I've tried using & instead of + but still
no joy...can some one please advise.
Many thanks for your reply, sorry if me reformatting the above hasn't
helped.
Regards
Rob
As above really...I have the following SQL statement (I've dumped this from
my ASP page running it so it has some values, and I've moved it around to
try and prevent wrapping)...
SELECT
WebsiteID, WebsiteName, WebsiteDesc, WebsiteURL,
WebsiteMetaKeywords, WebsiteMetaDescription, 0 AS Relevance
FROM view_Websites
WHERE
(
' ' + WebsiteName + ' ' LIKE '% para% %' OR ' ' + WebsiteName + ' '
LIKE '% companies %'
OR ' ' + WebsiteName + ' ' LIKE '% ir35 %'
)
OR
(
' ' + WebsiteDesc + ' ' LIKE '% para% %' OR ' ' + WebsiteDesc + ' '
LIKE '% companies %'
OR ' ' + WebsiteDesc + ' ' LIKE '% ir35 %'
)
OR
(
' ' + WebsiteMetaKeywords + ' ' LIKE '% para% %'
OR ' ' + WebsiteMetaKeywords + ' ' LIKE '% companies %'
OR ' ' + WebsiteMetaKeywords + ' ' LIKE '% ir35 %'
)
OR
(
' ' + WebsiteMetaDescription + ' ' LIKE '% para% %'
OR ' ' + WebsiteMetaDescription + ' ' LIKE '% companies %'
OR ' ' + WebsiteMetaDescription + ' ' LIKE '% ir35 %'
)
AND WebsiteID = '1'
My problem is that I have at least one datatype of TEXT which doesn't seem
to happy with me trying to concatenate a space either end of the field.
I've tried putting it in brackets, I've tried using & instead of + but still
no joy...can some one please advise.
Many thanks for your reply, sorry if me reformatting the above hasn't
helped.
Regards
Rob