Click here to Skip to main content
14,022,546 members
   

Database

 
GeneralRe: Help with simple database Pin
Mycroft Holmes15-Mar-19 14:57
memberMycroft Holmes15-Mar-19 14:57 
QuestionOracle database USER and SCHEMA [SOLVED] Pin
Valentinor11-Mar-19 9:16
memberValentinor11-Mar-19 9:16 
AnswerRe: Oracle database USER and SCHEMA Pin
CHill6012-Mar-19 22:45
protectorCHill6012-Mar-19 22:45 
GeneralRe: Oracle database USER and SCHEMA Pin
Valentinor13-Mar-19 1:30
memberValentinor13-Mar-19 1:30 
GeneralRe: Oracle database USER and SCHEMA Pin
CHill6013-Mar-19 2:23
protectorCHill6013-Mar-19 2:23 
GeneralRe: Oracle database USER and SCHEMA Pin
Valentinor13-Mar-19 3:04
memberValentinor13-Mar-19 3:04 
AnswerRe: Oracle database USER and SCHEMA Pin
Eddy Vluggen13-Mar-19 0:59
mveEddy Vluggen13-Mar-19 0:59 
QuestionDisplaying multiple rows into single row as columns based on id - Sql Server Pin
Member 111541886-Mar-19 20:18
memberMember 111541886-Mar-19 20:18 
Hello Friends,

my requirement is, I have table with following fields EmpID,RequestNo,RequestDate,RequestType,RequestStatus.

Now, I need to fetch the top 2 rows of the employee based on the employee ID with request date desc, and should display data of these 2 rows into 1 row with the fields:

I have query to fetch only top 2 rows, now I should know how to display that 2 rows into single rows with columns.

EmpID
Current ReqNo
Current ReqDate
Current ReqType
Current ReqStatus
Previous ReqNo
Previous ReqDate
Previous ReqType
Previous ReqStatus

Kindly help, I googled and found Pivot, but I am not getting exact result.

Thank you so much,
Best Regards,
Priya.
SuggestionRe: Displaying multiple rows into single row as columns based on id - Sql Server Pin
CHill606-Mar-19 21:47
protectorCHill606-Mar-19 21:47 
AnswerRe: Displaying multiple rows into single row as columns based on id - Sql Server Pin
Victor Nijegorodov6-Mar-19 21:52
memberVictor Nijegorodov6-Mar-19 21:52 
GeneralRe: Displaying multiple rows into single row as columns based on id - Sql Server Pin
Member 111541886-Mar-19 23:24
memberMember 111541886-Mar-19 23:24 
AnswerRe: Displaying multiple rows into single row as columns based on id - Sql Server Pin
Richard Deeming6-Mar-19 22:08
mveRichard Deeming6-Mar-19 22:08 
GeneralRe: Displaying multiple rows into single row as columns based on id - Sql Server Pin
Member 111541886-Mar-19 23:21
memberMember 111541886-Mar-19 23:21 
GeneralRe: Displaying multiple rows into single row as columns based on id - Sql Server Pin
Mycroft Holmes7-Mar-19 10:50
memberMycroft Holmes7-Mar-19 10:50 
QuestionHelp me with caculate debit balace and incredit by SQL server 2012 Pin
Member 141737536-Mar-19 19:08
memberMember 141737536-Mar-19 19:08 
Rant[REPOST] Help me with caculate debit balace and incredit by SQL server 2012 Pin
Richard Deeming6-Mar-19 21:58
mveRichard Deeming6-Mar-19 21:58 
QuestionSQL Access: Calculate the total elimination of records not the same month and year ? Pin
Member 24584674-Mar-19 21:26
memberMember 24584674-Mar-19 21:26 
QuestionQuery Question Pin
milo-xml1-Mar-19 2:14
professionalmilo-xml1-Mar-19 2:14 
AnswerRe: Query Question Pin
Afzaal Ahmad Zeeshan1-Mar-19 3:19
mveAfzaal Ahmad Zeeshan1-Mar-19 3:19 
GeneralRe: Query Question Pin
milo-xml1-Mar-19 5:31
professionalmilo-xml1-Mar-19 5:31 
GeneralRe: Query Question Pin
Afzaal Ahmad Zeeshan1-Mar-19 7:46
mveAfzaal Ahmad Zeeshan1-Mar-19 7:46 
GeneralRe: Query Question Pin
milo-xml1-Mar-19 8:05
professionalmilo-xml1-Mar-19 8:05 
AnswerRe: Query Question Pin
Eddy Vluggen1-Mar-19 7:46
mveEddy Vluggen1-Mar-19 7:46 
GeneralRe: Query Question Pin
milo-xml1-Mar-19 8:03
professionalmilo-xml1-Mar-19 8:03 
GeneralRe: Query Question Pin
Eddy Vluggen1-Mar-19 8:51
mveEddy Vluggen1-Mar-19 8:51 

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.


Advertise | Privacy | Cookies | Terms of Service
Web06 | 2.8.190417.4 | Last Updated 18 Apr 2019
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid