Questions tagged [string-concatenation]

String concatenation is the operation of joining two character strings end-to-end.

Filter by
Sorted by
Tagged with
-1 votes
0 answers
40 views

How to concatenate a string and numeric value in postgresql?

select floor(artist.begin_date_year / 10) * 10 || 's' as decade , count(artist.id) as num_artist_group from artist join area on artist.area = area.id where ...
Ritik Jangir's user avatar
0 votes
0 answers
17 views

IBM cognos analytics 11.1 group_cocat

I have a Table with three string columns (ID, name, books).If I wrote SQL, I would want the result of the following query: SELECT ID, name, group_concat(books) as concat_groups FROM Table GROUP BY ID,...
Vaiva Petrikaite's user avatar
-2 votes
0 answers
18 views

Concatenate several string variables comma-separated using Python [duplicate]

I have several string variables (many more than the below example) that I want to concatenate together to become a list of tags for a service. >>tag1 = 'USA' >>tag2 = 'Tree Assessment' >...
noydb's user avatar
  • 55
-1 votes
0 answers
41 views

fgetc() replaces first character

Why the first character is being replaced in the second While? When the concatenation is removed it works fine, but when i try to get any character in between the ones from the file this happens. code ...
LuisF's user avatar
  • 11
0 votes
1 answer
51 views

Loop through dataframe and add text to a cell in R

Using the ToothGrowth dataset in R as an example, I used ToothGrowth$comment <- "Comment 1" to create a Comment column with this format: len supp dose comment 1 4.2 VC 0.5 Comment ...
CBT2384's user avatar
0 votes
2 answers
103 views

Combine two words into one in C

Task: Several lines are read from the input stream. The first line contains the number N - the number of remaining lines (tests), N < 32. Each of the next N lines contains two words separated by a ...
rvevau's user avatar
  • 29
-1 votes
4 answers
73 views

T-SQL query for conditional string cocatenation

PersonID Name ResultDate CategoryName CategoryValue 569 A 2015-11-10 Note NULL 569 A 2015-11-10 Result Passed 569 A 2015-11-10 Score 16 585 B 2015-11-09 Note Hello! 585 B 2015-11-09 Result Failed ...
junyong lee's user avatar
0 votes
2 answers
47 views

How do I concatenate consecutive rows in R based on a unique set of ID variables and a consecutively increasing and resetting variable?

An example data frame: df <- data.frame(ID = c(1, 1, 2, 2, 2, 2, 2), Name = c("Alice", "Alice", "Bob", "Bob", "Bob", "Bob&...
Loudog3232's user avatar
-1 votes
1 answer
66 views

Why can an array encompass elements of strings?

I don't comprehend why double quotes are included in the following array; isn't this of string type? const uint8_t u8x8_font_8x13_1x2_n[436] U8X8_FONT_SECTION("u8x8_font_8x13_1x2_n") = &...
Jamth's user avatar
  • 31
0 votes
1 answer
31 views

Need help converting grid to string

I want to converting a list to string for an assignment. I can convert 1 row, however my teacher wants us to convert 3 separate rows to make a grid for the game of life. I've tried a bunch of ...
TRNF's user avatar
  • 9
2 votes
2 answers
66 views

Powershell, remove spaces between values

When i export to a csv file, i get spaces on either side of a pipline that i need between two to diffrent values in the same cell. However i need to get rid of the spcaces before i import it to a ...
user22694243's user avatar
2 votes
1 answer
52 views

concatenating String variables in PowerShell

I have the following PowerShell script: $Folder = Get-Location $FileName = Get-Item *.csv | Select-Object Name $FullPath = Get-Item *.csv | Select-Object FullName $Archive = $Folder, "Archive&...
Juerg Meister's user avatar
-1 votes
1 answer
26 views

Concatenate alternate rows (one with data, one with some NaN) in Pandas Dataframe

I have a dataframe that was obtained from PDF reader on and thus the data reading is a little haywire. Column A Column B Column C Column D Column E ABC 5 10 Hello ABC DEF NaN NaN NaN NaN GHI 25 30 ...
codelearnerallday's user avatar
0 votes
2 answers
43 views

String concatenation not working properly in C using sizeof() but it works for strlen() [duplicate]

#include <stdio.h> int main(void) { char strp[] = "hello"; char strq[] = " world"; strcat(strp,strq); puts(strp); //hello world printf("%d",...
Priyanka Govindarajan's user avatar
-2 votes
3 answers
89 views

How to optimize converting integers to strings and back and summing them [closed]

Today I was doing the practice pre-screen test on Code Signal and one of the questions was this. Given an array of integers a, return the sum of all a[i] º a[j], where a[i] º a[j] is defined as the ...
Mooch's user avatar
  • 7
0 votes
1 answer
116 views

How is string concatenation handled in Java bytecode compilation?

public class TestException extends Exception { public TestException(String msg) { super("This is the message: " + msg); } } The above code is compiled to: public class ...
Irfan Latif's user avatar
0 votes
1 answer
120 views

Redshift ProcSQL: Is there a better way to concatenate many variables, including possibly-null dates, into a single variable in Redshift?

I'm struggling to see my way out of a logic problem with string concatenation on Redshift because of two limitations: Any Null values in a set of strings concatenated with the || operator cause the ...
ShaunDave's user avatar
0 votes
4 answers
67 views

Combine columns ignoring nan

I want to create a concatenated column, separated by commas, in the most efficient and generalisable way: df fruit colour 0 apple green 1 NaN orange 2 NaN NaN listy= ["fruit", &...
asd's user avatar
  • 1,245
2 votes
1 answer
62 views

Concatenate strings from different rows in a dataframe matching the values of a list

I have the following dataframe: test = [{'ID': 13562, 'Role':'AR','Location': 'London'}, {'ID': 13562, 'Role':'ST','Location': 'London'}, {'ID': 13562, 'Role':'MH','Location': 'London'}, {'...
Mike's user avatar
  • 51
0 votes
2 answers
75 views

String concatenation with dollar-quoting

I use concatenation to prepare a query string with parameter values When I use single quotes: p_ReqStr_old := ' with prm as ( select 1::int4 as id, ' || ' to_timestamp(''' || to_char(...
Ivan Vodopyanov's user avatar
2 votes
2 answers
43 views

How to concatenate N rows of a column based on a specific column value in Google BigQuery?

USER ID string_col 100001 Here 100001 there 100001 Apple 200002 this is 200002 that is 200002 Apple 200002 Cell 4 That is my raw table & I want to use the word "Apple" as a ...
user22329205's user avatar
0 votes
1 answer
33 views

how to concatenate several whitespace between two text strings

'I need add 6 blank spaces between variables a and b like:' 'Ive trie a lot of methods.' data hh; %let texto1 = "Hola"; length texto2 $8; texto2 = " Mundo"; %let texto3 =...
CAMILO MEJIA's user avatar
1 vote
1 answer
60 views

How to concatenate strings in Icarus Verilog?

I have a SV printing task that concatenates some input strings and prints a message. This code works on Cadence's tools, but when I tried porting to iverilog, I get compile errors. task Error ( ...
meteowrite's user avatar
1 vote
1 answer
32 views

Group_CONCAT CASE multiply outputs

I have an SQL query with this line: GROUP_CONCAT(CASE WHEN t3.ship=1 AND t4.item=0 THEN t2.item_name END ORDER BY item_id SEPARATOR '<br>') `My Item List` Output Now: Lamp It works perfectly, ...
Blank_'s user avatar
  • 15
-3 votes
1 answer
48 views

Concat and make a string into a date

I have a table where the month and year are separate, and I want to put them together and make the backend format to date. I tried cast/converting but I get an error of "Conversion failed when ...
cardonas's user avatar
  • 109
0 votes
2 answers
714 views

How to add a New Line in Azure Logic app, concat method?

I'm trying to add a new line in a concat in azure logic apps. but it only adds the new line as a string instead. My goal is to add an array of object I get into a word doc. but it doesnt add a new ...
Bouyalife's user avatar
1 vote
1 answer
204 views

How to insert variable value into JSONPath string?

I have a function: CREATE OR REPLACE FUNCTION public.new_function1(arg1 text DEFAULT 'Miha'::text) RETURNS SETOF declarations LANGUAGE sql STABLE AS $function$ select * from declarations where data ...
Евгений Дружинин's user avatar
0 votes
1 answer
134 views

Convert a large ArrayBuffer into hexadecimal string representation in JavaScript

I have an ArrayBuffer with content that needs to be converted to a hex-string, that should be sent in a JSON message. The data can be up to 2 GB. For this I would like to have a string that works as a ...
user877329's user avatar
  • 6,654
-2 votes
2 answers
72 views

Concatenate in pyton

I want to store below syntax in python database where value given with k will increase as per the index value. however this syntax not working. Can anyone suggest DATA_LY["Matchup"]="=...
Deepak's user avatar
  • 1
0 votes
4 answers
93 views

Create a function to concatenate string in Python

I have a Pandas df as defined below: ID Start End 0 77 2018-07-02 2020-07-02 1 88 2019-07-02 2021-07-02 2 99 2020-07-02 2022-07-02 I want to create a ...
Shichimi's user avatar
0 votes
0 answers
62 views

concatenation error between strings within a list

I am trying to create an interval timer but have ran into the problem that the lists will not hold strings in my case, only single letters and single numbers. Interval_name can be any string but the ...
unreal 8 usher's user avatar
0 votes
4 answers
99 views

Two cases of string concatenation using conditional operator in C++

The first function works perfectly fine: string createurl(string protocol, string siteName, string domain, bool www = true) { return protocol + "://" + (www ? "www." : "&...
night_ZAK's user avatar
0 votes
1 answer
33 views

Argument concatenation in zsh excludes certain letters

I'm using zsh on Arch Linux. I have enabled setopt extendedglob & setopt sh_word_split. I have the following script: #!/bin/sh old_IFS="$IFS" IFS='|' files_to_exclude="$*" ...
Jan P's user avatar
  • 5
1 vote
2 answers
65 views

VB - Different Results With String-Date Concatenation On Different Machines

My co-worker and I were debugging an issue when we came across something curious: the same bit of VB code produces a different output on my machine versus his. We cannot figure out why. The code: Dim ...
Snake_Plissken's user avatar
0 votes
0 answers
116 views

pyspark concat a string column based on a numeric-value condition on a different column

I am using PySpark. I have a df where I have to concat the strings in one column ONLY when the sum of the numbers in another column is <= 500. Below is a full working mini-example code. On a per-...
user1717931's user avatar
  • 2,419
0 votes
1 answer
97 views

How to replace a part of string by a variable in a nbconvert instruction in Python?

Hi there, Probably nothing big, but I can't manage it in Python. I would like to replace the string "NotebookTest.ipynb" in the last nbconvert command by the corresponding variable defined ...
Rapsta's user avatar
  • 23
1 vote
1 answer
34 views

Implicit string concatenation in PostgreSQL for strings separated by line feeds

I have observed that the following two queries are both valid in PostgreSQL, and each results in the same query result: SELECT 'PostgreSQL is a powerful, ' || 'open source object-relational ...
Alchemistmatt's user avatar
0 votes
2 answers
50 views

Extract multiples occurrence from string using MySQL v5

Folks! I need some ideas, with the follow problem: I have a table in MySQL v5 that stores a string in a field, like the following: {"content":{"serviceResponse":{"state":{...
xarc's user avatar
  • 223
1 vote
2 answers
53 views

Concatenating strings in C includes unwanted chars [duplicate]

I created a program to concatenate two strings. However I get some extra characters included in the output string when the char array is too small. Faulty code below: char c[3] = "abc"; char ...
hay's user avatar
  • 11
2 votes
2 answers
270 views

Extract substring in excel cell

I need to find and extract substring in Excel cell using function, if possible without vba. e.g. cell string "A:Red B:Blue C:Orange" and I would like to get value of B which is "Blue&...
Teresa Sergiel's user avatar
0 votes
0 answers
54 views

Bash script does not concatenate variables as expected [duplicate]

On Redhat linux environment, my Bash script (setup) contains the following lines of code: #!/bin/bash #CASE_C3 export RUN_FILES_LOCATION="./Run_Files/" export CPP_FILE="${...
Nathan Goedeke's user avatar
-1 votes
1 answer
74 views

ADF Azure Data-Factory pipeline Concatenating syntax

Basically I want to delete some data before loading new data into a table in the ADF pipeline. So I have to use below script as Pre-copy script of my copy data - sink. DELETE FROM HCP_CALL_CNT WHERE ...
Anu's user avatar
  • 3
0 votes
1 answer
28 views

Capture result of Question and store together with Hostname

wonder if someone can help me. Im trying to run a script that prompts a question box, stores the question on a variable together with the computer name and outputs both variables to a file i did ...
user21486214's user avatar
2 votes
2 answers
85 views

how to concatenate multiple columns dynamically where column names are stored as delimited string Pandas

I am trying to concatenate the columns dynamically. The column names are stored as delimited strings in column 'merge': import pandas as pd df = pd.DataFrame({'prodName': ['p1', 'p2', 'p3'], ...
Noman Ahmed's user avatar
1 vote
1 answer
58 views

using powershell to append to an existing system variable

Morning everyone, This is a question specific to product licensing. We have many servers hosting licenses for engineering software that share the same variable name but on different servers. So if for ...
cgoldenbus's user avatar
0 votes
1 answer
520 views

Connection Between SAP GUI and VBA

I need some help with a macro in VBA. It connects to SAP GUI and performs a series of repetitive actions that would take days to be done manually. I don't understand anything of the SAP GUI Scripting ...
marlos isganzella's user avatar
0 votes
1 answer
153 views

Why does the Excel formula substitute not work for me?

Sorry... I had originally posted this as an answer :-) I have a spreadsheet that uses various formulas. When I get to some of the lists, some containing 16 items, I am concatenating 16 different cells,...
Dave's user avatar
  • 1
0 votes
2 answers
38 views

How merge two the same strings of lenght with delta in postgresql?

For example, I have the strings oaaoaa and aoaoao. I need the result: ooaoao. That is, it is necessary that the lines merge into one. At the same time, the common part of the lines was preserved, and ...
Pita_Brot's user avatar
1 vote
2 answers
23 views

How to join two STRING vectors of length m and n into a STRING vector of length m*n?

Here are two STRING vectors: a = `A`B`C b = `oo`pp`qq I want to combine each element of the vectors. I can do it with a two-level for loop: result = array(STRING) for(x in a){ for(y in b){ ...
dbaa9948's user avatar
  • 189
0 votes
0 answers
37 views

Pandas: help on how to concatenate more than 2 tables on a 3 keys [duplicate]

I have these three tables that I want to concatenate on three common keys (Date, Hour and trunk) to get this result: tables merge What is the simplest way to do it with pandas? I did some eperiments ...
devk's user avatar
  • 1

1
2 3 4 5
41