Alright so I have a page that the user types in a date hits a button and a querystring is placed in my other page. I want this date that they typed to be placed into my sql statement. I am reading the querystring useing javascript at this point, but i cannot get it into my sql statement.
<!--
function querySt(ji) {
hu = window.location.search.substring(1);
gy = hu.split("&");
for (i=0;i<gy.length;i++) {
ft = gy[i].split("=");
if (ft[0] == ji) {
return ft[1];
}
}
}
var rundate = querySt("rundate");
document.write(rundate);
document.write("<br>");
-->
I was told to use a declare and set statement but i kept getting errors.. Any ideas I have been stuck on this for 2 days, im sure you all know how that feels.
selectdata= "SELECT............ Having dbo.BOOKINGS.BOOKED = CONVERT(INT, DATEADD(dd, DATEDIFF(dd, 0, '11-04-2010'), 0))+2