Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.databases.ms-sqlserver > #1362
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | "Tony Johansson" <johansson.andersson@telia.com> |
| Newsgroups | comp.databases.ms-sqlserver |
| Subject | How do I write this sql statement |
| Date | Sat, 8 Dec 2012 11:44:31 +0100 |
| Organization | A noiseless patient Spider |
| Lines | 17 |
| Message-ID | <k9v5ml$7ln$1@dont-email.me> (permalink) |
| Mime-Version | 1.0 |
| Content-Type | text/plain; format=flowed; charset="iso-8859-1"; reply-type=original |
| Content-Transfer-Encoding | 7bit |
| Injection-Date | Sat, 8 Dec 2012 10:44:38 +0000 (UTC) |
| Injection-Info | mx04.eternal-september.org; posting-host="da50b8a0e4970e2b9711eebf9392fd1d"; logging-data="7863"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+wylIJT8qHtmD41s+iLtIC" |
| X-MimeOLE | Produced By Microsoft MimeOLE V6.0.6002.18463 |
| X-Newsreader | Microsoft Windows Mail 6.0.6002.18197 |
| Cancel-Lock | sha1:Ue78vnw6f7Ku9FmUCYWCDVimXo0= |
| X-Priority | 3 |
| X-MSMail-Priority | Normal |
| Xref | csiph.com comp.databases.ms-sqlserver:1362 |
Show key headers only | View raw
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
Back to comp.databases.ms-sqlserver | Previous | Next — Next in thread | Find similar
How do I write this sql statement "Tony Johansson" <johansson.andersson@telia.com> - 2012-12-08 11:44 +0100
Re: How do I write this sql statement rja.carnegie@gmail.com - 2012-12-08 03:37 -0800
Re: How do I write this sql statement "Tony Johansson" <johansson.andersson@telia.com> - 2012-12-08 14:31 +0100
Re: How do I write this sql statement "Bob Barrows" <reb01501@NOSPAMyahoo.com> - 2012-12-08 09:15 -0500
Re: How do I write this sql statement Erland Sommarskog <esquel@sommarskog.se> - 2012-12-08 16:50 +0100
Re: How do I write this sql statement bill <billmaclean1@gmail.com> - 2013-01-28 22:43 -0800
csiph-web