I don't 100% understand your tables. Where does ID come from (the values 1 &
2 exist in the first view, but 1,2,3,4 in the second).

Are the totals derived?

Give me the SQL for the first view and I'll have a look.

Paul

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Sent: 08 April 2005 14:46
> To: Struts Users Mailing List
> Subject: [OT] How to transpose a table in MS SQL Server 2000
> 
> 
> So, I have the following table:
> 
> id      month   val1    val2    total
> 1       jan     1       2       3
> 2       feb     3       4       7
> 
> And I'd like it transformed to:
> 
> ID      VAL     COL1    COL2
> 1       month   jan     feb
> 2       val1    1       3 
> 3       val2    2       4
> 4       total   3       7
> 
> I'm guessing that it's possible, as I've seen variants of 
> this type of 
> tranformation.  I have googled this, but the solutions (I've 
> found) are 
> considerably more complicated and revolve around 
> summing/aggregating, when 
> I just need to change the structure of the results. 
> 
> Has anybody seen a solution that fits this problem?
> 
> Thanks,
> Dennis
> 
> 
> 
> 
> [EMAIL PROTECTED] 
> 04/08/2005 09:26 AM
> Please respond to
> "Struts Users Mailing List" <user@struts.apache.org>
> 
> 
> To
> "Struts Users Mailing List" <user@struts.apache.org>
> cc
> 
> Subject
> [OT] RE: concurrency problem
> 
> 
> 
> 
> 
> 
> As I hit the send button, something tickled in the back of my 
> mind, and I 
> began to remember that the spec forbids thread primitiives on 
> bean methods 
> 
> and that the EJB container is responsible for handling 
> concurrent access. 
> Sounds like your provider might have a defect.
> 
> Dennis
> 
> 
> 
> 
> 
> [EMAIL PROTECTED] 
> 04/08/2005 09:13 AM
> Please respond to
> "Struts Users Mailing List" <user@struts.apache.org>
> 
> 
> To
> "Struts Users Mailing List" <user@struts.apache.org>
> cc
> 
> Subject
> RE: concurrency problem
> 
> 
> 
> 
> 
> 
> You're synchronizing on an object which is unique for each 
> user, which 
> might explain why more than 1 thread can concurrently enter 
> the critsec. 
> Wouldn't a better solution be to declare the method as synchronized?
> 
> Dennis
> 
> 
> 
> 
> 
> "Kalra, Ashwani" <[EMAIL PROTECTED]> 
> 04/08/2005 08:53 AM
> Please respond to
> "Struts Users Mailing List" <user@struts.apache.org>
> 
> 
> To
> "Struts Users Mailing List" <user@struts.apache.org>
> cc
> 
> Subject
> RE: concurrency problem
> 
> 
> 
> 
> 
> 
> 
> Isnt that valid when request is going to same action. In my scenario, 
> different actions are invoked quickly and all the actions 
> have this call 
> to SFSB.   Which I want to synchronise
> 
> Thanks & Regds
>  Ashwani
> 
> Ext: 1860
> 
> 
> 
> 
> 
> 
> 
> > -----Original Message-----
> > From: James Mitchell [mailto:[EMAIL PROTECTED]
> > Sent: Friday, April 08, 2005 6:04 PM
> > To: Struts Users Mailing List
> > Subject: Re: concurrency problem
> >
> 
> >
> 
> > You'd be better off implementing token processing.
> >
> 
> > Struts includes token generation and helper methods to ensure
> 
> > only one valid
> 
> > request is handled at a time.  Look at the struts example 
> application
> 
> > (mailreader) for an example.
> >
> 
> > For detailed info on why this pattern works, see:
> > http://www.amazon.com/exec/obidos/tg/detail/-/0201634988/ref=l
> > pr_g_1/102-8250064-5792120?v=glance&s=books
> >
> 
> >
> 
> >
> 
> >
> 
> > --
> > James Mitchell
> > Software Engineer / Open Source Evangelist
> > Consulting / Mentoring / Freelance
> > EdgeTech, Inc.
> > 678.910.8017
> > AIM:   jmitchtx
> > Yahoo: jmitchtx
> > MSN:   [EMAIL PROTECTED]
> >
> 
> >
> 
> >
> 
> >
> 
> > ----- Original Message -----
> 
> > From: "Kalra, Ashwani" <[EMAIL PROTECTED]>
> > To: "Struts (E-mail)" <user@struts.apache.org>
> > Sent: Friday, April 08, 2005 7:10 AM
> > Subject: concurrency problem
> >
> 
> >
> 
> >
> 
> > I am facing concurrency problem in following scenario.
> >
> 
> > All our action classes call same stateful session bean . 
> 
> > Each action class
> 
> > obtains the reference  from HTTPSession object and calls one
> 
> > and only one
> 
> > business method.
> > To prevent the concurrent access to this instance which
> 
> > occurs when user
> 
> > immediately presses two links quickly in succession I am
> 
> > using the following
> 
> > code block
> >
> 
> >
> 
> > execute(...)  //execute methods of Action class
> > {
> > ....
> > ....
> >
> 
> > //Obtain the session from  Request.User will always be in 
> session here
> > session=request.getSession()
> > Synchronised(session)
> > {
> >     //call ejb's  business method.
> > }
> >
> 
> > }
> >
> 
> > However sometimes  more than one thread is able to pass
> 
> > through, And I get
> 
> > exception from Appserver. As 2 threads are not allowed for
> 
> > statefull Session
> 
> > bean.
> > Can there be problem in above code. Is it ok to synchronise
> 
> > on session
> 
> > object.
> >
> 
> >
> 
> >
> 
> >
> 
> >
> 
> > Thanks & Regds
> >  Ashwani
> >
> 
> > Ext: 1860
> >
> 
> >
> 
> >
> 
> >
> 
> >
> 
> >
> 
> >
> 
> > This message contains information that may be privileged or
> 
> > confidential and
> 
> > is the property of the Capgemini Group. It is intended only
> 
> > for the person
> 
> > to whom it is addressed. If you are not the intended
> 
> > recipient,  you are not
> 
> > authorized to read, print, retain, copy, disseminate, 
> 
> > distribute, or use
> 
> > this message or any part thereof. If you receive this 
> 
> > message in error,
> 
> > please notify the sender immediately and delete all  copies
> 
> > of this message.
> >
> 
> >
> 
> >
> 
> > 
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> 
> >
> 
> 
> This message contains information that may be privileged or 
> confidential 
> and is the property of the Capgemini Group. It is intended 
> only for the 
> person to whom it is addressed. If you are not the intended 
> recipient, you 
> 
> 
> are not authorized to read, print, retain, copy, disseminate, 
>  distribute, 
> 
> 
> or use this message or any part thereof. If you receive this  
> message in 
> error, please notify the sender immediately and delete all  
> copies of this 
> 
> 
> message.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> 
> 

Axios Email Confidentiality Footer
Privileged/Confidential Information may be contained in this message. If you 
are not the addressee indicated in this message (or responsible for delivery of 
the message to such person), you may not copy or deliver this message to 
anyone. In such case, you should destroy this message, and notify us 
immediately. If you or your employer does not consent to Internet email 
messages of this kind, please advise us immediately. Opinions, conclusions and 
other information expressed in this message are not given or endorsed by my 
Company or employer unless otherwise indicated by an authorised representative 
independent of this message.
 
WARNING:
While Axios Systems Ltd takes steps to prevent computer viruses from being 
transmitted via electronic mail attachments we cannot guarantee that 
attachments do not contain computer virus code.  You are therefore strongly 
advised to undertake anti virus checks prior to accessing the attachment to 
this electronic mail.  Axios Systems Ltd grants no warranties regarding 
performance use or quality of any attachment and undertakes no liability for 
loss or damage howsoever caused.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to