Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.databases.ms-sqlserver    |    Notorious Rube Goldberg contraption    |    19,505 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 18,797 of 19,505    |
|    Tony Johansson to All    |
|    How do I write this sql statement    |
|    08 Dec 12 11:44:31    |
      From: johansson.andersson@telia.com              Hello!              In a field in the database called Cid we have a format like year-35-X       So in the database we can have numbers that can look like this.        2012-35-1       2012-35-2       ...       2012-35-56       2012-35-0145              If I want a select statement that return the largest number for X how can I       write this ?       So if we have 2012-35-0194 in the database field Cid I want to get back 195       ?              //Tony              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca