Thanks for all your feedback, but its still not solving this key problem which
is how to convert the following code into TSQL.
_____________________________________________________________
select *
from profiles
where 0=0
<cfif isdefined('form.firstname') and form.firstname neq ''>
and form.firstname='#form.firstname#'
</cfif>
_____________________________________________________________
Perhaps someone has a clean way of adding an IF statement to TSQL, i.e.
____________________________________________
@firstname (varchar 200)=null
select *
from profiles
where 0=0
IF @firstname is not null
and [EMAIL PROTECTED]
____________________________________________
It is only the if statement part that seems difficult to replicate.
I know we can check to make sure a variable is not null.
But I don't know how to check to see if it even exists.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Find out how CFTicket can increase your company's customer support
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49
Message: http://www.houseoffusion.com/lists.cfm/link=i:6:2147
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/6
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:6
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.6
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54