Basic Data Formatting Question 
Author Message
 Basic Data Formatting Question

In PDOX 4.5 for DOS, I want to convert a field from all caps to beginning
upper case, rest lower case.  I tried a FORMAT("CC"),[fldname] line in a scan
statement and got "unexpected command" message.  I think I have to convert the
field to a string first, but can't figure out out to do that.

Can someome help?

===============================================


Salons USA                
Winnetka, IL

Salons USA - Salon & Day Spa Gift Certificates
The Perfect Gift for Any Occasion!

Visit us at http://www.***.com/
or call:
1-800-GO-SALON (800) 467-2566 24-hours a day, seven days a week.

===============================================



Wed, 08 Jul 1998 03:00:00 GMT
 Basic Data Formatting Question

Tammy:

 FORMAT("CC",LOWER([fieldname])

You had the commas and parens out of whack..
the example above shows that you have to
convert the string to all lower first, to
get just the first letter uppered..

--
Steve Green - Diamond Software Group - Waldorf Maryland USA
CompuServe 71333.2362 - Prodigy TBMG62A -  I am a member of
Borland's TeamB Tech Support staff for PdoxDOS but I do not
represent Borland International in any official capacity.



Thu, 09 Jul 1998 03:00:00 GMT
 Basic Data Formatting Question

Quote:

>Subject: Re: Basic Data Formatting Question
>Date: 21 Jan 1996 13:36:31 GMT
>Tammy:
> FORMAT("CC",LOWER([fieldname])
>You had the commas and parens out of whack..
>the example above shows that you have to
>convert the string to all lower first, to
>get just the first letter uppered..
>--
>Steve Green - Diamond Software Group - Waldorf Maryland USA
>CompuServe 71333.2362 - Prodigy TBMG62A -  I am a member of
>Borland's TeamB Tech Support staff for PdoxDOS but I do not
>represent Borland International in any official capacity.

Steve,

After going nuts all day yesterday, I finally figured that out! But you showed
me a cleaner way to do it!  Thanks.

===============================================


Salons USA                
Winnetka, IL

Salons USA - Salon & Day Spa Gift Certificates
The Perfect Gift for Any Occasion!

Visit us at http://www.well.com/user/business/gosalon.html
or call:
1-800-GO-SALON (800) 467-2566 24-hours a day, seven days a week.

===============================================



Thu, 09 Jul 1998 03:00:00 GMT
 Basic Data Formatting Question


Quote:
>In PDOX 4.5 for DOS, I want to convert a field from all caps to beginning
>upper case, rest lower case.  I tried a FORMAT("CC"),[fldname] line in a scan
>statement and got "unexpected command" message.  I think I have to convert the
>field to a string first, but can't figure out out to do that.
>Can someome help?

That won't work.  What you need to do is:

[fldname] = format("cc",[fldname])

This will just overwrite the old data with the new data without the need to
assign the field to a variable first.  (quick and dirty ;-)
FORMAT() is a function, not a command, so you have to use it in conjunction
with assigning a value to a variable, or (as in the case above) a field in
a table.
A good rule of thumb for telling the difference:  both commands and
functions perform an action, but only functions return a value.

Bev.



Thu, 09 Jul 1998 03:00:00 GMT
 
 [ 4 post ] 

 Relevant Pages 

1. Basic question - saving in CSV format

2. Formatting data on Select question

3. Newbie question about formatting the money data type.

4. Refreshing Data - Format Question

5. Easy data types question - free format text

6. Data in Excel format TYPE XLS Question

7. Newbie question: how to output data in other formats

8. Questions: Data Access Functional Comparison to Visual Basic

9. Question about Visual Basic 6 and his data enviroment

10. Basic ADO Data Control Question

11. Basic Question - Subsummary data

12. questions about basic data warehouse concept


 
Powered by phpBB® Forum Software