Wrox Programmer Forums
|
SQL Language SQL Language discussions not specific to a particular RDBMS program or vendor.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Language section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 30th, 2004, 04:56 AM
Registered User
 
Join Date: Dec 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default simple sql

How can i have an output like this??

HEM_PATIENT_ID :primary key

OutpuT:
First row: initial number values of the fields
Second row: average values of the fields

select * from (
                select HEM_LOKOSIT, HEM_NNS
        from LPMS.HEMOGRAMS
        where HEM_PATIENT_ID = 33
        union
        select AVG(HEM_LOKOSIT), AVG(HEM_NNS)
        from LPMS.HEMOGRAMS
        where HEM_PATIENT_ID = 33)
        order by HEM_LOKOSIT desc nulls last;
 
Old December 30th, 2004, 10:22 AM
Registered User
 
Join Date: Dec 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Help me please...
 
Old December 30th, 2004, 04:58 PM
Friend of Wrox
 
Join Date: Jan 2004
Posts: 303
Thanks: 0
Thanked 0 Times in 0 Posts
Default

can you post your table structure? Please tell us as much detail as possible. (describe your column names)
Thanks.
 
Old December 31st, 2004, 03:17 AM
Registered User
 
Join Date: Dec 2004
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
quote:Originally posted by shahchi1
 Thanks so much..I solved the problem...
 
Old December 31st, 2004, 11:49 AM
Friend of Wrox
 
Join Date: Nov 2003
Posts: 625
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to jemacc
Default

can you post your solution?

Jaime E. Maccou





Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple Question - SQL Statement mrideout BOOK: Beginning ASP.NET 1.0 2 January 11th, 2005 09:28 AM
Simple Udpate SQL Problem ank2go SQL Language 1 October 29th, 2004 09:51 PM
Very Simple SQL Question?? mrideout BOOK: Beginning ASP.NET 1.0 3 September 20th, 2004 08:07 PM
Simple SQL Question cjmarek Classic ASP Databases 1 July 10th, 2004 04:11 AM
Simple Question - SQL for retrieving different row wanda46 Access 5 June 9th, 2004 01:17 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.