DBTYPE_DBTIMESTAMP to DATETIME Error

  • Thread starter Thread starter Pooja Budhraja
  • Start date Start date
P

Pooja Budhraja

Hi

I am trying to execute this query in sql server.Our linked server is Access
2000 database.

SELECT a.PID, b.BSD
FROM compassdb...Order_PhoneNumber a LEFT JOIN
compassdb...Order_TrackingDates b
ON (a.OIDStart = b.OID) AND (a.[IN] = b.[IN]) and b.BSD <> Null

I think the problem is with BSD which is of datetime data type in Access.

The error that I get is :

"Error converting data type DBTYPE_DBTIMESTAMP to DATETIME"

Thanks
Pooja
 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Not sure that what you're trying to accomplish is possible. So, on a
purely SQL syntax evaluation ...

Remove "and b.BSD <> NULL" from the ON clause. Instead, put "b.BSD IS
NOT NULL" in a WHERE clause.

To check for nullity use

column_name IS NOT NULL

not

column_name <> NULL

--
MGFoster:::mgf00 <at> earthlink <decimal-point> net
Oakland, CA (USA)

-----BEGIN PGP SIGNATURE-----
Version: PGP for Personal Privacy 5.0
Charset: noconv

iQA/AwUBQUDsQoechKqOuFEgEQIopwCdEkUbUj5w2/h8g4fdIm5zwxpsFN4An3s5
YBOcB47XTso+s/wNIJmZQh/Y
=4wKL
-----END PGP SIGNATURE-----
 
Back
Top