Can anybody tell me why the SQL query work number 1 works until I change it
in number 2 and move it to an ASP Page in FrontPage 2003? If I copy number 1
to a FrontPage 2003 ASP Page it works.

Number 1
SELECT Shipments.Shipper_Reference, Shipments.Consignee_Company,
Shipments.Consignee_Contact, Shipments.Consignee_Address1,
Shipments.Consignee_City, Shipments.Consignee_State,
Shipments.Consignee_PostalCode, Shipments.Consignee_Phone, Shipments.Country,
Shipments.Fuel_Surcharge, Shipments.Total,
Shipments.UserName, Shipments.ShipDate, Shipments.ServicePlaintext,
Packages.Tracking_Number,
Shipments.Business_Unit, Shipments.Shipping_Group
FROM Shipments INNER JOIN
Packages ON Shipments.ShipmentGUID =
Packages.ShipmentGUID
WHERE (Shipments.Business_Unit <> '') AND (Shipments.Shipping_Group <>
'') AND (Shipments.ShipDate BETWEEN CONVERT(DATETIME,
'2006-03-01 00:00:00', 102) AND CONVERT(DATETIME,
'2006-03-21 00:00:00', 102))
ORDER BY Shipments.Shipper_Reference, Shipments.ShipDate,
Shipments.ServicePlaintext


Number 2
SELECT Shipments.Shipper_Reference, Shipments.Consignee_Company,
Shipments.Consignee_Contact, Shipments.Consignee_Address1,
Shipments.Consignee_City, Shipments.Consignee_State,
Shipments.Consignee_PostalCode, Shipments.Consignee_Phone, Shipments.Country,
Shipments.Fuel_Surcharge, Shipments.Total,
Shipments.UserName, Shipments.ShipDate, Shipments.ServicePlaintext,
Packages.Tracking_Number,
Shipments.Business_Unit, Shipments.Shipping_Group
FROM Shipments INNER JOIN
Packages ON Shipments.ShipmentGUID =
Packages.ShipmentGUID
WHERE (Shipments.Business_Unit <> '') AND (Shipments.Shipping_Group <>
'') AND (Shipments.ShipDate BETWEEN CONVERT(DATETIME,
'::TxtStart::', 102) AND CONVERT(DATETIME,
'::TxtEnd::', 102))
ORDER BY Shipments.Shipper_Reference, Shipments.ShipDate,
Shipments.ServicePlaintext

Any Help!
Jim

Re: HELP ! HELP! SQL to ASP Page by Kevin

Kevin
Fri Mar 31 05:01:09 CST 2006

Hard to say for sure, but I would be suspicious of the DateTime part of the
query. For example, an empty string cannot be converted to a valid DateTime.

--
HTH,

Kevin Spencer
Microsoft MVP
Professional Numbskull

Show me your certification without works,
and I'll show my certification
*by* my works.

"hrider1@comcast.net" <hrider1comcastnet@discussions.microsoft.com> wrote in
message news:828B42EA-0DD1-4397-A6BA-973FF1EF3261@microsoft.com...
> Can anybody tell me why the SQL query work number 1 works until I change
> it
> in number 2 and move it to an ASP Page in FrontPage 2003? If I copy
> number 1
> to a FrontPage 2003 ASP Page it works.
>
> Number 1
> SELECT Shipments.Shipper_Reference, Shipments.Consignee_Company,
> Shipments.Consignee_Contact, Shipments.Consignee_Address1,
> Shipments.Consignee_City, Shipments.Consignee_State,
> Shipments.Consignee_PostalCode, Shipments.Consignee_Phone,
> Shipments.Country,
> Shipments.Fuel_Surcharge, Shipments.Total,
> Shipments.UserName, Shipments.ShipDate, Shipments.ServicePlaintext,
> Packages.Tracking_Number,
> Shipments.Business_Unit, Shipments.Shipping_Group
> FROM Shipments INNER JOIN
> Packages ON Shipments.ShipmentGUID =
> Packages.ShipmentGUID
> WHERE (Shipments.Business_Unit <> '') AND (Shipments.Shipping_Group <>
> '') AND (Shipments.ShipDate BETWEEN CONVERT(DATETIME,
> '2006-03-01 00:00:00', 102) AND CONVERT(DATETIME,
> '2006-03-21 00:00:00', 102))
> ORDER BY Shipments.Shipper_Reference, Shipments.ShipDate,
> Shipments.ServicePlaintext
>
>
> Number 2
> SELECT Shipments.Shipper_Reference, Shipments.Consignee_Company,
> Shipments.Consignee_Contact, Shipments.Consignee_Address1,
> Shipments.Consignee_City, Shipments.Consignee_State,
> Shipments.Consignee_PostalCode, Shipments.Consignee_Phone,
> Shipments.Country,
> Shipments.Fuel_Surcharge, Shipments.Total,
> Shipments.UserName, Shipments.ShipDate, Shipments.ServicePlaintext,
> Packages.Tracking_Number,
> Shipments.Business_Unit, Shipments.Shipping_Group
> FROM Shipments INNER JOIN
> Packages ON Shipments.ShipmentGUID =
> Packages.ShipmentGUID
> WHERE (Shipments.Business_Unit <> '') AND (Shipments.Shipping_Group <>
> '') AND (Shipments.ShipDate BETWEEN CONVERT(DATETIME,
> '::TxtStart::', 102) AND CONVERT(DATETIME,
> '::TxtEnd::', 102))
> ORDER BY Shipments.Shipper_Reference, Shipments.ShipDate,
> Shipments.ServicePlaintext
>
> Any Help!
> Jim
>
>
>