Solved

How to rotate the text to 90 degrees?

Posted on 2014-04-07
2
334 Views
Last Modified: 2014-04-11
Hi,

 I'm on DB2 UDB 9.7.
I need to display some text to rotate to 90 degrees.
If this can be done in straight SQL (not involving any CTE), then that would be helpful.
Because, the tool we are using doesn't support CTEs.

Thank you!

Example:
If the text is : Department, then we need to display the text as:

T
N
E
M
T
R
A
P
E
D

Open in new window

0
Comment
Question by:pvsbandi
2 Comments
 
LVL 25

Accepted Solution

by:
Tomas Helgi Johannsson earned 500 total points
ID: 39988486
Hi!

This solution shows some good reverse function and/or reqursive sql.
http://www.experts-exchange.com/Database/DB2/Q_27521882.html

This can then be use to do a simple substr(mystring,thepos,1) on the reversed string.
Best solution would be to create a function that has string as a input and outputs a resultset with the string reversed and cut into character, row by row.

Regards,
    Tomas Helgi
0
 

Author Closing Comment

by:pvsbandi
ID: 39994969
Thanks! Good idea to reverse and shrink, so it looks rotated.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Find out which object is not saved 2 187
how to get the substring vaule in db2 11 302
eclipse find/step into stored procedure 3 184
I want coulmn name and value as output 18 65
Recursive SQL in UDB/LUW (you can use 'recursive' and 'SQL' in the same sentence) A growing number of database queries lend themselves to recursive solutions.  It's not always easy to spot when recursion is called for, especially for people una…
Recursive SQL in UDB/LUW (it really isn't that hard to do) Recursive SQL is most often used to convert columns to rows or rows to columns.  A previous article described the process of converting rows to columns.  This article will build off of th…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

773 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question