cancel
Showing results for 
Search instead for 
Did you mean: 

crosstab query in MaxDB

Former Member
0 Kudos

Hi..

I am new to MaxDB.I have an issue that to display row values into column.In sql we can use pivot function.Is there any crosstab function to display row values into column in MaxDB.

Thanks in Advance

Regards

Balasubramaniam

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

you did not tell us the version of the MaxDB kernel you are using.

But there are two variants of CASE-function available in MaxDB :

<simple_case_function> and <searched_case_function>

<simple_case_function> ::=

CASE <check_expression>

WHEN <search_expression> THEN <result_expression>

[...]

[ELSE <default_expression>]

END

<check_expression> ::=

<expression>

<search_expression> ::=

<expression>

<result_expression> ::=

<expression>

<default_expression> ::=

<expression>

<searched_case_function> ::=

CASE

WHEN <search_condition> THEN <result_expression>

[...]

[ELSE <default_expression>])

END

<result_expression>::=

<expression>

<default_expression>::=

<expression>

The description can be found in the reference manual.

Elke

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi,

there is no function like pivot available in MaxDB.

You will have to write some sql around.

Elke

Former Member
0 Kudos

Hi Elke,

Thanks for your reply.i have tried three functions(pivot,case and if) in sql to display row into column .but MaxDB does not support all the three. Do u have any idea to solve the issue display row value into column in MaxDB.

Regards

Balasubramaniam