• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 244
  • Last Modified:

Currency format in database field

Greetings, almighty experts -

Wondering what the secret is to displaying a number in currency format in a Frontpage 2003 database results field.

TIA!
0
lenwruk
Asked:
lenwruk
  • 9
  • 6
1 Solution
 
lenwrukAuthor Commented:
I ask because I have found some very valuable inisght from some of your suggestions; however, all that I have tried thus far have failed.  Here is my code:

fp_sQry="SELECT *, Format(INVOICE,'$#,000.00') AS Expr1, Format(LIST,'$#,000.00') AS Expr2 FROM VW WHERE (MODEL =  '::MODEL::')"

The fields INVOICE and LIST still show up as 123456 vice $123,456.00.

Any thoughts?
0
 
hhammashCommented:
Try to select the fields instead of * then continue with the same.
0
 
lenwrukAuthor Commented:
I get a database results wizard error
0
Transaction-level recovery for Oracle database

Veeam Explore for Oracle delivers low RTOs and RPOs with agentless transaction log backup and transaction-level recovery of Oracle databases. You can restore the database to a precise point in time, even to a specific transaction.

 
lenwrukAuthor Commented:
Just so you know, this is what was modified:

fp_sQry="SELECT STOCK-NO,YR,MODEL,BODY,COLOR,INT-COLOR,DESC,SERIAL,CYL,INVOICE,LIST,Format(INVOICE,'$#0,000.00') AS Expr1, Format(LIST,'$#0,000.00') AS Expr2 FROM VW WHERE (MODEL =  '::MODEL::')"
0
 
hhammashCommented:
Did you try this:


fp_sQry="SELECT Name,Address, Format(INVOICE,'$#,##0.00') AS Expr1, Format(LIST,'$#,##0.00') AS Expr2 FROM VW WHERE (MODEL =  '::MODEL::')"

Name and address fields are just an example here.  Try the new format that I put.
(Invoice,'$#,##0.00')
0
 
lenwrukAuthor Commented:
No.  I will try lower-case...
0
 
lenwrukAuthor Commented:
No, sorry:

fp_sQry="SELECT Stock-no,Yr,Model,Body,Color,Int-color,Desc,Serial,Cyl,Invoice,List,Format(INVOICE,'$#0,000.00') AS Expr1, Format(LIST,'$#0,000.00') AS Expr2 FROM VW WHERE (MODEL =  '::MODEL::')"
0
 
lenwrukAuthor Commented:
I just realized what you wanted me to actually change:

fp_sQry="SELECT Stock-no,Yr,Model,Body,Color,Int-color,Desc,Serial,Cyl,Invoice,List,Format(INVOICE,'$#,##0.00') AS Expr1, Format(LIST,'$#,##0.00') AS Expr2 FROM VW WHERE (MODEL =  '::MODEL::')"

Still no dice - damn!
0
 
lenwrukAuthor Commented:
I also tried a combnation of the two, using the formatting you suggested, and * instead of the literal field names...
0
 
hhammashCommented:
So,  you are not getting errors,  you are just getting the numbers without formatting.
0
 
hhammashCommented:

Hi,

Take a look at this link,  it is a different approach which will work 100%

http://outfront.net/spooky/adv_drw_val.htm

hhammash
0
 
lenwrukAuthor Commented:
Thanks, but I guess I am unsure where to insert this could in the example I have, with the intention of formatting the fields INVOICE & LIST:

fp_sQry="SELECT * FROM VW WHERE (MODEL =  '::MODEL::')"

0
 
hhammashCommented:
Keep the sql statement as it is with no formatting.  The change would be in the Red code under the variables.

You know, you have the first Webbot grey line,  under it,  you have the fp_sQry line,  under this line you have a list of variables,  under the variables you have another grey line under which the fp fields red code starts.  Here is the place to change.
0
 
lenwrukAuthor Commented:
Oh my God!  I see what you're talking about!

This is cool - I just made the change, and once I got rid of all the stuoid gray code, it worked like a charm!!!  

Thanks, dude!!!

0
 
hhammashCommented:
You are welcome
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

  • 9
  • 6
Tackle projects and never again get stuck behind a technical roadblock.
Join Now