UOM Conversion in BOM ERPNext - erpnext

UOM conversion is not working in creation of BOM. For example, i have a raw material quantity .03 gram. Default raw material item UOM is in KG. When i try to insert the quantity in gram inside BOM, it does not convert. What can be the solution?

Related

How to save Non-English characters in an ADF Copy Sink to a CSV dataset

In ADF Copy activity, I am reading data from Databricks Delta tables, columns of which may contain non-english characters. Its reading the data perfectly, as I can see it in preview data. Next, I am saving (sink) the data in a CSV file.
When I open the CSV file, non-english characters are showing as either non readable characters or question marks depends upon what encoding I am using.
When encoding is UTF-8 (default), non-english characters become non-readable.
When encoding is ISO 8859-15, it becomes question marks.
Below is the sample non-english characters
With encoding UTF-8 (default)
with encoding ISO 8859-15
Any suggestions please
when you create the sink table, you need to define the encode UTF-8 as below:
create table xxxx
(
varchar(500) collate Latin1_General_100_CI_AI_SC_UTF8
)

ADF String to Decimal return NULL value

I have an imported CSV file with string values.
In this file there are amounts, of which several lines equal 0,00
I want to create a TotalCA column by adding several fields in my table and convert it to a numeric value.
I use the toDecimal function and the values are all returned NULL and the created column is grayed..
I have done a lot of research and I can't find a solution. Can you help me?
Thank you
Lea
I made an example csv data if I understand you correctly:
Like you said, some rows are enriched with values greater than 0, and others contain "0.00" when it is a zero value. Actually, the row data contains different data type, int and decimal.
For these reason and as I tested, no matter toDecimal(), toFloat() or toDouble(), all of the functions don't work. I use Derived column expression to do the data conversion.
We can't keep these data and only can choose one type of them. If you choose the decimal or float, other rows data would be converted to '11.0', I think that also doesn't you want.
Source Projection: I preset the column type to double:
(Decimal can't keep '0.00', it only returns '0')
In one word, the only way is that use String data type to keep the data. And also use String data type to receive the data in sink dataset.
HTH.
Thank you all for your answers.
Here is my CSV file
If I go to the Source Projection module and change the type of my column LFC1_UM01S to decimal this is what I get:
Why are some values considered as NULL?
To decimal column

Getting NULL Value in Stored Procedure TEXT Column

Below Query, I am using to get the SP definition but in TEXT column I am getting as NULL Value in IBM DATA Studio but I am able to CALL the SP.
SELECT PROCNAME, TEXT FROM SYSCAT.PROCEDURES WHERE PROCNAME LIKE '%USP_ABC%'
Please Help
You have confirmed that the syscat.procedures.language is SQL, and that your query-tool is able to display a substr() of the text.
Workaround depends on the length(text) of the row of interest:
SELECT PROCNAME, substr(TEXT,1, 1024) FROM SYSCAT.PROCEDURES WHERE PROCNAME LIKE '%USP_ABC%'
You may need to adjust the length of the substr extract depending on the length of the text and your configuration. For example substr(TEXT, 1, 2048 ) or a higher value for the length as necessary that your query-tool can cope with.
You can find the length of the text column with the LENGTH(TEXT) for the row of interest.
You can also CAST a CLOB to char or varchar to a length that fits within their limits and whatever query tool limitations you have.
Another option is to use a different query tool that can work with CLOB.
Are you using the latest version of Data Studio with the latest fix? It sounds like you might have an invalid UTF-8 character in you SP, or as you are using SUBSTR and SUBSTRING you are breaking a mulit-byte character in two.
You could try setting
-Ddb2.jcc.charsetDecoderEncoder=3
in your eclipse.ini to get Java to use a replacment character rather than replace the invalid string with nul
See this tech note
https://www-01.ibm.com/support/docview.wss?uid=swg21684365
Otherwise, do raise this with IBM Suppport

Display texte or unicode in column

I have two columns in my table, one contains latin caracteres (varchar) and another contains unicodes (n'varchar).
What I want is when my first column is null then display the second column :
isnull(column_1, column_2)
This doesn't work. So I tried to convert the select to n'varchar like this
convert(n'varchar(50),isnull(column_1, column_2))
But it doesn't work aswell. The unicode value is displayed with question marks '?'.
So have you an idea how to display the text or unicode (when text is null take the unicode)?
Sorry for my bad English.
You must convert the column inside:
select isnull(cast(column_1 as nvarchar(50)), column_2) from table
Your query convert the Unicode text to non-unicode (at this point the invalid data is converted to ? and practically lost) and then convert it back to Unicode (but it is too late, because the data is already lost).
IsNull returns a value with the same data type as the first argument, in this case VarChar(n). The second argument, an NVarChar(n), is therefore converted to a VarChar(n). (More precisely: "Returns the same type as check_expression. If a literal NULL is provided as check_expression, returns the datatype of the replacement_value. If a literal NULL is provided as check_expression and no replacement_value is provided, returns an int.")
Coalesce returns a value with the highest data type precedence from its arguments. According to the rules for data type precedence an NVarChar is higher than a VarChar and the implicit conversion will occur the way you want.
Coalesce can accept more than two arguments, is ISO/ANSI SQL, and respects data type precedence.

Export to Excel issue with numbers converting as text in SSRS

I have a price column in tablix with currency format("$"). when i export the report to excel this column is converting to text. Could anyone let me know how to make it as number in excel.
As TPhe mentioned, you can use the Format property to format the text box with C2 for currency (C for Currency and 2 for the number of digits after the decimal). Using the Format property usually makes Excel format the cell correctly.