cancel
Showing results for 
Search instead for 
Did you mean: 

Issue with converting

Former Member
0 Kudos

Hello All,

after looking at some advice on this page on how to convert, i've came up with the following:

SELECT T0.[ItemCode], ((CAST(T0.[U_Attribute1] AS decimal(18,6))/1000)*(CAST(T0.[U_Attribute2] AS decimal(18,6))/1000)*(CAST(T0.[U_Attribute3] AS decimal(18,6))/1000)) as [Attribute 5] FROM OITM T0

can anyone see where i've gone wrong here? because the query executes fine, it just doesn't bring any data through.

cheers,

Jamie

Accepted Solutions (1)

Accepted Solutions (1)

kothandaraman_nagarajan
Active Contributor
0 Kudos

Hi,

Try this :

SELECT T0.[ItemCode],CAST(T0.[U_Attribute1] AS decimal(18,6)) * CAST(T0.[U_Attribute2] AS decimal(18,6)) * CAST(T0.[U_Attribute3] AS decimal(18,6)) FROM OITM T0

Thanks

Former Member
0 Kudos

Nagarajan,

This is also acting the same as my query, executing fine but no data

thanks for having a go!

cheers

Jamie

kothandaraman_nagarajan
Active Contributor
0 Kudos

FYI:

Former Member
0 Kudos

Apologies...

I was being a noob!

All i needed to do was scroll down a few record sets and i'd have found the data I was looking for.

both queries were working all along, i just never scrolled down far enough to check the data was there!

cheers

Jamie

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi ,

Try the below one

SELECT T0.[ItemCode],

(((CAST(T0.[U_Attribute1] AS decimal(18,6)))*1.0/1000)*((CAST(T0.[U_Attribute2] AS decimal(18,6)))*1.0/1000)*

((CAST(T0.[U_Attribute3] AS decimal(18,6)))*1.0/1000)) as [Attribute 5] FROM OITM T0

Former Member
0 Kudos

Hello Bharathiraja

Unfortunately this did exactly the same as my query, executed fine but no data

Thanks for trying though!

cheers

Jamie

Former Member
0 Kudos

Then check whether you are getting result for below query

SELECT T0.[ItemCode],CAST(T0.[U_Attribute1] AS decimal(18,6)),CAST(T0.[U_Attribute2] AS decimal(18,6)),CAST(T0.[U_Attribute3] AS decimal(18,6)) FROM OITM T0