User Profile

Collapse

Profile Sidebar

Collapse
rswhitaker
rswhitaker
Last Activity: Jan 28 '15, 10:33 PM
Joined: Jan 28 '15
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Wow! Amazing thanks so much for your help, patience and for teaching me.
    See more | Go to post

    Leave a comment:


  • Okay, so this is what I have but it returns a single row with all null values.

    Code:
    SELECT 
    	[Chemical Name] AS chem_name,
    	[Amount] AS amt,
    	[Measurement] AS measure
    FROM 
    (SELECT
    	ROW_INDEX,
    	ATTRIBUTE_VALUE
    	FROM BAppspectable_value batv
    
    		INNER JOIN ACCOUNTING_AUDIT_TRAIL aat
    		ON aat.b1_per_id1 = batv.b1_per_id1
    		AND aat.b1_per_id2 = batv.b1_per_id2
    		AND
    ...
    See more | Go to post
    Last edited by Rabbit; Jan 28 '15, 10:26 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data. Second warning.

    Leave a comment:


  • I don't understand what aggregate function is being required by the PIVOT syntax. I am not aggregating anything. Also while I can create the columns using PIVOT, each of those columns needs different criteria to populate it from the source query.
    Forgive me... I'm just not getting it.
    See more | Go to post

    Leave a comment:


  • Need to eliminate nulls and group on row number

    I am struggling with some results in which I had to take values from a single column and derive separate columns. Now I have three columns and three rows that I wish to combine into a single row where the column RowNum is share. Any tips? The query and results are below.

    Code:
    SELECT DISTINCT
    	RowNum,
    	chem_name,
    	amt,
    	measure
    FROM
    	(SELECT DISTINCT
    	ROW_INDEX as RowNum,
    		CASE WHEN COLUMN_NAME
    ...
    See more | Go to post
    Last edited by Rabbit; Jan 28 '15, 06:53 PM. Reason: Please use [code] and [/code] tags when posting code or formatted data.
No activity results to display
Show More
Working...