Click here to Skip to main content
15,917,926 members
Home / Discussions / Database
   

Database

 
GeneralRe: How to replace string with stuff ? Pin
Richard Deeming16-Jul-13 1:50
mveRichard Deeming16-Jul-13 1:50 
AnswerRe: How to replace string with stuff ? Pin
Mycroft Holmes16-Jul-13 12:44
professionalMycroft Holmes16-Jul-13 12:44 
QuestionMounting .DBF files (Oracle Database 11g) Pin
prathameshpitale15-Jul-13 5:33
prathameshpitale15-Jul-13 5:33 
AnswerRe: Mounting .DBF files (Oracle Database 11g) Pin
Maciej Los29-Jul-13 23:46
mveMaciej Los29-Jul-13 23:46 
GeneralRe: Mounting .DBF files (Oracle Database 11g) Pin
prathameshpitale30-Jul-13 5:40
prathameshpitale30-Jul-13 5:40 
QuestionORA-12560 TNS : protocol adapter error; ORA-1033 Oracle initialization or shutdown in progress Pin
prathameshpitale15-Jul-13 5:33
prathameshpitale15-Jul-13 5:33 
QuestionHow to find ladder in sql query Pin
Member 356741115-Jul-13 2:02
Member 356741115-Jul-13 2:02 
AnswerRe: How to find ladder in sql query Pin
Niral Soni15-Jul-13 5:00
Niral Soni15-Jul-13 5:00 
How do you define ladder for the last value??
i.e. how do you get 24 in last row??

Apart from that, required query is -
SQL
SELECT COL1, NVL2(NEXT_COL1, COL1 || '--' || (NEXT_COL1 - 1), NULL) COL2 
FROM (
  SELECT COL1
        ,LEAD(COL1, 1, NULL) OVER (ORDER BY COL1) AS NEXT_COL1 
    FROM (SELECT LEVEL*5 COL1 FROM DUAL CONNECT BY LEVEL < 5) 
  )
;

And the output will be -
COL1	COL2
5	5--9
10	10--14
15	15--19
20	NULL

Thanks & Regards,
Niral Soni

AnswerRe: How to find ladder in sql query Pin
karna from Hyderabad22-Jul-13 21:01
karna from Hyderabad22-Jul-13 21:01 
Questiondatabase course Pin
V.14-Jul-13 22:32
professionalV.14-Jul-13 22:32 
AnswerRe: database course Pin
Eddy Vluggen15-Jul-13 0:30
professionalEddy Vluggen15-Jul-13 0:30 
GeneralRe: database course Pin
V.15-Jul-13 1:30
professionalV.15-Jul-13 1:30 
QuestionFIlestream of varbinary ? ( To Store files) Pin
Amol_B14-Jul-13 21:22
professionalAmol_B14-Jul-13 21:22 
AnswerRe: FIlestream of varbinary ? ( To Store files) Pin
Richard MacCutchan14-Jul-13 22:29
mveRichard MacCutchan14-Jul-13 22:29 
AnswerRe: FIlestream of varbinary ? ( To Store files) Pin
Mycroft Holmes14-Jul-13 22:42
professionalMycroft Holmes14-Jul-13 22:42 
GeneralRe: FIlestream of varbinary ? ( To Store files) Pin
Amol_B14-Jul-13 22:58
professionalAmol_B14-Jul-13 22:58 
Questionneed an sql query to extract results in the attached format Pin
vijays.30198914-Jul-13 3:40
vijays.30198914-Jul-13 3:40 
Questionbackup in sqllocaldb Pin
dharmaa.m12-Jul-13 7:57
dharmaa.m12-Jul-13 7:57 
AnswerRe: backup in sqllocaldb Pin
NotPolitcallyCorrect12-Jul-13 8:36
NotPolitcallyCorrect12-Jul-13 8:36 
GeneralRe: backup in sqllocaldb Pin
dharmaa.m12-Jul-13 10:03
dharmaa.m12-Jul-13 10:03 
QuestionMysql query with date conditions not working in server Pin Pin
ven75312-Jul-13 4:11
ven75312-Jul-13 4:11 
GeneralRe: Mysql query with date conditions not working in server Pin Pin
Eddy Vluggen12-Jul-13 4:52
professionalEddy Vluggen12-Jul-13 4:52 
SuggestionDatabse for broadcasting company Pin
aman wangde11-Jul-13 12:34
aman wangde11-Jul-13 12:34 
GeneralRe: Databse for broadcasting company Pin
Eddy Vluggen12-Jul-13 7:57
professionalEddy Vluggen12-Jul-13 7:57 
QuestionExport data in SQL 2008 Pin
vkEE11-Jul-13 9:05
vkEE11-Jul-13 9:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.