Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
19 views

How to parse and return a specific section of the clipboard?

I need to pull out a specific section of the clipboard data. Characters 235 - 242 are all I need and anything before or after that isn't needed. I'm using xsel to retrieve the clipboard data, but how ...
sifuhall's user avatar
2 votes
2 answers
133 views

Why substring results are different when start position is not a positive number?

When I use Sybase system (version 15.0+), query results are different when start position is not a natural number. If I only SELECT string value, result shows like this. SELECT SUBSTR('123456', 1, 3)...
RBP's user avatar
  • 21
0 votes
0 answers
49 views

DB2 substring not using length properly

I have the following SQL which calculates the length between a start position and end position and then tries to use the start position and length to extract the substring but the substring function ...
Peter warren's user avatar
-2 votes
2 answers
70 views

Split data in oracle

I have one table emp: CREATE TABLE EMP (ID NUMBER, DES CLOB); Actual data in table: id desc 1 I have pen in India 2 My name is pravin Create function using loop when data length ...
Pravin Jagdale's user avatar
1 vote
1 answer
114 views

Oracle SQL SUBSTR with LPAD function

I want to perform select statement in oracle database but not get the expected result. I have column value with 21 character however for 0 value it display empty space. I'm only interested to take ...
Miss aya's user avatar
1 vote
0 answers
46 views

Splitting HTML into two parts

I am splitting an HTML text into two parts. When doing that breaking HTML can happen. I had a fixing function that lookes like this: $html_intro = '<h3>Title</h3><p>Lorem ipsum dolor ...
maidan's user avatar
  • 209
0 votes
2 answers
65 views

How to Select a value in Oracle SQL after a specific string

I have a column with data like below. the sequence of info can differ. i need to extract the values for specific info and store in a different table. can anyone please help me to provide the query/...
Vicky's user avatar
  • 1
0 votes
1 answer
95 views

SQL - Stack multiple substrings in one column

I am looking to stack multiple substrings in one column. I am looking for alternatives to UNION ALL because my real data is massive and there are over 30 occurrences of sub strings for each row. Below ...
Twinkks's user avatar
0 votes
0 answers
41 views

I want this string "12 1 4" as integer outputs 12 1 4 [duplicate]

I have been trying to get a string of numbers as integer outputs. For example string "12 1 4" as space separated integer outputs 12 1 4 I wrote this code. used stoi() and substr operation. #...
Shubhendu Shekhar's user avatar
1 vote
2 answers
53 views

Oracle SUBSTR results in longer column?

It seems that SUBSTR can result in a longer column? What's going on here? CREATE TABLE t ( long_field VARCHAR2(1024) ); SELECT column_name, data_length FROM all_tab_cols WHERE ...
Tianxiang Xiong's user avatar
0 votes
2 answers
334 views

Oracle NLS Settings Special Characters Replacement Handling

I found a weird situation in Oracle Situation Faced I used substr to split the character one by one and if the byte of length >= 2 then replace it with spacing. It work successfully in my session ...
XDfox's user avatar
  • 53
0 votes
1 answer
128 views

Bulk Rename Utility: Rename Audio Track

So I want to renme multiple audio tracks FROM 10. Black Hole Sun_Soundgarden TO 10. Soundgarden_Black Hole Sun I found this: var char2find = "_"; var index = name.lastIndexOf(char2find); ...
agon024's user avatar
  • 1,007
11 votes
4 answers
1k views

Substitute last 4 digits in second and third column

I have a file as following: 2300 10 1112221234 111222123420231121PPPPD10+0000000850 ESIM 10 3334446789 333444678920231121PPPPD11+0000000950 RSIM 23 I want the outcome to be ...
Sam's user avatar
  • 235
6 votes
4 answers
171 views

Replace whole column with a new value in all multiple lines

I have the following lines in a file $ cat test.txt 69|1074330570|1,sip:+121345633210x3Bverstat=TN-Validation-Passed|tel:+12134565534|0 69|1077822111|2,;tel:+2223120011~sip:[email protected];|sip:+...
Sam's user avatar
  • 235
0 votes
2 answers
383 views

Substr command in SAS not working how it's supposed to

I have a variable called GEOID10 in my SAS table which is made up of 10-11 digits. The first 4-5 digits are the State and County FIPS codes and and the last 6 digits are the Census Tract. I want to ...
randsakka's user avatar
0 votes
2 answers
29 views

String modification for table column values

I need a solution for string from column values like 'abc xyz-1234' to 'xyz, abc'. What will be the Oracle SQL query for above solution. SELECT SUBSTR (COLUMN_NAME, INSTR (' ', ...
Amol Salunke's user avatar
0 votes
1 answer
117 views

Replace string at position

I have a string variable in Stata for unique id codes with different structures where I want to i) replace a specific character at a specific position (erroneous data entry) and ii) keep the last part ...
TerribleStudent's user avatar
0 votes
2 answers
56 views

SQL Oracle how to split text into rows and retain the deliminator but not duplicates

I have a column value e.g. 'IC123456IC789123'. The value is an aggregation from different systems, so could be in the form of numbers or letters/numbers with no fixed format e.g. 921253 X4525186 ...
GwaiTsi's user avatar
0 votes
2 answers
58 views

Substr instr help needed in sql oracle

i am trying to fetch some text from HTML string from a table. the text are like this and i am trying to get the output ID,TEXT 1,<font face="Microsoft Sans Serif" size="8" color=...
goldenbutter's user avatar
-1 votes
2 answers
33 views

Print specific part from an URL by php

I would like to print only specific part from an Url like for example if i got on response an URL like this : https://tvoauth.zapi.com/?client=zapi-web-1&session=...
PachaMan's user avatar
0 votes
2 answers
412 views

Command to insert a word between two words

I have a string variable in Stata with entries like the following var1 12.34 var2 23.45 var3 34.56 var2 54.32 var3 67.32 var1 32.32 var3 23.45 I want to create three variables with the above string ...
Ishwarya Balasubramanian's user avatar
1 vote
1 answer
214 views

Using substring in SQL update statement - oracle

I'm writing a SQL query that updates just only one field of a string (tax_cd) but it doesn't work, I must replace field 12 which is '0' or blank with '1',character 0 is the one you found in the ...
Ivano's user avatar
  • 11
1 vote
2 answers
57 views

Finding any substring of a given length inside another string

Let assume we have 2 strings ($strA and $strB) of some MBs length and we want to find if there exists any 8-bytes substring of $strA inside $strB. My current approach works however is unacceptable ...
Gajowy's user avatar
  • 23
-4 votes
1 answer
52 views

SQlite - Substr

In Sqlite, I have a column with dates that comes as follows: Hours (VARCHAR) Friday|18:00-2:00 in my code I have the following, my idea is to extract the text from |, since it would give me a range of ...
edward_apc's user avatar
-1 votes
1 answer
164 views

Oracle REGEXP_SUBSTR - Extract value between string based on column value, and symbol

I have the following columns, I would like to search Column 1 with the value from Column 2, and extract the between Column2 || '/' and the Comma afterwards. Column1 Column2 Test Pack: 040/1,050/1,...
user15732949's user avatar
0 votes
1 answer
65 views

(C++) Do different functions need assignment while others do not?

Can someone clarify/correct me on why certain functions such as push_back() do not need an assignment to output the new string, while a function such as substr() needs to be assigned to a string in ...
user avatar
0 votes
1 answer
91 views

Passing var with square bracket into function, like this [1], brackets not recognized PHP 8.2

PHP 8.2: The last 3 hours I am searching for a solution to identify square brackets from a text. In case I place the string text directly in the function, I can identify the square brackets: $...
Tom Friedrichs's user avatar
2 votes
1 answer
58 views

How to replace a string defined by starting and ending index by another string in R?

string <- "this is a funny cat" I want to replace the first 15 characters of string with 'orange`. The desired output is 'orange cat' However, using substr gives me substr(string, 1, 15)...
Adrian's user avatar
  • 9,773
0 votes
1 answer
25 views

Shorten clickable titles in responsive design using jQuery substring and media queries

I have a div with title <div class='titles'> <h2 class="post-title"><a href="www.example.com">Some example Title 1</a></h3> <h2 class="post-...
Ali's user avatar
  • 9
0 votes
2 answers
63 views

Match the first letter of one column with the first letter of other column and do str_replace after

I have a list of abbreviations and a list of replacements. However, some abbreviations have country index in them. It looks like this: Country Abbr US SP num1 UK SP num1 Malasia MSP num2 Albania ...
Polina Ermolaeva's user avatar
-1 votes
2 answers
130 views

Convert a String to an Integer with PHP

How can i convert a String to an Integer without losing the zeros and preventing an overflow. <?php $iban = "DE85370100500123456403"; $d = 13; $e = 14; $pruefz = substr($iban, 2, 2); $...
IT-noob's user avatar
  • 31
1 vote
2 answers
68 views

How to add hypens between specific numbers and characters?

This is my data set and I want to put hyphens between specific digits and characters. df_t 1 2 3 4 5 6 row_names X2012SGA007930001 1 2 3 4 5 6 X2012SGA007930001 ...
user avatar
1 vote
2 answers
155 views

AWK replace entry from one column if entry from another column contains a match [duplicate]

I am trying to use awk to replace all entries in column 11 with "0.400" when the third column contains the string "AAA". My input looks as follows: ATOM 1 AAA ABC 1 -...
user19619903's user avatar
0 votes
1 answer
708 views

Sybase regexp, substr, instr function to split the string

I have the below data in a table. row_num desc 1 First Name/Last Name - Middle Name 2 FirstName/LastName - MiddleName 3 FirstName/LastName I am looking for the desired output as below row_num ...
Bruce's user avatar
  • 91
0 votes
2 answers
184 views

adding member function substr for std::span<T> which imitates the string_view::substr

In my code, I would like to create a new class named Span by extending the std::span class, but the new Span has some extra member functions which does not exist in std::span. One is adding the ...
ollydbg23's user avatar
  • 1,190
0 votes
1 answer
151 views

Substring the result of for loop in XSL

Seeking one help on xsl payment file template. I have to restrict the length of a tag after for loop to 140 characters. In attached xml, after concatenating the DocumentPayable/DocumentNumber/...
Saurabh Maheshwari's user avatar
1 vote
2 answers
57 views

How to get the current_row in a main query for a subquery?

Let assume the following table: CREATE TABLE t1 (col1 TEXT PRIMARY KEY, value INTEGER); INSERT INTO t1 VALUES ('IE/a', 1), ('IE/b', 2), ('IE/c', 3) , ('00/a', 10), ('01/a', 20), ('02/a', 30), ...
ped's user avatar
  • 57
0 votes
2 answers
106 views

I am having an issue with the getline function [duplicate]

#include <iostream> using namespace std; int main(){ //set variables string name1;string name2;string name3;string n1;string n2;string n3; int age1; int age2; int age3; //get ...
jack is carbon's user avatar
0 votes
2 answers
62 views

How can I use substr on json object with for loop?

Could someone help on how to loop over response while using substr to get each variable. The variables would be Amount, Type, Balance, Date. I have the json response [ [ "...
Adam's user avatar
  • 13
-1 votes
1 answer
27 views

Why is the substr treating alpha numeric column value as string

Not sure why I would be getting the following warning, giving the that data being used in this row column is alpha-numeric. [20-Jan-2023 10:13:10 America/Chicago] PHP Warning: strpos(): Offset not ...
bbrindza's user avatar
0 votes
0 answers
111 views

PHP substr() with large negative offset returns the first character

According to the substr() manual If string is less than offset characters long, an empty string will be returned. But with negative offset substr("abc",-9,1) the function returns a ...
Szél Lajos's user avatar
0 votes
1 answer
136 views

Is there a way to select all rows created today(current date), if that column has time format date and time?

If I have a table that contains: table_id id_from_other_table date_time_when_this_row_was_added [(1, 200, '2023-01-06 08-11-21')] [(2, 200, '...
Erika's user avatar
  • 219
0 votes
1 answer
81 views

HIVE - How to extract hashtags from a string in HIVE

IF we have a sample field say 'note' note could be in ( 'xyz #abc-xyz-dfg. #abd' , '#123%36&89' , '## avc #1 "Changed xyz #2 from "string"\n - stop #3 #' ) What I am doing is -...
Ashima Sood's user avatar
1 vote
1 answer
44 views

Can SUBSTR() query change the output format of an array such that javascript field listeners can no longer read the array?

Really struggling to make a concise question without it being two phrases. All my code worked until I started uses SUBSTR() in my mySQL query. I have a list of folder numbers (F123456, F233999, etc). ...
thirtywest's user avatar
2 votes
7 answers
778 views

substr & index - extract from string $2 until the last string of the line

I have multiple files from which I want from a specific line to extract from string $2 until the last string of line or until the end of line (it could be one more string after $2, or it could be ...
chaosTheory's user avatar
1 vote
1 answer
348 views

how to remove spaces in front of updated values for column in sql?

I have a table which looks like this: Category Name T - 1029 - PHONE sjss T-2629172-LAPTOP ssus T-26124-PC udia T-22 T - 1029 - PHONE I am using this statement to update the 'Name' column in my ...
R Sem's user avatar
  • 241
0 votes
1 answer
152 views

How to use 'case when' and 'substr' to update a column in oracle sql?

I have a dataset which looks something like this: Category Name T-1029-PHONE sjss T-2629172-LAPTOP ssus T-26124-PC udia T-22 T-1029-PHONE T-1029 I want to update the 'Name' column by getting ...
R Sem's user avatar
  • 241
1 vote
0 answers
277 views

mb_substr return wrong string length

I was using substr for my code to cut exactly 75 characters of my string but I've got some problems with UTF-8 strings that produce characters like "�" so I searched for a solution and found ...
saeed868's user avatar
1 vote
1 answer
36 views

How to conditional concatanate in R?

I'm trying to extract some characters from a vector called "identhog" which is allocated in the table "E". But I want to extract some characters according with its text length. ...
Alexis SM's user avatar
1 vote
2 answers
195 views

Get text after specific character

I have a field in a Teradata database and I want to extract the text after a specific value. I can't use substring as there is sometimes more than 1 space before the text. Example 1 Amount changed to ...
markthornton90's user avatar

1
2 3 4 5
29