DBTYPE_DBTIMESTAMP to DATETIME Error

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
 
M

MGFoster

-----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-----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top