Guest User

Untitled

a guest
Jun 18th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.37 KB | None | 0 0
  1. select * from <table> where to_date(create_date) = to_date('20090506', 'YYYYMMDD')
  2.  
  3. <Table>.find_by_sql("select * from <table> where to_date(create_date) = to_date('20090506', 'YYYYMMDD')")
  4.  
  5. select * from <table> where create_date = to_date('20090506', 'YYYYMMDD')
  6.  
  7. Table.find_by_sql("
  8. select * from <table>
  9. where to_char(create_date, 'YYYY-MM-DD') = '2009-05-06'
  10. ")
Add Comment
Please, Sign In to add comment