Skip to Content
author's profile photo Former Member
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 a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    Posted on 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 a 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

  • author's profile photo Former Member
    Former Member
    Posted on 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 a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.