Database results format problem

M

MickB Tenerife

Hi I have an issue with a field [priceeuros] that reports out as a sinle
interger, no commas, can someone help please
This is the second page of the DBRW I am experimenting with, but there is a
syntax problem
SELECT * FROM Apmt1bed,
format([priceeuros],'Currency') as fmtamount,
ORDER BY PriceEuros ASC

I have 1234567 and want 1,234,567

thank you for your help
 
S

Stefan B Rusynko

See http://www.spiderwebwoman.com/resources/dbrwtipsandtricks.asp#currency
If you don't want the $ format, just use

Format(priceeuros,'#,##0.00') as fmtamount

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


Hi I have an issue with a field [priceeuros] that reports out as a sinle
interger, no commas, can someone help please
This is the second page of the DBRW I am experimenting with, but there is a
syntax problem
SELECT * FROM Apmt1bed,
format([priceeuros],'Currency') as fmtamount,
ORDER BY PriceEuros ASC

I have 1234567 and want 1,234,567

thank you for your help
 
M

MickB Tenerife

Hi Stefan thank you for the reply, howeve from a novice, where do i insert
the format code please.
If I go to page 2 of the DBRW I get

SELECT * FROM Apmt1bed ORDER BY PriceEuros ASC

if I try to change it to

SELECT * FROM Apmt1bed,
format([priceeuros],'Currency') as fmtamount,
ORDER BY PriceEuros ASC
I get errors, any ideas please?
 
K

Kathleen Anderson

Hi Mick:

Where did you make your changes? You should find the SQL in the gray-colored
code and make your changes. Save the changes while still in Code view. You
will notice that once you've saved your changes they are also made to the
maroon colored code - that is by design. The maroon colored code should
never be touched; it's generated by the gray code at save time.

What kind of errors are you getting?

--

~ Kathleen Anderson
Microsoft MVP - Expression Web
Spider Web Woman Designs
Expression Web Resources: http://www.spiderwebwoman.com/xweb/
Expression Web Wiki: http://expression-web-wiki.com/
FrontPage Resources: http://www.spiderwebwoman.com/resources/
Please reply to the newsgroup for the benefit of others


MickB Tenerife said:
Hi Stefan thank you for the reply, howeve from a novice, where do i insert
the format code please.
If I go to page 2 of the DBRW I get

SELECT * FROM Apmt1bed ORDER BY PriceEuros ASC

if I try to change it to

SELECT * FROM Apmt1bed,
format([priceeuros],'Currency') as fmtamount,
ORDER BY PriceEuros ASC
I get errors, any ideas please?

Stefan B Rusynko said:
See
http://www.spiderwebwoman.com/resources/dbrwtipsandtricks.asp#currency
If you don't want the $ format, just use

Format(priceeuros,'#,##0.00') as fmtamount

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


message
Hi I have an issue with a field [priceeuros] that reports out as a sinle
interger, no commas, can someone help please
This is the second page of the DBRW I am experimenting with, but there is
a
syntax problem
SELECT * FROM Apmt1bed,
format([priceeuros],'Currency') as fmtamount,
ORDER BY PriceEuros ASC

I have 1234567 and want 1,234,567

thank you for your help


.
 
S

Stefan B Rusynko

Plus you don't have your new variable in the correct place
- and the FP DBRW doesn't write Select *
(it enumerates the variables in the Select statement as a coma separated list)
You have
SELECT * FROM Apmt1bed ORDER BY PriceEuros ASC
And should have say
SELECT PriceEuros, otherfield FROM Apmt1bed ORDER BY PriceEuros ASC
where , otherfield would be your other DB fieldname or fieldnames required as a coma separated list
And you would add your custom variable in the Select part as say
SELECT Format(PriceEuros,'#,##0.00') as fmtamount, otherfield FROM Apmt1bed ORDER BY PriceEuros ASC

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


Hi Mick:

Where did you make your changes? You should find the SQL in the gray-colored
code and make your changes. Save the changes while still in Code view. You
will notice that once you've saved your changes they are also made to the
maroon colored code - that is by design. The maroon colored code should
never be touched; it's generated by the gray code at save time.

What kind of errors are you getting?

--

~ Kathleen Anderson
Microsoft MVP - Expression Web
Spider Web Woman Designs
Expression Web Resources: http://www.spiderwebwoman.com/xweb/
Expression Web Wiki: http://expression-web-wiki.com/
FrontPage Resources: http://www.spiderwebwoman.com/resources/
Please reply to the newsgroup for the benefit of others


MickB Tenerife said:
Hi Stefan thank you for the reply, howeve from a novice, where do i insert
the format code please.
If I go to page 2 of the DBRW I get

SELECT * FROM Apmt1bed ORDER BY PriceEuros ASC

if I try to change it to

SELECT * FROM Apmt1bed,
format([priceeuros],'Currency') as fmtamount,
ORDER BY PriceEuros ASC
I get errors, any ideas please?

Stefan B Rusynko said:
See
http://www.spiderwebwoman.com/resources/dbrwtipsandtricks.asp#currency
If you don't want the $ format, just use

Format(priceeuros,'#,##0.00') as fmtamount

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


message
Hi I have an issue with a field [priceeuros] that reports out as a sinle
interger, no commas, can someone help please
This is the second page of the DBRW I am experimenting with, but there is
a
syntax problem
SELECT * FROM Apmt1bed,
format([priceeuros],'Currency') as fmtamount,
ORDER BY PriceEuros ASC

I have 1234567 and want 1,234,567

thank you for your help


.
 
M

MickB Tenerife

Hi Kathleen and Stefan,
That was the perfect joint answer, I just could not see it myself. Many
thanks to you both, problem solved, my sincere thanks to you both, Mick


Stefan B Rusynko said:
Plus you don't have your newvariable in the correct place
- and the FP DBRW doesn't write Select *
(it enumerates the variables in the Select statement as a coma separated list)
You have
SELECT * FROM Apmt1bed ORDER BY PriceEuros ASC
And should have say
SELECT PriceEuros, otherfield FROM Apmt1bed ORDER BY PriceEuros ASC
where , otherfield would be your other DB fieldname or fieldnames required as a coma separated list
And you would add your custom variable in the Select part as say
SELECT Format(PriceEuros,'#,##0.00') as fmtamount, otherfield FROM Apmt1bed ORDER BY PriceEuros ASC

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


Hi Mick:

Where did you make your changes? You should find the SQL in the gray-colored
code and make your changes. Save the changes while still in Code view. You
will notice that once you've saved your changes they are also made to the
maroon colored code - that is by design. The maroon colored code should
never be touched; it's generated by the gray code at save time.

What kind of errors are you getting?

--

~ Kathleen Anderson
Microsoft MVP - Expression Web
Spider Web Woman Designs
Expression Web Resources: http://www.spiderwebwoman.com/xweb/
Expression Web Wiki: http://expression-web-wiki.com/
FrontPage Resources: http://www.spiderwebwoman.com/resources/
Please reply to the newsgroup for the benefit of others


MickB Tenerife said:
Hi Stefan thank you for the reply, howeve from a novice, where do i insert
the format code please.
If I go to page 2 of the DBRW I get

SELECT * FROM Apmt1bed ORDER BY PriceEuros ASC

if I try to change it to

SELECT * FROM Apmt1bed,
format([priceeuros],'Currency') as fmtamount,
ORDER BY PriceEuros ASC
I get errors, any ideas please?

Stefan B Rusynko said:
See
http://www.spiderwebwoman.com/resources/dbrwtipsandtricks.asp#currency
If you don't want the $ format, just use

Format(priceeuros,'#,##0.00') as fmtamount

--

_____________________________________________
SBR @ ENJOY (-: [ Microsoft MVP - FrontPage ]
"Warning - Using the F1 Key will not break anything!" (-;
_____________________________________________


message
Hi I have an issue with a field [priceeuros] that reports out as a sinle
interger, no commas, can someone help please
This is the second page of the DBRW I am experimenting with, but there is
a
syntax problem
SELECT * FROM Apmt1bed,
format([priceeuros],'Currency') as fmtamount,
ORDER BY PriceEuros ASC

I have 1234567 and want 1,234,567

thank you for your help


.




.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top