Database results format problem

  • Thread starter Thread starter MickB Tenerife
  • Start date Start date
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
 
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
 
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?
 
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


.
 
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


.
 
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


.




.
 
Back
Top