Skip to content

Tag: concat

Concate string into temp table in cursor

I have a temp table structure @temp2 like this and would like to add the driverID column with a result like 5555, 68989 to do this, I use the cursor to loop another table look like this Here is the code sadly, I got the driverID column is null and would like to have finalized temp table look like this:

sqlalchemy concat with more than 2 elements on Oracle DB

considering the following table definition I create a select-statement using the sqlalchemy.sql.functions.concat with 3 statements using the query is generated. However, when I run this, the exception ORA-00909: invalid number of arguments is thrown. This is because CONCAT ( only allows 2 Arguments. My workaround for now ist to use concat inside of concat, which works However, this makes the

Concat multiple rows with a delimiter in Hive

I need to concat string values row wise with ‘~’ as delimiter. I have the following data: I need to concat ‘Comment’ column for each ‘id’ in the ascending order of ‘row_id’ with ‘~’ as delimiter. Expected output is as below: GROUP_CONCAT is not an option since its not recognized in my Hive version. I can use collect_set or collect_list,