DB2, date, time comparison of alternative methods

  1, 2004 for registered customers 
  SELECT CUSTOMERCODE FROM ST_BOOK WHERE SUBSTR (CAST (BOOKDATE AS CHAR (30)), 1,4) ='2004 ' 
  2, registered customers for 2004-12 
  SELECT CUSTOMERCODE FROM ST_BOOK WHERE SUBSTR (CAST (BOOKDATE AS CHAR (30)), 1,7) ='2004-12 ' 
  3, for registered customers 2004-12-4 
  SELECT CUSTOMERCODE FROM ST_BOOK WHERE SUBSTR (CAST) BOOKDATE AS CHAR (30)), 1,10) ='2004-12-4 ' 
  If the time format is also still can. 

Share and Enjoy: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Google
  • DZone
  • Netvouz
  • NewsVine
  • Technorati

You can follow any responses to this entry through the RSS 2.0 feed. You can leave a response, or trackback from your own site.

AddThis Social Bookmark Button

Tags: