Quantcast
Channel: SCN : All Content - Data Services and Data Quality
Viewing all articles
Browse latest Browse all 4013

MS Access Date Criteria

$
0
0

Morning,

 

I'm hoping that someone out there can help.  I suspect the answer to this is very simple but it's eluding me.

 

I am currently writing a data flow in BO data Services Xi 3.1.  I am connected to an MS Access database using the ODBC driver for MS Access.  Unfortunately I cannot use another type of database as my users wish the data to stay in MS Access.

 

I'm being burnt by the fact that MS Access expects dates to be surrounded by # symbols not single quotes.

 

My data flow is submitting the SQL statement shown below

 

     DELETE FROM DPROD  WHERE WELL = 'C02' AND  CDDATE = '2015-03-01 00:00:00'

 

and it's failing because Access really wants the statement to be

 

     DELETE FROM DPROD  WHERE WELL = 'C02' AND  CDDATE = #2015-03-01 00:00:00#

 

I proved this yesterday by taking Data Services right out of the equation and putting the first SQL statement into MS Access directly.  It failed but when I changed it to use # it works.

 

So my question is this.  How do I get the Bus Obj Data Services job to submit SQL with dates sutrrounded by # rather than ' ?

 

There may be a much easier way of doing this - but surely , someone has come across this issue before and knows how best to fix it.

 

The answer mya be that I need to use a different driver.

 

If someone could please update this post with some suggestions I would be very grateful.

 

Thanks

Chris


Viewing all articles
Browse latest Browse all 4013

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>