Reading the part of a string
I have a table with a column "otname."Table1.otname contains several lines of alphanumeric string that resembles the following sample data:
11.10.32 * 12 *. U.A.F.3.2.21.249.1
2001.1.1003 * 8281 *. A.THE. PAINVIN
2010.1.1003 * 8261 *. A.THE. B.B
I want to read the fourth number in each chain (part of the string in bold) and write a query in Oracle 10 g
to read its description stored in another table. My dilemma is to write the first part of the query.i.e. Choose the fourth issue of each string in an array
My second query will be something like this:
select description_text from table2 where sncode = 8281 -- fourth part of the data sample in every string
Thank you very much.novice
Oops... I forgot to change that:
Fixed query:
SELECT description_text
FROM table1, table2
WHERE SUBSTR (otname, INSTR (otname,'.', 1, 3)
+ 1,
INSTR (otname, '.', 1, 4)
- INSTR (otname,'.', 1, 3)
- 1)
= sncode
This will return rows from your table if the sncode appears as the fourth string (delimited by '.') in otname. What is your requirement?
Kind regards
JO
Tags: Database
Similar Questions
-
Read the part of a URL with ActionScript?
Hello. I was wondering if it is possible to read a part of a URL with ActionScript...
... For example, if I have three specific sites by country:
* www.somewebsite.com
* www.somewebsite.com.uk (United Kingdom)
* www.somewebsite.com.ca (canada)
I just want to make a Flash file I can load on three sites, but according to the site on which is pulled up, the file will do something different. So (in plain English) I mean:
If the URL contains '.uk', do something.
If she ".ca", do something else.
If she didn't do a third thing.
How I would write only in ActionScript, or is it still possible to read the URL of the page that plays on the .swf movie?...
Thank you!...DIY_Lobotomy
> Hello. I was wondering if it is possible to read a part of a URL
> with ActionScript...This is the case. :) Read the property MovieClip._url of the main timeline (the
main scenario is a clip), or the hand LoaderInfo.url property
the chronology loaderInfo property... If you use ActionScript 3.0.for example
in a scenario main pre-ActionScript 3.0...
trace (this._url);in a main storyline ActionnScript 3.0...
trace (this.) LoaderInfo.URL);That will show you the domain name of the HTML file that contains the
SWF, you're in, and you can use strings, such as indexOf() methods to see if
the URL contains ".com", "co.uk" or similar. If you are using ActionScript
3.0, you can use regular expressions (see the RegExp class).David Stiller
Co-author, Foundation Flash CS3 for designers
http://tinyurl.com/2k29mj
"Luck is the residue of good design." -
SQL query to extract the part of a string.
Could someone help me with a SQL to retrieve the section highlight of my channel?
ABC_DEF_CDT_20140512140005_20140504030420_C20140512.055505. 20140522.070022.csv
BTW, the format of the string is less to:
< EMS_NAME > _CDT_ < CollectionDateTime > _ < EMS_timestamp > < StartDate > _C. < StartTime >. < EndDate >]. < EndTime> .csv
Kind regards
B
One way would be SQL> with t 2 as 3 ( 4 select 'ABC_DEF_CDT_20140512140005_20140504030420_C20140512.055505.20140522.070022.csv' str 5 from dual 6 ) 7 select ltrim(regexp_substr(str, 'C[[:digit:]]{8}\.[[:digit:]]{6}'), 'C') str 8 from t; STR --------------- 20140512.055505 SQL>
-
Silverlight plugin crashes when Netflix Progess bar to advance or re-read the part of the film
Netflix okay and amd starts successfully runs movies using Silverlight 5.1.20913.0 and the current version of Firefox (26?)
However if I try to move forward or backward, using the slider of Netflix, silvery light crashes with the following message
«A Script on this page may be busy, or it may have stopped responding etc.»
"Script: http://movies.netflix.com/WiPlayer?movieid=70248289 & trkid = 13462100 & tctx=-99%2C-99%2C87ddc936-30f9-44a2-952b-92aa6b28a381-660455:0"
CPU at 100% load.
Netflix works flawlessly with IE 8 and Silverlight. BBC Iplayer etc pass OK OK movies
I'm running on windows XP service pack 3 on a HP a1429.uk PC with AMD Athlon 64 processor.
I installed the patch 'AGP program may hang' in the registory for "LargePageMinimum.
I have a Nvidia Geforce 8400GS video adapter, running a composite video output to a TV in Dualview mode.
Default appeared after the latest Nvidia driver update through microsoft
I tried all the tips on Firefov execution in safe mode, etc.
Looking for feedbackCARE
Disabling Plugin-Container is not a recommended solution
There is a danger that Firefox itself will become crashy if you disable the plugin container.
even more importantly Adobe is not testing the new versions of Flash with the in-process configuration, which means that we're seeing crashes which are specific to in-process. {bug 769721]
Unfortunately I know the problems of security, disable plugin - container.exe. I don't know that it is a problematic area in Firefox to manage plugins such as Silverlight and Flash related questions. Mozilla has known about flash player crashes for years for example and o guess they cannot not possible design that it is THEIR browser plugin container causing the problem and always point the finger to the flash. I'm sorry that I don't have the other answer for you.
As long as the original article, I've referenced, you can use my regedit to implement as well and does not require a re-boot machine unless you have a blocked running process that you can not kill.
I'm glad that I was able to get it resolved rather painless for you
Best regards
-
In Labview 8.6 and MAX, I can change a scale for a voltage read the string in a task once the application has been built and installed on a second PC. Where's the info of the scale which is held?
Hello
Once you have built your VI and compiled into an executable file and deployed on another machine, it essentially becomes a file read-only, which means that you will not be able to change the balance in this deployed application.
Kind regards
Marcus
-
How to copy the piece of string to an enum in the part of string in a cluster?
I want to do all of an array of clusters. I am using a loop for. Can not find a way to analyze in chain of the enum in the part of the chain of the cluster.
Otherwise, I'd be happy if I could find some way to bind the enum in the table of clusters, but I think that becomes problematic.
DH
Dark Hollow says:
OK, let's say that the enumerated type has N elements. I want to initialize an array of N elements of strings. How refers to each string in the enumerated type for each channel?
An easy way to do this is to use GetNumericInfo.vi, part of the library of variant, found in vi.lib\utility\VariantDataType\GetNumericInfo.vi. Wire your enumeration to the variant of entry; one of the outputs is an array of strings in the enumerated type.
The most complicated way is a loop for, in which you convert the Terminal value of the iterator to the enumerated type, then use the value of Format. You can get the maximum value from the enumeration by casting for the enumerated type 0, and then decrement. Add-on to get the right value to wire the terminal n and climb back to a digital.
EDIT: just thought I would add, since the response of the RavensFan popped up while I was writing me - I don't like the approach of [] channels because it does not work on the objectives of the RT, and I lost a lot of time once because of this, trying to figure out why my code wouldn't run correctly on a system RT but worked fine on my development computer.
-
How to read the table of string returned by the DLL
I developed DLLS in labview that takes 2 input parameters as a string and returns an array of strings in return. How can I read back this array returned strings in labview? I tried to return a string and I can't able to read. But how to read a table?
Is the signature of the function – void GetLoginInfo (char [] DBPath, char [UserName], LStrHandleArray * table)
Shrinivas
I found the solution. When you configure the node to call a library function, the argument (in which we expect an array of string) type should be chosen as "Adapt to the Type" and data format to be "pointers to the sleeves.
-
How to use a control to change the part of array of strings? Insert in the string table?
Please see the attached illustration. The paintings of two strings which I'm trying to maniuplate are surrounded and the value is (bad) highlighted in yellow.
It is a part of a Subvi on a comprehensive program where I address three different cDAQ chassis, which are named cDAQ9188-TBL01-Remote, remote-TBL02-cDAQ9188, cDAQ9188-TBL03-distance max.
I intend to have three separate executables running simultaneously but independently, each dedicated to a different frame. Rather than manually changing the only integer and create a new Create_Task 002 and 003. VI for each of them, I would have the whole selectable by the user. Simple 1, 2, or 3 before starting the program and inserted it in the correct place (cDAQ9188-TBL0X-remote X of the location).
I managed to insert characters in the simple strings, but nothing seems to work with table 1 d of string. Is there a chance for this or should I be building my channels tables quite differently?
You'll just have to change the 1,2,3,... in your tables of strings with the appropriate format specifier, then add digital control and two knots in String Format and Bob is your uncle.
-
interpretation of TCP read the output string
What is the right method to interpret the data from the TCP Read function? The output is a string of characters, which are obviously not hexadecimal values. How can I convert the string to a binary table or bytes?
OK, time wild guess...
The first four bytes are an indication for SYNCHRONIZATION
The four bytes 0 4 0 0 is a 32-bit integer, GIS bytes less first. 1024
Then you have 6 0 0 0, which could be another 32-bit integer, lsb first. 6
Then your random data
Rod.
-
The key to Windows inlegible sticker, want to reinstall windows
What can I do if I can't read that the key is for Windows because of the part of the key on the sticker has rubbed off and must be re-installed Windows? The product ID is located under the control panel > system maintenance > system > Windows Activation of a useful? I don't want to end up with a Clipboard after that reinstalling Windows because I have a legitimate copy of Windows, but the key became disfigured over time, since it's on the bottom of the laptop. I have Windows Vista Home Premium SP 2 running on a Dell Inspiron it's way outside the guarantee of its window.Thank you!Hello
If you have a product key on a sticker in your computer, this means that you have an OEM product key. If you have OEM keys, this means that the windows you have here is preinstalled.
If you reinstall windows OEM copy, you must use either the original manufacturer recovery disk or the recovery partition. If you use one of the people, should not be put to any start-up because the windows OEM versions are technically preactivated.
If you don't have a disc or a recovery partition, you can contact your OEM (DELL) so that they can send you a disk. Alternatively, you can contact Microsoft Support just in case. : D
-
using worksheet Microsoft Excel v. 12. read the article by which Ashish Mathur, Microsoft MVP, describes how find and disseminate a text string figures.= 1 * MID (A1, MATCH (TRUE, ISNUMBER (1 * MID (A1, ROW ($ 1: $9), 1)), 0), COUNT (1 * MID (A1, ROW($1:$9),1))) j'ai essayé plusieurs fois.)) copy / paste, in vain. I can't get the formula that allows? I get an error "# n/a '... of ideas please? Thank you
Excel:
http://www.Microsoft.com/Office/Community/en-us/flyoutoverview.mspx
Office newsgroups
Discussions in Excel General questions.
They will help you with your questions Excel when repost you in the Office discussion groups above.
See you soon.
Mick Murphy - Microsoft partner
-
How REGEXP_REPLACE used to replace the part of the string?
Hello
How can I replace the portion of string as follows, I want to replace the space as by ' - '.
SELECT
REGEXP_REPLACE (superior ("' Laura bought stuff from 2000 USD on 12 September 2012 to KL and kl left on September 20, 2012"),)
' [0-9] {1,2} [^ 0-9](JAN|) FEB | MAR | APR | JUN | JUL | AUG | MS | OCT | NOV | DEC) [^ 0-9] [0-9] {4}',
(','-') "REGEXP_REPLACE.
FROM DUAL;
the output will be like this
Laura bought of the stuff of 2000 USD on 12-Sep-2012 of KL and kl left on 20-Sep-2012
concerningSomething like that?
SELECT REGEXP_REPLACE('Daivd bought stuff by 2000 USD on 12 Sep 2012 from KL and left kl on 20 Sep 2012', '([0-9]{1,2}) (JAN|FEB|MAR|APR|JUN|JUL|AUG|SEP|OCT|NOV|DEC) ([0-9]{4})', '\1-\2-\3',1,0,'i') "REGEXP_REPLACE" FROM DUAL;
Explanation:
You group the parts of the date de-construct with (additional).
You can use expressions, backreference \1 \2 \3 and add '-' between \1-\2-\3 signs.You should not user upper ('...') in the first parameter. If you cannot recover the original state of the letters.
If you want to case-insensitive matching you should use 'I' in the last parameter of regexp_replace.http://docs.Oracle.com/CD/B19306_01/server.102/b14200/functions130.htm
Published by: hm on 25.09.2012 00:38
-
Pass the part of the message read in the section registered company proxy service
Hello
I have a scenario where I read a post of the topic and write the part of the message to another topic using OSB.
Can someone please help?
Thanks in advance.
JonathanXPath to retrieve the required part of the message read by proxy. Replace the contents of variables of the body with the extracted part and call business service.
Kind regards
Anuj -
D2KWUTIL Read_Registry - only reads the string values? How to read the binary?
Hello, everyone!
I use forms and reports 6
D2KWUTIL,
WIN_API_ENVIRONMENT. Read_registry
to read the Windows registry values.
The service works very well with string values (that is, type REG_SZ registry).
but fails with NO_DATA_FOUND binary values, such as type REG_DWORD.
D2KWUTIL is really unable to work with other types of chains?
If so, what can be used instead?
Appreciate all the guidance,
Roman
Published by: user9232995 on November 18, 2010 23:19
Published by: user9232995 on November 18, 2010 23:20It's d2kwut60.dll.
-
show only part of a string of text for the field of PHP MySql
I have a description field (tk_job_desc) on a jobsearch I mean only the first 5 lines of the description click a view read more option take the user to a new page to read, the comprehensive work plan
<? PHP
If (! function_exists ("GetSQLValueString")) {}
function GetSQLValueString ($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
If (via PHP_VERSION < 6) {}
$theValue = get_magic_quotes_gpc()? stripslashes ($TheValue): $theValue;
}
$theValue = function_exists ("mysql_real_escape_string")? mysql_real_escape_string ($TheValue): mysql_escape_string ($theValue);
Switch ($theType) {}
case 'text ':
$theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";
break;
case "long":
case "int":
$theValue = ($theValue! = "")? intval ($TheValue): 'NULL ';
break;
case "double":
$theValue = ($theValue! = "")? doubleVal ($TheValue): 'NULL ';
break;
case "date":
$theValue = ($theValue! = "")? « " ». $theValue. "" "": "NULL";
break;
case "set":
$theValue = ($theValue! = "")? $theDefinedValue: $theNotDefinedValue;
break;
}
Return $theValue;
}
}
$maxRows_Recordset1 = 5;
$pageNum_Recordset1 = 0;
If (isset($_GET['pageNum_Recordset1'])) {}
$pageNum_Recordset1 = $_GET ['pageNum_Recordset1'];
}
$startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;
$var_tk_job_title_Recordset1 = '% ';
If (isset($_GET["tk_job_title"])) {}
$var_tk_job_title_Recordset1 = $_GET ['tk_job_title'];
}
$var_tk_job_location_Recordset1 = '% ';
If (isset($_GET["tk_job_location"])) {}
$var_tk_job_location_Recordset1 = $_GET ['tk_job_location'];
}
$var_tk_job_salary_Recordset1 = '% ';
If (isset($_GET["tk_job_salary"])) {}
$var_tk_job_salary_Recordset1 = $_GET ['tk_job_salary'];
}
@mysql_select_db ($database_hostprop, $hostprop);
$query_Recordset1 = sprintf ("SELECT tk_job_title, tk_job_location, tk_job_salary, tk_job_desc FROM think_jobsearch WHERE tk_job_title LIKE tk_job_location OR AS tk_job_salary GOLD AS %s %s %s", GetSQLValueString ($var_tk_job_title_Recordset1, "text"), GetSQLValueString ($var_tk_job_location_Recordset1, "text"), GetSQLValueString ($var_tk_job_salary_Recordset1, "text") ");
$query_limit_Recordset1 = sprintf ("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);
$Recordset1 = mysql_query ($query_limit_Recordset1, $hostprop) or die (mysql_error ());
$row_Recordset1 = mysql_fetch_assoc ($Recordset1);
If (isset($_GET['totalRows_Recordset1'])) {}
$totalRows_Recordset1 = $_GET ['totalRows_Recordset1'];
} else {}
$all_Recordset1 = mysql_query ($query_Recordset1);
$totalRows_Recordset1 = mysql_num_rows ($all_Recordset1);
}
$totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;
? >
the html code is
< table width = "655" border = "0" cellspacing = "5" cellpadding = "0" >
< b >
< td colspan = "2" class = "Titlegreen" > <? PHP echo $row_Recordset1 ["tk_job_title"];? > < table >
< /tr >
< b >
< td colspan = "2" class = "textblack" > <? PHP echo $row_Recordset1 ["tk_job_desc"];? > < table >
< /tr >
< b >
< td width = "250" > < table >
< td width = "405" > < div align = "right" > < span class = "pos_salary" > <? PHP echo $row_Recordset1 ["tk_job_salary"];? > < / span > < span class = "pos_location" > / <? PHP echo $row_Recordset1 ["tk_job_location"];? > < / span > < / div > < table >
< /tr >
< /table >
Thank you
> I thought LEFT(tk_job_desc,100) and tk_job_desc
> AS %s us what he had to go to the SELECT script?
Yes, but tk_job_desc is not actually in your SELECTION list, so you cannot reference in your php script. What IS in your SELECTION list is a SQL function that uses tk_job_desc as a parameter. But the name of the column that is returned for this field is unknown and is certainly not tk_job_desc. You must either give it an alias, or make reference to it by its position in the select list. Then try something like:
SELECT tk_job_title, tk_job_location, tk_job_salary, LEFT(tk_job_desc,100) as truncated_job_desc FROM think_jobsearch WHERE tk_job_title LIKE %s tk_job_location GOLD tk_job_salary GOLD tk_job_desc GOLD AS %s %s AS %s AS
And then don't forget to use truncated_job_desc in your php script when you view the value.
Maybe you are looking for
-
My outgoing google account mail continues to go offline. I have edited the list of SMTP servers and input new password. He is briefly then turns off
-
How to disable autorun on Windows Vista
Hello I have Windows Vista 64-bit and would like to know the best way to disable AutoPlay. I checked the forum and answers date back to 2009. Y at - it an easier way to disable AutoPlay now and if so, how? Thank you very much Cody
-
Case string returned from the function
Is it possible to run cases return the string somehow?For example:BOX WHEN 1.2.2011 > CURRENT_DATE THEN any OTHER 'OFF' END 'ON '... If I do like above, I get the error message: ORA-00932
-
Im trying to sewt up a grid for SNES, but my grid will not appear, I tried selecting Options, but it will not show again?
-
Panel request ADF with Table does not work
I am simple search.jsf of JSF page. In the search.jsf , I have an ADF search form. I drag and drop the view criteria into the Panel Query ADF with Table. The user search result will be displayed in a table ADF. The View object is simple no LOVs no va