garethtnash
asked on
Conversion failed when converting the varchar value 'default.asp?ID =' to data type int.
Help!!
I'm getting the following error --
my code is --
Thank you
I'm getting the following error --
Conversion failed when converting the varchar value 'default.asp?ID =' to data type int.
my code is --
select
CASE WHEN P.Title <> '' THEN P.Title ELSE N.Title END as Title,
CASE WHEN P.ID <> '' THEN 'default.asp?ID ='+P.ID+'&='+P.SEOLink ELSE N.AlternativeURL END as URL
from [dbo].[MYNavigation] N
LEFT Join dbo.MyPage P
on N.PageID = P.ID
Where N.Live = 'Y'
Order By NavOrder
Thank you
I just wanted to jump in and say you should be using parameterized queries. Unless you're doing some sort of manual examination, your SQL there is ripe for exploitation. You will be hacked - it's just a matter of time.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you