how to select specific year/mo from table stored as varchar(7) '2010/05' in query

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cheryl culwell
    New Member
    • Dec 2010
    • 4

    how to select specific year/mo from table stored as varchar(7) '2010/05' in query

    I have a table, let's call it table, with a variable as yearmonth defined as varchar(7) and entered data as '2010/05'. I need to write a 'view' to be used by a 3rd party software which will select data from table for a specific month - i.e. previous month this year - how can I select only those records?
  • JKing
    Recognized Expert Top Contributor
    • Jun 2007
    • 1206

    #2
    You can use a string function to separate the information. The following should be helpful left() and right()

    Comment

    Working...