Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with result set generated by fast export

Status
Not open for further replies.

rkumar28

MIS
Jan 30, 2005
15
0
0
US
Hi,
I am running a fast export to generate a datafile. I am doing a SUM in the field. The field is defined as
decimal(9,4) in the table and is nullable.
My fast export is given below. I am passing each record as a character field to avoid any unwanted binary data as a part of my record.

SELECT
Sum(zeroifnull(field1))
(CHAR(20))
FROM
Table1
WHERE
field2 = '123'
Group By field3;

The problem is: it is generating the answer set something like below. I am expecting a number instead of the astericks ********. Please advice.

***********
125.0000
327.5000
3239.5000
255.0000
64033.0000
10.0000
***********

I have tried casting to a character field but it changes the result to:

1.85460621446000E 007
1.25000000000000E 002
3.27500000000000E 002
3.23950000000000E 003
2.55000000000000E 002
6.40330000000000E 004
1.00000000000000E 001
1.58390321284000E 008


I will really appreciate any help to fix this issue.....

Thanks Raj
 
Will appreciate any advice in this regard.....

Thanks
Raj
 


1.85460621446000E 007

is really

18546062.1446

and this won't fit in a ( 9,4 field )

you need to make it a 13,4 field to accomedate this number.



Sum(zeroifnull(field1)) (Decimal (13,4))(CHAR(20))


or something like that
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top