MVSFORUMS.com Forum Index MVSFORUMS.com
A Community of and for MVS Professionals
 
 FAQFAQ   SearchSearch   Quick Manuals   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Looking for SQL solution to odd query

 
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database
View previous topic :: View next topic  
Author Message
trvln_nole
Beginner


Joined: 31 Jul 2006
Posts: 2
Topics: 1

PostPosted: Mon Jul 31, 2006 12:06 pm    Post subject: Looking for SQL solution to odd query Reply with quote

I am trying to combine mutilple rows (no guarentee on how many rows) into a single record result.

My table is:
Code:

Acct      Date       Action
0001     7/31/06   Sign-In
0001     7/31/06   Work
0001     7/31/06   Lunch
0001     7/31/06   Siesta
0001     7/31/06   Sign-Out
0002     7/31/06   Sign-In
0002     7/31/06   Work
0002     7/31/06   Out Sick

Result should be:
Code:

0001     7/31/06   Sign-In  Work    Lunch    Siesta  Sign-Out
0002     7/31/06   Sign-In  Work    Out Sick


Any help would be appreciated
Back to top
View user's profile Send private message
coolman
Intermediate


Joined: 03 Jan 2003
Posts: 283
Topics: 27
Location: US

PostPosted: Mon Jul 31, 2006 1:23 pm    Post subject: Reply with quote

What's the max. no of rows expected on an acct per day?
________
Mercury Topaz history


Last edited by coolman on Sat Feb 05, 2011 1:45 am; edited 1 time in total
Back to top
View user's profile Send private message
trvln_nole
Beginner


Joined: 31 Jul 2006
Posts: 2
Topics: 1

PostPosted: Tue Aug 01, 2006 3:26 pm    Post subject: Reply with quote

Coolman,

I was expecting at most 7 per day, out of 13 possible actions.

It needs to be a stand alone Query I can run under SPUFI or some other SQL tool.

While I did come up with an answer, I would like a second opinion.
Back to top
View user's profile Send private message
coolman
Intermediate


Joined: 03 Jan 2003
Posts: 283
Topics: 27
Location: US

PostPosted: Wed Aug 02, 2006 3:53 pm    Post subject: Reply with quote

Quote:

It needs to be a stand alone Query I can run under SPUFI or some other SQL tool.

While I did come up with an answer, I would like a second opinion.



Was your answer a query or did you use a stored proc to solve this?
________
full melt bubble hash


Last edited by coolman on Sat Feb 05, 2011 1:46 am; edited 1 time in total
Back to top
View user's profile Send private message
js01
Beginner


Joined: 13 Oct 2005
Posts: 84
Topics: 32
Location: INDIA

PostPosted: Wed Aug 23, 2006 6:30 pm    Post subject: Reply with quote

Hi,

I have same requirement ,can any one post me the query please.


thank you
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    MVSFORUMS.com Forum Index -> Database All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


MVSFORUMS
Powered by phpBB © 2001, 2005 phpBB Group