Results 1 to 2 of 2

Thread: Getting the first 4 digits

  1. #1
    Join Date
    Apr 2009
    Posts
    8

    Getting the first 4 digits

    Hello,
    I need to create a table from an exisiting table and columns.
    The source table has a column call assnyear of datatype number.
    The values in the assnyear are like 2004, 20033, 20082 . The length of these values in the source column is minimum of 4 and max of 5.
    I need to get only the first 4 digits. So in the above example I need to get 2004, 2003, 2008 into my new table.
    Can you please help with what SQL command to use?
    Thank you

  2. #2
    Join Date
    Sep 2002
    Posts
    5,938
    On which rdbms?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •