Help!!!
I'm being driven mad with what I thought would have been a relatively straight forward query.

I have 2 linked servers, 1 to a local Access database (AccDB) the other to a remote SQLserver (SQLDB). The SQLDB gets updated with info from the AccDB frequently. This is executed from a job calling a stored procedure. To minimize processing etc. I wanted to use the following algorithm:-

GET 'LASTTIME' FROM SQLDB
GET EVERYTHING > LASTTIME FROM ACCDB
INSERT INTO SQLDB.

Being a bit of a novice at this, I thought this would be the easiest way to keep the SQLDB updated when the job ran, rather than pulling all the data over the network and using left join etc....(not allowed to amend the AccDB in any way)

I used a scroll cursor to 'FETCH INTO' a variable (@var) and thats when my first problem arose... I appear to lose the format of the date. I tried setting the format to DATETIME and VARCHAR but the date/time gets changed from 2005-02-28 10:27:22.000 to Feb 28 2005 10:27AM when assigned to a variable. I know the query returns the correct format before assignment.

Hopefully I'm doing something 'obvious' wrong.

Axel.