access 資料庫 按日期類型查詢資料 報錯!,access日期

來源:互聯網
上載者:User

access 資料庫 按日期類型查詢資料 報錯!,access日期

<span style="font-size:18px;">select * from sv_JFVoucher  where isDelete=0  and  [date]>= '2015-1-20 0:00:00'  and  [date]<= '2015-1-20 0:00:00'   order by id desc</span>

 這條sql 語句在SqlServer08中執行是無錯誤的,可是在access資料庫中執行就報錯!

百度了一下,說把 

<span style="font-size:18px;">'2015-1-20 0:00:00'修改成#2015-1-20 0:00:00#</span>
</pre><p></p><pre>


<span style="font-size:18px;"><span style="background-color: rgb(240, 240, 240);">select * from sv_JFVoucher  </span></span>
<span style="font-size:18px;">where isDelete=0  and  [date]>= #2015-1-20 0:00:00#  and  [date]<= #2015-1-20 0:00:00#   order by id desc</span>

<span style="font-size:18px;">運行真的成功了,我剛接觸access,表示不解</span>

  

相關文章

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.