DBAsupport.com Forums - Powered by vBulletin
Results 1 to 3 of 3

Thread: values into columns

Threaded View

  1. #1
    Join Date
    Mar 2001
    Location
    south africa
    Posts
    401

    values into columns

    hello

    how do i change values into columns with out all the the blanks ..
    i have orderunits table(orderid number,value and name are varchar2).
    i tried case stmts and not getting results like below,meaning i get rows multiplied,for example in here i get total 25 rows but i should get total 15 or so

    Code:
    "CASE WHEN  fNAME='Units' then p.value else null END AS unit_name,"

    Code:
    Order_ID	UNIT_NAME	DATE_NAME
    30766600	1	
    30766600		090909
    30766600	1	
    30766600		090909

    any help is much appreciated

    thank you

    Code:
    ORDER_ID	VALUE	NAME
    30766600	090909	Date
    30766600	090909	Date
    30766600	090909	Date
    30766600	090709	Date
    30766600	090709	Date
    30766600	090609	Date
    30766600	090609	Date
    30766600	090509	Date
    30766600	090509	Date
    30766600	090509	Date
    30766600	090409	Date
    30766600	090409	Date
    30766600	090309	Date
    30766600	1	Units
    30766600	1	Units
    30766600	1	Units
    30766600	1	Units
    30766600	1	Units
    30766600	13	Units
    30766600	1	Units
    30766600	2	Units
    30766600	1	Units
    30766600	3	Units
    30766600	1	Units
    30766600	1	Units
    		
    		
    		
    		
    orderid	date	units
    30766600	090909	1
    30766600	090909	1
    30766600	090909	1
    30766600	090709	1
    30766600	090709	1
    30766600	090609	13
    30766600	090609	1
    30766600	090509	2
    30766600	090509	1
    30766600	090509	3
    30766600	090409	1
    30766600	090409	1
    30766600	090309	
    30766600	090409	
    30766600	090409	
    30766600	090309	
    30766600	090409
    Last edited by prodadmin; 03-15-2010 at 08:08 AM. Reason: code1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width