Solved

How to rotate the text to 90 degrees?

Posted on 2014-04-07
2
324 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 24

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

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…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

758 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now