wizhippo Posted September 22, 2010 Share Posted September 22, 2010 I have a query that is a number of unions that pull data from multiple tables.SELECT 'CURRENT_YEAR' AS D, GLNAME, AMOUNT FROM ....UNIONSELCT 'PREVIOUS_YEAR' AS D, GLNAME, AMOUNT FROM ...UNIONSELECT 'PLAN' AS D, GLNAME, AMOUNT FROM ....I want to create 'AMOUNT' columns based on the 'D' columnsI can do this with a cross tab easy enough. The issue is I need calculated columns based on D and the AMOUNT.eg:CURRENT_YEAR, PREVIOUS_YEAR, PLAN, CURRENT_YEAR-PLAN, CURRENT_YEAR-PREVIOUS_YEAR Any ideas on how to do this? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now