|
 |
asp_databases thread: decimals
Message #1 by Jean Halstad <J_Halstad@S...> on Mon, 9 Sep 2002 15:29:28 +0100
|
|
Am entering numbers into an SQL table using this:
strPrice = round(strPrice, 2)
The SQL table is knocking off everything after the decimal point, so 3.50
becomes 3
What on earth can be wrong?
*******SEAFOOD WEEK*******
4 to 11 October 2002
to register your interest contact us on
seafoodweek@s...
***************************************************************************
This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed
If you have received this e-mail in error please notify
seafish@s...
If the content is not about the business of the Sea Fish Industry Authority
or the sea fish industry then the message is neither from nor sanctioned
by the Sea Fish Industry Authority.
Message #2 by Vijay G <happygv@y...> on Mon, 9 Sep 2002 07:39:39 -0700 (PDT)
|
|
Hello Jean,
So, how about the datatype of the corresponding field in SQL table.
If it is,
int - no way you can have decimals (AFAIK)
float - large scope of decimals possobile (I have not checked for maximum decimals)
numeric - you can define your own scale value in its design value, that defines number of digits after .(dot) say 4, then the value
would be 3.5000
Let us know how it is defined in you SQL table. Also make change accordingly.
Cheers!!
Vijay G
Jean Halstad wrote:Am entering numbers into an SQL table using this:
strPrice = round(strPrice, 2)
The SQL table is knocking off everything after the decimal point, so 3.50
becomes 3
What on earth can be wrong?
*******SEAFOOD WEEK*******
4 to 11 October 2002
to register your interest contact us on
seafoodweek@s...
***************************************************************************
---------------------------------
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
Message #3 by "Craig Flannigan" <ckf@k...> on Mon, 9 Sep 2002 15:49:38 +0100
|
|
It's the Datatype of the field you're entering data into that's wrong.
Change it to Single and it should store the decimal point.
-----Original Message-----
From: Jean Halstad [mailto:J_Halstad@S...]
Sent: 09 September 2002 15:29
To: ASP Databases
Subject: [asp_databases] decimals
Am entering numbers into an SQL table using this:
strPrice = round(strPrice, 2)
The SQL table is knocking off everything after the decimal point, so 3.50
becomes 3
What on earth can be wrong?
*******SEAFOOD WEEK*******
4 to 11 October 2002
to register your interest contact us on
seafoodweek@s...
***************************************************************************
This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed
If you have received this e-mail in error please notify
seafish@s...
If the content is not about the business of the Sea Fish Industry Authority
or the sea fish industry then the message is neither from nor sanctioned
by the Sea Fish Industry Authority.
_____________________________________________________________________
Please contact I.T. Support if you have received this email in error.
This e-mail has been scanned for all viruses by Star Internet.
_____________________________________________________________________
_____________________________________________________________________
Kingfield Heath Ltd. Email Disclaimer
Confidentiality : This email and its attachments are intended for the
above-named only and may be confidential. If they have come to you in
error you must take no action based on them, nor must you copy or
show them to anyone; please reply to this email and highlight the
error.
Security Warning : Please note that this email has been created in
the knowledge that the internet is not a 100% secure communications
medium. We advise that you understand and observe this lack of
security when emailing us.
Viruses : Although we have taken steps to ensure that this email and
attachments are free from any virus, we advise that, in keeping with
good computing practice, the recipient should ensure they are
actually virus free.
_____________________________________________________________________
Message #4 by Jean Halstad <J_Halstad@S...> on Mon, 9 Sep 2002 15:58:40 +0100
|
|
It is defined as decimal
-----Original Message-----
From: Vijay G [mailto:happygv@y...]
Sent: 09 September 2002 15:40
To: ASP Databases
Subject: [asp_databases] Re: decimals
Hello Jean,
So, how about the datatype of the corresponding field in SQL table.
If it is,
int - no way you can have decimals (AFAIK)
float - large scope of decimals possobile (I have not checked for maximum
decimals)
numeric - you can define your own scale value in its design value, that
defines number of digits after .(dot) say 4, then the value would be 3.5000
Let us know how it is defined in you SQL table. Also make change
accordingly.
Cheers!!
Vijay G
Jean Halstad wrote:Am entering numbers into an SQL table using this:
strPrice = round(strPrice, 2)
The SQL table is knocking off everything after the decimal point, so 3.50
becomes 3
What on earth can be wrong?
*******SEAFOOD WEEK*******
4 to 11 October 2002
to register your interest contact us on
seafoodweek@s...
***************************************************************************
---------------------------------
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
*******SEAFOOD WEEK*******
4 to 11 October 2002
to register your interest contact us on
seafoodweek@s...
***************************************************************************
This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed
If you have received this e-mail in error please notify
seafish@s...
If the content is not about the business of the Sea Fish Industry Authority
or the sea fish industry then the message is neither from nor sanctioned
by the Sea Fish Industry Authority.
Message #5 by Jean Halstad <J_Halstad@S...> on Mon, 9 Sep 2002 16:06:38 +0100
|
|
Single doesn't seem to be an option. Do you mean numeric?
-----Original Message-----
From: Craig Flannigan [mailto:ckf@k...]
Sent: 09 September 2002 15:50
To: ASP Databases
Subject: [asp_databases] RE: decimals
It's the Datatype of the field you're entering data into that's wrong.
Change it to Single and it should store the decimal point.
-----Original Message-----
From: Jean Halstad [mailto:J_Halstad@S...]
Sent: 09 September 2002 15:29
To: ASP Databases
Subject: [asp_databases] decimals
Am entering numbers into an SQL table using this:
strPrice = round(strPrice, 2)
The SQL table is knocking off everything after the decimal point, so 3.50
becomes 3
What on earth can be wrong?
*******SEAFOOD WEEK*******
4 to 11 October 2002
to register your interest contact us on
seafoodweek@s...
***************************************************************************
This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed
If you have received this e-mail in error please notify
seafish@s...
If the content is not about the business of the Sea Fish Industry Authority
or the sea fish industry then the message is neither from nor sanctioned
by the Sea Fish Industry Authority.
_____________________________________________________________________
Please contact I.T. Support if you have received this email in error.
This e-mail has been scanned for all viruses by Star Internet.
_____________________________________________________________________
_____________________________________________________________________
Kingfield Heath Ltd. Email Disclaimer
Confidentiality : This email and its attachments are intended for the
above-named only and may be confidential. If they have come to you in
error you must take no action based on them, nor must you copy or
show them to anyone; please reply to this email and highlight the
error.
Security Warning : Please note that this email has been created in
the knowledge that the internet is not a 100% secure communications
medium. We advise that you understand and observe this lack of
security when emailing us.
Viruses : Although we have taken steps to ensure that this email and
attachments are free from any virus, we advise that, in keeping with
good computing practice, the recipient should ensure they are
actually virus free.
_____________________________________________________________________
*******SEAFOOD WEEK*******
4 to 11 October 2002
to register your interest contact us on
seafoodweek@s...
***************************************************************************
This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed
If you have received this e-mail in error please notify
seafish@s...
If the content is not about the business of the Sea Fish Industry Authority
or the sea fish industry then the message is neither from nor sanctioned
by the Sea Fish Industry Authority.
Message #6 by "Craig Flannigan" <ckf@k...> on Mon, 9 Sep 2002 16:13:40 +0100
|
|
I was assuming you were using Access, but you're using SQL Server, so not
sure.
In access you can change the type to Numeric and then the "Field Size" to
Single that works.
-----Original Message-----
From: Jean Halstad [mailto:J_Halstad@S...]
Sent: 09 September 2002 16:07
To: ASP Databases
Subject: [asp_databases] RE: decimals
Single doesn't seem to be an option. Do you mean numeric?
-----Original Message-----
From: Craig Flannigan [mailto:ckf@k...]
Sent: 09 September 2002 15:50
To: ASP Databases
Subject: [asp_databases] RE: decimals
It's the Datatype of the field you're entering data into that's wrong.
Change it to Single and it should store the decimal point.
-----Original Message-----
From: Jean Halstad [mailto:J_Halstad@S...]
Sent: 09 September 2002 15:29
To: ASP Databases
Subject: [asp_databases] decimals
Am entering numbers into an SQL table using this:
strPrice = round(strPrice, 2)
The SQL table is knocking off everything after the decimal point, so 3.50
becomes 3
What on earth can be wrong?
*******SEAFOOD WEEK*******
4 to 11 October 2002
to register your interest contact us on
seafoodweek@s...
***************************************************************************
This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed
If you have received this e-mail in error please notify
seafish@s...
If the content is not about the business of the Sea Fish Industry Authority
or the sea fish industry then the message is neither from nor sanctioned
by the Sea Fish Industry Authority.
_____________________________________________________________________
Please contact I.T. Support if you have received this email in error.
This e-mail has been scanned for all viruses by Star Internet.
_____________________________________________________________________
_____________________________________________________________________
Kingfield Heath Ltd. Email Disclaimer
Confidentiality : This email and its attachments are intended for the
above-named only and may be confidential. If they have come to you in
error you must take no action based on them, nor must you copy or
show them to anyone; please reply to this email and highlight the
error.
Security Warning : Please note that this email has been created in
the knowledge that the internet is not a 100% secure communications
medium. We advise that you understand and observe this lack of
security when emailing us.
Viruses : Although we have taken steps to ensure that this email and
attachments are free from any virus, we advise that, in keeping with
good computing practice, the recipient should ensure they are
actually virus free.
_____________________________________________________________________
*******SEAFOOD WEEK*******
4 to 11 October 2002
to register your interest contact us on
seafoodweek@s...
***************************************************************************
This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed
If you have received this e-mail in error please notify
seafish@s...
If the content is not about the business of the Sea Fish Industry Authority
or the sea fish industry then the message is neither from nor sanctioned
by the Sea Fish Industry Authority.
_____________________________________________________________________
Please contact I.T. Support if you have received this email in error.
This e-mail has been scanned for all viruses by Star Internet.
_____________________________________________________________________
_____________________________________________________________________
Kingfield Heath Ltd. Email Disclaimer
Confidentiality : This email and its attachments are intended for the
above-named only and may be confidential. If they have come to you in
error you must take no action based on them, nor must you copy or
show them to anyone; please reply to this email and highlight the
error.
Security Warning : Please note that this email has been created in
the knowledge that the internet is not a 100% secure communications
medium. We advise that you understand and observe this lack of
security when emailing us.
Viruses : Although we have taken steps to ensure that this email and
attachments are free from any virus, we advise that, in keeping with
good computing practice, the recipient should ensure they are
actually virus free.
_____________________________________________________________________
Message #7 by Vijay G <happygv@y...> on Mon, 9 Sep 2002 08:27:24 -0700 (PDT)
|
|
Then Check the SCALE value in design view, if that is ZERO, then define its SCALE value as 2 (as in your case) in table's DESIGN
view.
It should work.
Cheers!!!
Vijay G
Jean Halstad wrote:It is defined as decimal
-----Original Message-----
From: Vijay G [mailto:happygv@y...]
Sent: 09 September 2002 15:40
To: ASP Databases
Subject: [asp_databases] Re: decimals
Hello Jean,
So, how about the datatype of the corresponding field in SQL table.
If it is,
int - no way you can have decimals (AFAIK)
float - large scope of decimals possobile (I have not checked for maximum
decimals)
numeric - you can define your own scale value in its design value, that
defines number of digits after .(dot) say 4, then the value would be 3.5000
Let us know how it is defined in you SQL table. Also make change
accordingly.
Cheers!!
Vijay G
Jean Halstad wrote:Am entering numbers into an SQL table using this:
strPrice = round(strPrice, 2)
The SQL table is knocking off everything after the decimal point, so 3.50
becomes 3
What on earth can be wrong?
*******SEAFOOD WEEK*******
4 to 11 October 2002
to register your interest contact us on
seafoodweek@s...
***************************************************************************
---------------------------------
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
*******SEAFOOD WEEK*******
4 to 11 October 2002
to register your interest contact us on
seafoodweek@s...
***************************************************************************
This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed
If you have received this e-mail in error please notify
seafish@s...
If the content is not about the business of the Sea Fish Industry Authority
or the sea fish industry then the message is neither from nor sanctioned
by the Sea Fish Industry Authority.
---------------------------------
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
Message #8 by Jean Halstad <J_Halstad@S...> on Mon, 9 Sep 2002 16:36:33 +0100
|
|
I've found it. When you set up the database you have to set the scale to 2
if you want 2 places, and you have to ensure precision is not less than
scale. This sort of stuff is so basic you would think the manuals would
explain it, wouldn't you?
-----Original Message-----
From: Jean Halstad [mailto:J_Halstad@S...]
Sent: 09 September 2002 15:59
To: ASP Databases
Subject: [asp_databases] Re: decimals
It is defined as decimal
-----Original Message-----
From: Vijay G [mailto:happygv@y...]
Sent: 09 September 2002 15:40
To: ASP Databases
Subject: [asp_databases] Re: decimals
Hello Jean,
So, how about the datatype of the corresponding field in SQL table.
If it is,
int - no way you can have decimals (AFAIK)
float - large scope of decimals possobile (I have not checked for maximum
decimals)
numeric - you can define your own scale value in its design value, that
defines number of digits after .(dot) say 4, then the value would be 3.5000
Let us know how it is defined in you SQL table. Also make change
accordingly.
Cheers!!
Vijay G
Jean Halstad wrote:Am entering numbers into an SQL table using this:
strPrice = round(strPrice, 2)
The SQL table is knocking off everything after the decimal point, so 3.50
becomes 3
What on earth can be wrong?
*******SEAFOOD WEEK*******
4 to 11 October 2002
to register your interest contact us on
seafoodweek@s...
***************************************************************************
---------------------------------
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
*******SEAFOOD WEEK*******
4 to 11 October 2002
to register your interest contact us on
seafoodweek@s...
***************************************************************************
This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed
If you have received this e-mail in error please notify
seafish@s...
If the content is not about the business of the Sea Fish Industry Authority
or the sea fish industry then the message is neither from nor sanctioned
by the Sea Fish Industry Authority.
*******SEAFOOD WEEK*******
4 to 11 October 2002
to register your interest contact us on
seafoodweek@s...
***************************************************************************
This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed
If you have received this e-mail in error please notify
seafish@s...
If the content is not about the business of the Sea Fish Industry Authority
or the sea fish industry then the message is neither from nor sanctioned
by the Sea Fish Industry Authority.
Message #9 by Jean Halstad <J_Halstad@S...> on Mon, 9 Sep 2002 16:37:06 +0100
|
|
yes, that's it. thanks.
-----Original Message-----
From: Vijay G [mailto:happygv@y...]
Sent: 09 September 2002 16:27
To: ASP Databases
Subject: [asp_databases] Re: decimals
Then Check the SCALE value in design view, if that is ZERO, then define its
SCALE value as 2 (as in your case) in table's DESIGN view.
It should work.
Cheers!!!
Vijay G
Jean Halstad wrote:It is defined as decimal
-----Original Message-----
From: Vijay G [mailto:happygv@y...]
Sent: 09 September 2002 15:40
To: ASP Databases
Subject: [asp_databases] Re: decimals
Hello Jean,
So, how about the datatype of the corresponding field in SQL table.
If it is,
int - no way you can have decimals (AFAIK)
float - large scope of decimals possobile (I have not checked for maximum
decimals)
numeric - you can define your own scale value in its design value, that
defines number of digits after .(dot) say 4, then the value would be 3.5000
Let us know how it is defined in you SQL table. Also make change
accordingly.
Cheers!!
Vijay G
Jean Halstad wrote:Am entering numbers into an SQL table using this:
strPrice = round(strPrice, 2)
The SQL table is knocking off everything after the decimal point, so 3.50
becomes 3
What on earth can be wrong?
*******SEAFOOD WEEK*******
4 to 11 October 2002
to register your interest contact us on
seafoodweek@s...
***************************************************************************
---------------------------------
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
*******SEAFOOD WEEK*******
4 to 11 October 2002
to register your interest contact us on
seafoodweek@s...
***************************************************************************
This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed
If you have received this e-mail in error please notify
seafish@s...
If the content is not about the business of the Sea Fish Industry Authority
or the sea fish industry then the message is neither from nor sanctioned
by the Sea Fish Industry Authority.
---------------------------------
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
*******SEAFOOD WEEK*******
4 to 11 October 2002
to register your interest contact us on
seafoodweek@s...
***************************************************************************
This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed
If you have received this e-mail in error please notify
seafish@s...
If the content is not about the business of the Sea Fish Industry Authority
or the sea fish industry then the message is neither from nor sanctioned
by the Sea Fish Industry Authority.
Message #10 by Vijay G <happygv@y...> on Mon, 9 Sep 2002 08:38:08 -0700 (PDT)
|
|
There you go. :-)
Jean Halstad wrote:I've found it. When you set up the database you have to set the scale to 2
if you want 2 places, and you have to ensure precision is not less than
scale. This sort of stuff is so basic you would think the manuals would
explain it, wouldn't you?
-----Original Message-----
From: Jean Halstad [mailto:J_Halstad@S...]
Sent: 09 September 2002 15:59
To: ASP Databases
Subject: [asp_databases] Re: decimals
It is defined as decimal
-----Original Message-----
From: Vijay G [mailto:happygv@y...]
Sent: 09 September 2002 15:40
To: ASP Databases
Subject: [asp_databases] Re: decimals
Hello Jean,
So, how about the datatype of the corresponding field in SQL table.
If it is,
int - no way you can have decimals (AFAIK)
float - large scope of decimals possobile (I have not checked for maximum
decimals)
numeric - you can define your own scale value in its design value, that
defines number of digits after .(dot) say 4, then the value would be 3.5000
Let us know how it is defined in you SQL table. Also make change
accordingly.
Cheers!!
Vijay G
Jean Halstad wrote:Am entering numbers into an SQL table using this:
strPrice = round(strPrice, 2)
The SQL table is knocking off everything after the decimal point, so 3.50
becomes 3
What on earth can be wrong?
*******SEAFOOD WEEK*******
4 to 11 October 2002
to register your interest contact us on
seafoodweek@s...
***************************************************************************
---------------------------------
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
*******SEAFOOD WEEK*******
4 to 11 October 2002
to register your interest contact us on
seafoodweek@s...
***************************************************************************
This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed
If you have received this e-mail in error please notify
seafish@s...
If the content is not about the business of the Sea Fish Industry Authority
or the sea fish industry then the message is neither from nor sanctioned
by the Sea Fish Industry Authority.
*******SEAFOOD WEEK*******
4 to 11 October 2002
to register your interest contact us on
seafoodweek@s...
***************************************************************************
This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed
If you have received this e-mail in error please notify
seafish@s...
If the content is not about the business of the Sea Fish Industry Authority
or the sea fish industry then the message is neither from nor sanctioned
by the Sea Fish Industry Authority.
---------------------------------
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
Message #11 by "Samir Chitkara , Gurgaon" <chitkaras@g...> on Mon, 9 Sep 2002 21:21:11 +0530
|
|
hi!
try using
ex :
SELECT products.prod_id, orders.price
FROM orders left outer join JOIN products ON
orders.prod_id = products.prod_id
-----Original Message-----
From: Vijay G [mailto:happygv@y...]
Sent: Monday, September 09, 2002 9:08 PM
To: ASP Databases
Subject: [asp_databases] Re: decimals
There you go. :-)
Jean Halstad wrote:I've found it. When you set up the database you have to
set the scale to 2
if you want 2 places, and you have to ensure precision is not less than
scale. This sort of stuff is so basic you would think the manuals would
explain it, wouldn't you?
-----Original Message-----
From: Jean Halstad [mailto:J_Halstad@S...]
Sent: 09 September 2002 15:59
To: ASP Databases
Subject: [asp_databases] Re: decimals
It is defined as decimal
-----Original Message-----
From: Vijay G [mailto:happygv@y...]
Sent: 09 September 2002 15:40
To: ASP Databases
Subject: [asp_databases] Re: decimals
Hello Jean,
So, how about the datatype of the corresponding field in SQL table.
If it is,
int - no way you can have decimals (AFAIK)
float - large scope of decimals possobile (I have not checked for maximum
decimals)
numeric - you can define your own scale value in its design value, that
defines number of digits after .(dot) say 4, then the value would be 3.5000
Let us know how it is defined in you SQL table. Also make change
accordingly.
Cheers!!
Vijay G
Jean Halstad wrote:Am entering numbers into an SQL table using this:
strPrice = round(strPrice, 2)
The SQL table is knocking off everything after the decimal point, so 3.50
becomes 3
What on earth can be wrong?
*******SEAFOOD WEEK*******
4 to 11 October 2002
to register your interest contact us on
seafoodweek@s...
***************************************************************************
---------------------------------
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
*******SEAFOOD WEEK*******
4 to 11 October 2002
to register your interest contact us on
seafoodweek@s...
***************************************************************************
This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed
If you have received this e-mail in error please notify
seafish@s...
If the content is not about the business of the Sea Fish Industry Authority
or the sea fish industry then the message is neither from nor sanctioned
by the Sea Fish Industry Authority.
*******SEAFOOD WEEK*******
4 to 11 October 2002
to register your interest contact us on
seafoodweek@s...
***************************************************************************
This e-mail and any files transmitted with it are confidential and intended
solely for the use of the individual or entity to whom they are addressed
If you have received this e-mail in error please notify
seafish@s...
If the content is not about the business of the Sea Fish Industry Authority
or the sea fish industry then the message is neither from nor sanctioned
by the Sea Fish Industry Authority.
---------------------------------
Do You Yahoo!?
Yahoo! Finance - Get real-time stock quotes
|
|
 |