Skip to Content
avatar image
Former Member

Issue with converting

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

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Oct 23, 2015 at 12:35 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Nagarajan K

      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

  • avatar image
    Former Member
    Oct 23, 2015 at 12:19 PM

    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

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Former Member

      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