Unix Technical Forum

SQL Worksheet

This is a discussion on SQL Worksheet within the Oracle Miscellaneous forums, part of the Oracle Database category; --> Hi All, I am using Foxpro to extract data from ORACLE9i. I am connected through ODBC. One of the ...


Go Back   Unix Technical Forum > Database Server Software > Oracle Database > Oracle Miscellaneous

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-08-2008, 11:56 AM
beerora
 
Posts: n/a
Default SQL Worksheet

Hi All,

I am using Foxpro to extract data from ORACLE9i. I am connected
through ODBC. One of the field in DB is number. When I retrieve the
data from DB by FOXPRO the result is not ROUNDER or TRUNCATED. But the
same query when I use in SQL Worksheet, the result is either ROUNDED or
TRUNCATED to one decimal point.

E.g., if the value is 2345678.95 then it is rounded to 2345679.0
if the value is 234567.23 then it is truncated to 234567.30

Can anyone help me why SQL worksheet behave this way?

Thanks & Regards,
beerSA

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 04-08-2008, 11:56 AM
DA Morgan
 
Posts: n/a
Default Re: SQL Worksheet

beerora wrote:
> Hi All,
>
> I am using Foxpro to extract data from ORACLE9i. I am connected
> through ODBC. One of the field in DB is number. When I retrieve the
> data from DB by FOXPRO the result is not ROUNDER or TRUNCATED. But the
> same query when I use in SQL Worksheet, the result is either ROUNDED or
> TRUNCATED to one decimal point.
>
> E.g., if the value is 2345678.95 then it is rounded to 2345679.0
> if the value is 234567.23 then it is truncated to 234567.30
>
> Can anyone help me why SQL worksheet behave this way?
>
> Thanks & Regards,
> beerSA


What do you want to do? Just use the appropriate function.

SELECT TRUNC(<column_name>) or SELECT ROUND(<column_name>, <places>)
--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 04-08-2008, 11:56 AM
Geoff Muldoon
 
Posts: n/a
Default Re: SQL Worksheet

damorgan@psoug.org says...
> beerora wrote:
> >
> > I am using Foxpro to extract data from ORACLE9i. I am connected
> > through ODBC. One of the field in DB is number. When I retrieve the
> > data from DB by FOXPRO the result is not ROUNDER or TRUNCATED. But the
> > same query when I use in SQL Worksheet, the result is either ROUNDED or
> > TRUNCATED to one decimal point.
> >
> > E.g., if the value is 2345678.95 then it is rounded to 2345679.0
> > if the value is 234567.23 then it is truncated to 234567.30
> >
> > Can anyone help me why SQL worksheet behave this way?

>
> What do you want to do? Just use the appropriate function.
>
> SELECT TRUNC(<column_name>) or SELECT ROUND(<column_name>, <places>)


Daniel,

I think the OP is wanting the reverse, setting the format mask in SQL
Worksheet for a higher/not limited level of precision than his current
defaults are providing.

GM
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #4 (permalink)  
Old 04-08-2008, 11:56 AM
DA Morgan
 
Posts: n/a
Default Re: SQL Worksheet

Geoff Muldoon wrote:
> damorgan@psoug.org says...
>> beerora wrote:
>>> I am using Foxpro to extract data from ORACLE9i. I am connected
>>> through ODBC. One of the field in DB is number. When I retrieve the
>>> data from DB by FOXPRO the result is not ROUNDER or TRUNCATED. But the
>>> same query when I use in SQL Worksheet, the result is either ROUNDED or
>>> TRUNCATED to one decimal point.
>>>
>>> E.g., if the value is 2345678.95 then it is rounded to 2345679.0
>>> if the value is 234567.23 then it is truncated to 234567.30
>>>
>>> Can anyone help me why SQL worksheet behave this way?

>> What do you want to do? Just use the appropriate function.
>>
>> SELECT TRUNC(<column_name>) or SELECT ROUND(<column_name>, <places>)

>
> Daniel,
>
> I think the OP is wanting the reverse, setting the format mask in SQL
> Worksheet for a higher/not limited level of precision than his current
> defaults are providing.
>
> GM


Don't have the product so if that is the question I can't comment.
--
Daniel A. Morgan
University of Washington
damorgan@x.washington.edu
(replace x with u to respond)
Puget Sound Oracle Users Group
www.psoug.org
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 06:21 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com