Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Cell Padding on an Attribute?? 1

Status
Not open for further replies.

zxzzzzzz

Programmer
Jul 10, 2002
51
0
0
US
Is it possible in MSTR to do cell padding on an attribute? Example: LPAD(xxxxx,4,'0')

My database is Oracle 9i.
 
What exactly do you mean by cell padding?

Do you want an attribute that has tab characters so when you export from Excel the attribute elements drop into different columns (like a hierarchy)?

If all you need is to insert spaces or other whitespace into the attribute form display, then I would create a new attribute form with an ApplySimple statement.
 
I'm needing to do LPAD on a couple of elements as they are not all the desired length of 4. zero padding--not space.

LPAD(class_number,4,'0')
 
Add an attribute form to your attribute, using an ApplySimple statement.

Example:
ApplySimple("LPAD(#0,4,'0')",[class_number])

Classify this form as a description form and display it in your report instead of the ID form. This way, the database engine will group by and filter on the ID ([class_number]) and get the padded version (LPAD([class_number],4,'0') in the last pass of the report SQL. You suffer no performance degradation.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top