on 2014 Nov 27 1:54 PM
I have a sql that return these columns.
Material---Description---Price---Type ------------------------------------- Test1--------Desc1--------21----Ak1-- Test1--------Desc1--------29----Ak2-- Test1--------Desc1--------31----Ak3-- Test1--------Desc1--------41----Ak4-- Test2--------Desc2--------12----Ak1-- Test2--------Desc2--------22----Ak2-- Test2--------Desc2--------31----Ak3-- Test2--------Desc2--------51----Ak4--
My question is, if it can take values from a colum and make these values to new columns and take a value from a second column to these new columns. Values for the new columns are price column. Like this:
Material---Description---Ak1---Ak2---Ak3---Ak4 ---------------------------------------------- Test1--------Desc1-------21----29----31----41- Test2--------Desc2-------12----22----31----51-
Have a look at SQL Anywhere 17's PIVOT feature.
Alternatively, try this: Crosstab, Rotate, Pivot
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Version 17?
Man, I seem to have missed something by not having taken part in the current summit:)
Yes, there is much that is cool coming in 17... there may even be room for a "Top 17 Cool New Features" article 🙂
SQL Anywhere 17 may be feature-complete at the end of 2014 and released in the third quarter of 2015.
No mention has been made of a beta, and if recent history (Raspberry Pi)
is any indication, "SAP don't have to show you any stinking beta!"
User | Count |
---|---|
68 | |
10 | |
10 | |
10 | |
10 | |
8 | |
8 | |
7 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.