Advertisement

04.12.2008 at 08:46AM PDT, ID: 23317458
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

9.8

Is there a way to get the width of a string, not length in characters by width in pixels or some other measurement.

Asked by bcarlis in PL / SQL, Oracle 9.x

Tags:

Is there a way to get the width of a string, not length in characters by width in pixels or some other measurement.

I'm building a text summary of an order and want to calculate how many tabs to include. I then email it to the customer.
Right now I'm using case statements to get the length but some strings with length 13 have the same width as a length of 16.
I'm trying to stay to TEXT emails and not go to HTML for reasons of different browser setting, etc, etc..

BillStart Free Trial
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
l_1tabs VARCHAR2(10):=chr(9);
        l_2tabs VARCHAR2(10):=chr(9)||chr(9);
        l_3tabs VARCHAR2(10):=chr(9)||chr(9)||chr(9);
        l_4tabs VARCHAR2(10):=chr(9)||chr(9)||chr(9)||chr(9);
 
....
FOR c1 in (SELECT NVL(to_char(to_date(O.CNTNR_RTN_DT,'DD-MON-YY'),
             'MM-DD-YYYY'),	 'No Return') ReturnDate,
	 l_1tabs||QNTY_ORDERED||l_2tabs||NVL(QNTY_SHIPPED,0)||l_2tabs||
	 F_GET_CNTNRS_LIST(O.ID,'N')||
         (case when length(F_GET_CNTNRS_LIST(O.ID,'N'))<6 OR 
       length(F_GET_CNTNRS_LIST(O.ID,'N')) is null then l_3tabs 
  when length(F_GET_CNTNRS_LIST(O.ID,'N'))<14 then l_2tabs else l_1tabs end)||
      F_GET_CNTNRS_LIST(O.ID,'Y')||(case when length(F_GET_CNTNRS_LIST(O.ID,'Y'))<6 OR length(F_GET_CNTNRS_LIST(O.ID,'Y')) is null then l_3tabs when length(F_GET_CNTNRS_LIST(O.ID,'Y'))<14 then l_2tabs else l_1tabs end)||
	 PROD.PROD_NAME
	  ProdLine, 
	 X.RETURNED_FLG, NVL(QNTY_ORDERED,0) - NVL(QNTY_SHIPPED,0) DIFF
	   from "LS_PRODUCTS" PROD, LS_ORDER_ITEM O, LS_ITEM_CONTAINER_XREF X 
	   WHERE PROD.ID1 = O.PROD_ID AND O.ID = X.ITEM_ID(+)
				       AND O.ORDER_ID = pOrderNbr
				       order by QNTY_ORDERED ) LOOP
 
Loading Advertisement...
 
[+][-]04.12.2008 at 01:00PM PDT, ID: 21342290

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.12.2008 at 08:44PM PDT, ID: 21343480

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.16.2008 at 11:06AM PDT, ID: 21370434

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.16.2008 at 05:09PM PDT, ID: 21373093

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: PL / SQL, Oracle 9.x
Tags: PL/SQL, Oracle sendmail
Sign Up Now!
Solution Provided By: sdstuber
Participating Experts: 2
Solution Grade: A
 
 
[+][-]04.16.2008 at 10:34PM PDT, ID: 21374391

Assisted solutions are selected by the member who asked the question as a comment that contributed to their question's solution.

Start your 7-day free trial to view this Assisted Solution or ask the Experts your question.

 
[+][-]05.22.2008 at 07:38AM PDT, ID: 21624187

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-42 / EE_QW_2_20070628