Hi All,
I have numbers Say from 1 to 100. (1,2,3,..25,50,51,52.......100)
In that 25 to 50 numbers are missing.
Then i have to display that record in foll format.
1-25,51-100
Can we show this in Sql.
plz give me sql query
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Pravin GhadgePosted Oct 3, 2012, 7:48 AM
I have to display the records in foll format:
Product Name Series No
ABC 1-25,51-100
PQR 200-250
XYZ 325-330
My concern is only with "Series No" Column.
Records in Table:
Name SeriesNo
ABC 1
ABC 2
PQR 200
PQR 201
.
.
My Query:
Select Name from [Table1] group By Name
But how should i display series in above format.
Shivanand ArurPosted Oct 3, 2012, 7:39 AM
Select numbers from yourTableName between 1 and 25
Select numbers from yourTableName between 51 and 100
If any query, then let me know.
Thanks