Questions tagged [concat-ws]

This function returns a string resulting from the concatenation, or joining, of two or more string values in an end-to-end manner. It separates those concatenated string values with the delimiter specified in the first function argument. (CONCAT_WS indicates concatenate with separator.)

This function returns a string resulting from the concatenation, or joining, of two or more string values in an end-to-end manner. It separates those concatenated string values with the delimiter specified in the first function argument. (CONCAT_WS indicates concatenate with separator.)

Syntax

CONCAT_WS ( separator, argument1, argument2 [, argumentN]... )
52 questions
1
vote
1 answer

UPDATE table using CONCAT_WS error

I have 2 tables named vhistory and week2. vhistory includes two columns voternum and voterhistory. week2 contains columns age, address, voternum, voterhistory, status, gender, precinct, county, and zip5. I need to update week2 voterhistory using…
1
vote
1 answer

MYSQL CONCAT_WS and UNIX_TIMESTAMP

Hello I have date and time table: date time 09-03-2014 06:17:15 09-03-2014 06:23:06 09-03-2014 06:28:57 09-03-2014 06:40:39 I will make this: SELECT CONCAT_WS(' ',date,time) AS newtime FROM hive96 newtime 09-03-2014…
1
vote
1 answer

Distinct in a wm_concat in oracle

I made a query that get all rooms with its name, its address, and other data. (select replace(wm_concat( '\par \tab ' || s.address|| '\par \tab ' || s.lib || '\par \tab '), ',', '\par - ') from t_room s) Too long for all the data, the only one…
provençal le breton
  • 1,428
  • 4
  • 26
  • 43
1
vote
1 answer

Is there a CONCAT_WS method in JPQL?

I am wondering if there is something like the CONCAT_WS method in JPQL as I found it in the MYSQL documentation here: http://dev.mysql.com/doc/refman/5.0/en/string-functions.html#function_concat-ws Anyone ever stumbled over anything comparable?
Rittel
  • 579
  • 5
  • 21
1
vote
1 answer

Nested MySQL Query w/ concat and adddate

I am trying to nest a few queries but so far am getting back error 1242: Subquery returns more than 1 row. I want more than one row, as I am working on a number of records. I have 2 tables. One has a commencement date stored in 3 columns; yr_comm,…
0
votes
2 answers

How to use CONCAT_WS instead of FULL-TEXT SEARCH

MySQL +----+-------------------+----------+--------------+ | id | address | city | state | +----+-------------------+----------+--------------+ | 1 | 13000 highway 244 | keystone | south dakota…
user317005
0
votes
2 answers

How to join a number of fields from one table and compare the result with another field from another table?

I have the following situation: table 1 -> publications table 2 -> users In table one among some details of publications, I have 20 fields concerning authors, exactly their names and lastnames (these fields: n1, l1, n2, l2, n3, l3... and so…
Delicja
  • 193
  • 1
  • 8
  • 18
0
votes
0 answers

Converting currency to format in postgresql

I want to combine two numbers (monthly net/monthly gross) and edit their formats. for example; 784.453,14 The code I wrote is as follows; concat_ws('/'::text, btrim(to_char(ks.aylik_kira, '9G999G999G999D00'::text)), …
0
votes
1 answer

How do make Conditional concat_ws in hive sql?

I have a array of string called tags in my hive table. I want to join each element from this array with a ',' delimiter and form a string. However, while joining I don't want to join the string if it doesn't include ':' character in it. The reason I…
0
votes
1 answer

How to Select DISTINCT CONTACT of some Columns in Mysql

I have a join query that returns data like this : Column A Column B Column C Column D Column E Column F Column…
m mardani
  • 1
  • 1
0
votes
1 answer

Removing duplicate words mysql concat_ws

I have a query in which I select the data I need for a sphinx index. One of the things I do is a concat_ws of multiple name aliases, different languages and such. This presents a problem when the names overlap. For example: one entry has the names…
0
votes
2 answers

MySQL CONCAT_WS from many variables - how can I limit the query to merely existing data?

I have been looking through all other mentionings of "MySQL" and "CONCAT_WS" but they do not address my problem. I have a medical database set up in MySQL (5.5.6x) with 180 tables and several thousand fields. The handling of database tables and…
mtjmohr
  • 99
  • 9
0
votes
1 answer

how to concat values of columns in pyspark

I have a dataframe. A column "names" contains columns headers, which values should be concated. I want to do it with pyspark concat_ws() but nothing works. I must solve it with concat_ws() function, no pandas etc. The best what I got it was concated…
Zhenya
  • 13
  • 6
0
votes
1 answer

How to GROUP_CONCAT where there are null values in MYSQL?

I have a long query that returns multiple values for a primary key (from a LEFT join). For example : (only showing two fields, but there about 10 fields) LotID Size 1 A 1 B 1 C 2 null 3 B 4 A 4 …
PCG
  • 2,049
  • 5
  • 24
  • 42
0
votes
1 answer

How to concatenate 2 columns from another table to 1 table?

I'm setting up a new database and I need to concatenate 2 columns from another table to 1 column. I've tried it with HeidiSQL. Is there a mistake in my code? UPDATE annotationfile SET LABSDTM = CONCAT_WS('T',importfile.Collection_Date,…