How to get the second and third.... words in a string
Hi all,
is there any way to get the words in a string seperate columns in a row.
"xxx yyyy zzzz aaaa bbbb"
required answer is
a b c d e
xxx yyyy zzzz aaaa bbbb
a b c d e are the column names
Thanks
WITH t as (
SELECT 'xxx yyyy zzzz aaaa bbbb' as t FROM dual
-- end of sample data.
SELECT t,
regexp_substr(t, '[^ ]+', 1, 1) as a,
regexp_substr(t, '[^ ]+', 1, 2) as b,
regexp_substr(t, '[^ ]+', 1, 3) as c,
regexp_substr(t, '[^ ]+', 1, 4) as d,
regexp_substr(t, '[^ ]+', 1, 5) as e
FROM t;
T A B C D E
xxx yyyy zzzz aaaa bbbb xxx yyyy zzzz aaaa bbbb
Similar Messages
-
I have rearranged all icons on the second and third pages to have a just a photo on my home, but if i switch off the iphone when i restarted it all the icons come back in the old position on the home and second page. I have ios5.
you can suggest it here - http://www.apple.com/feedback/iphone.html
And it is only a problem if you want a blank first screen. Personally, it would drive me nuts always having to swipe over one page to get to my apps - the only time I unlock my iPhone is to use it or run an app, so no, I have no need nor desire to have a first screen with no icons at all.
But, if they'd put it in as an option so people like yourself can also have what they want, that's fine too So send them your feedback (they actually do listen - iOS 5 includes a number of things people have been asking for on these forums, like being able to delete individual entries from the call history, inproved alerts/notifications, being able to opt out of all the location based data they collect,...). -
Get line that contains and then get the second and fourth line after that.
So I have a text file and I want it to find all the lines in the file that contain an @ symbol and then I want it to get that line and the line second and fourth from that line. Then I would export it like this:
$linewith@ + ":" + $secondline + ":" + $fourthline
Finding the lines with an @ symbol is easy, but how would I tell it to get the second and fourth line after the line with an @ symbol?
So I would get the lines with something like this:
foreach ($line in [System.IO.File]::ReadLines($filename)) {
if($line.contains("@")){}That worked perfectly thanks man! Here is the entire code. I'm sure it could been cleaned up. I'm still learning powershell.
$username = "Username"
$password = "Password"
$url = "http://URL"
$ie = New-Object -com InternetExplorer.Application
$ie.visible=$false
$ie.navigate($url)
while($ie.ReadyState -ne 4) {start-sleep -m 100}
$ie.document.getElementById("username").value = "$username"
$ie.document.getElementById("password").value = "$password"
$ie.document.getElementById("click").click()
start-sleep 20
$ie.Document.body.innertext | Out-File -FilePath c:\web.txt
$links = $ie.Document.getElementsByTagName('A')
$logout = $links | where {$_.innerText -eq 'logout'}
$logout.click()
start-sleep 5
(gc C:\web.txt) | ? {$_.trim() -ne ""} | set-content C:\web.txt
( Get-Content C:\web.txt | Select-Object -Skip 2 | ForEach-Object { $_.TrimStart( " " ) } ) | Set-Content C:\web.txt
start-sleep 5
$fileContents = Get-Content C:\web.txt
foreach ($line in $fileContents) {
if ($line -like '*@*') {
$line + ":" + $($fileContents[$line.ReadCount+0]) + ":" + $($fileContents[$line.ReadCount+3]) | Out-File -FilePath c:\finish.txt -Append -
I have an Apple I Phone 4S which is great but, can someone help me how to get the photos and videos to my PC which runs on MS XP. I would like to be able to edit and copy photos and videos to a DVD.
Connect your iPhone to your computer. Tp your pc should recognize your iPhone as a camera. Use what ever application you have on the pc to transfer files from a camera to your computer.
-
How to get the values and attributes of Longlived processes by using ProcessID.
Hi Experts,
For every process we creates, LC ES2 creates processID.
we know that if you creates a long lived process, all the values which are in proces will be stored some where in DB.
Here my requirement is by using processID I need to get all/some values/variables stored in database.
I am not able to get values using processID. Here I don't have clue on how to get the values.
Please tell me how to get the same by using Process Management. Link/guide would be helpful
Thanks
Praveen.Searchable means you can put a filter criteria on it (e.g. where amount > 50000)
Visible means you can add have this column returned as an output (and therefore you can add it as column in listview and see it in Task Details).
These two attributes were provided so that queries could be done against the process variables, but the exact contents of the variables are not allowed to be seen. -
How to get the recipient and Note for recipient in Medium 7 Simple Mail?
Dear friends,
I'm trying to send the shipment in the form of PDF attachment to the assigned user. I'm wondering how can I get the receiver and the note(which should be the content of the email) which can be configured in the "Communication Method"?
Thanks,
YiNingWell, the maintained text doens't show up as the text of the mail content. So I'm actually asking how can I (from which variant in program) I can get this text. Or is there any standard program shows me how to do this?
Thanks! -
How to get the table_name and its count(*) in a SQL
Hi,
Can anybody tell me how to write a sql to get the table_name and its count(*) in a SQL:
Output should be:
table_name count(*)
XXX 261723
YYY 3343
Regards,
G. Rajakumar.hello
there r a lot ways
i'll suggest u two of them
1) the following dynamic sql procedure
DECLARE
TYPE array_type IS TABLE OF VARCHAR(30);
TYPE cur_typ IS REF CURSOR;
c1 cur_typ;
count1 integer;
tab_arr array_type;
querystr varchar2(200);
begin
SELECT table_name bulk collect into tab_arr FROM sys.all_all_tables ;
FOR I IN tab_arr.first..tab_arr.last LOOP
DBMS_OUTPUT.PUT(TAB_ARR(I));
querystr := 'select count(*) from ' ||TAB_ARR(I);
open c1 for querystr;
fetch c1 into count1;
EXIT WHEN c1%NOTFOUND;
dbms_output.put_line(count1);
END LOOP;
close c1;
END;
2) or use ANALYZE to analyze the tables and get the number of rows in the NUM_ROW column of DBA_TABLES view.
if u still have any problem mail me at [email protected]
shalini -
How to get the private and public key?
there is my code,i want to get the public key and the private key �Cbut i could not find the the approprite method to solve the problem.
import java.security.Key;
import javax.crypto.Cipher;
import java.security.KeyPairGenerator;
import java.security.KeyPair;
import java.security.Security;
public class PublicExample {
public static void main(String[] args) throws Exception {
if (args.length != 1) {
System.err.println("Usage:java PublicExample <text>");
System.exit(1);
byte[] plainText = args[0].getBytes("UTF8");
System.out.println("\nStart generating RSA key");
KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA");
keyGen.initialize(512);
KeyPair key = keyGen.generateKeyPair();
System.out.println("Finish generating RSA key");
Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());
Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1Padding", "BC");
//System.out.println("\n" + cipher.getProvider().getInfo());
System.out.println("\nStart encryption");
cipher.init(Cipher.ENCRYPT_MODE, key.getPublic());
byte[] cipherText = cipher.doFinal(plainText);
System.out.println("Finish encryption:");
System.out.println(new String(cipherText, "UTF8"));
System.out.println("\nStart decryption");
cipher.init(Cipher.DECRYPT_MODE, key.getPrivate());
/*i want to get the private and public key in this method ,but i found the result was not
the one i expected to get,how to solve the problem?
thanks in advance!
System.out.println("private key:" + key.getPrivate().toString());
System.out.println("public key:" + key.getPublic().toString());
byte[] newPlainText = cipher.doFinal(cipherText);
System.out.println("Finish decryption:");
System.out.println(new String(newPlainText, "UTF8"));
thanks in advance!System.out.println("private key:" +
" + key.getPrivate().toString());
System.out.println("public key:" +
+ key.getPublic().toString());
key.getPrivate() returns an instance of PrivateKey and key.getPublic() returns an instance of PublicKey. Since PublicKey and PrivateKey are interfaces then they will return one of the concrete implementations. Check out the Javadoc for PublicKey and PrivateKey.
When you know which concreate implemenation you have then you can use the methods on that object (by appropriate casting) to find the information you want. -
How to get the Folders and subfolders collection in Project Manager
Hi,
I am trying to get the folders and subfolders collection in Project Manager, so that I will be able to loop through the collection and be able to create a project under the appropriate folder.
Any suggestions?
Thanks.
BhanuAnything you do without submitting to form has to be done on the client side (ususally by JavaScript) using data which has been send already from the server.
With JavaScript you can do quite a bit. You can download tables which don't necessarilly appear on the screen, loading them into JavaScript arrays by dynamically generating javascript. Then you can pick up events like drop-box selection and use these tables to chose what you do next (e.g. preloading other fields, setting drop box content etc.).
Or, you can cause forms to be submitted when actions like a selection happen without the user clicking a button. It's generally a matter of how much data you'd need to transmit.
Another posibility is to use a Java applet, which can generate requests to the server and handle the results as it chooses. That are a number of problems with that but occasionally it's the best solution.
What you can't do is to handle user input inside a JSP. The JSP has come and gone before the user even gets to see your form. -
How to get the constraintlist and column name in a table?
Hi,
can anyone please tell me how to get the constraint type ,and it's imposed on columns names in a table.
Thanks,
DeekayDeekay wrote:
can anyone please tell me how to get the constraint type ,and it's imposed on columns names in a table.To get constraint type:
select constraint_type from user_constraints where constraint_name = 'YOUR CONSTRAINT NAME';To get constraint columns:
SELECT column_name from user_cons_columns where constraint_name = 'YOUR CONSTRAINT NAME';SY. -
How to get the number and response time of HTTP request through Weblogic?
hi,
does anybody know how to get the HTTP request information through Weblogic server, such as the number of HTTP request in 1 min and the average response time of request in 5 mins ?
Or is there anyway i can do it through monitoring and get these data then? If so, please help tell me.
Thanks in advance
BTW, we don't have the 3rd-party monitoring tool here.Hi,
tables: usr02, usr41.
data: OPCODE_MODE_COUNT(1) TYPE X VALUE 3,
modes like sy-index,
u_MODES LIKE MODES.
select * from usr02.
select * from usr41 where BNAME = usr02-bname.
CALL 'ThUsrInfo' ID 'OPCODE' FIELD OPCODE_MODE_COUNT
ID 'TID' FIELD usr41-TERMID
ID 'MODES' FIELD MODES.
IF SY-SUBRC = 0.
u_MODES = u_MODES + MODES.
ENDIF.
endselect.
if sy-subrc = 0.
write:/ usr02-bname, u_MODES.
endif.
clear u_modes.
endselect. -
How to get the lock and block occured for the full day
Hi,
How to monitor the lock and blocks occurred for the full day? i need to get it by end of the day. is there any script for this?Hi,
How to monitor the lock and blocks occurred for the full day? i need to get it by end of the day. is there any script for this?
Why would you like to collect information about locks and let me tell you, you cannot collect information about ALL locks which were taken and even thinking about it is pointless.
Coming to blocking if you have heavy system with huge concurrency there is bound to be blocking which is necessary and good for RDBMS but if the blocking remains for long time then this is a issue.
There is DMV sys.dm_tran_locks which tell you what all locks are being taken. You can see various examples mentioned in DMV online documentation and can schedule the query to run every 5
mins and insert its record in table which you can refer at end of the day.
This task would be made very easy if you have Monitoring tool which gives you information in your mail every time blocking occurs I have Spotlight in my environment.
If you are looking for doc for troubleshooting blocking below is one you can refer
http://support.microsoft.com/kb/224453
Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it.
My TechNet Wiki Articles -
How to get the latest and valid BOM item entry from STPO
hi,
may i know with what condition we can get the latest and valid BOM item entry from STPO table?
i have STLNR and IDNRK as a input. But i realized that it would return multiple entry due to the combination of valid-from and valid till date.
can i use stlnr,idnrk and stpoz (with the latet counter) to get the latest and valid BOM entry?
thank you.Hi
You can get the latest BOM either by using the latest valid from date DATUV or latest internal counter STPOZ
Regards
Shiva -
How to get the Title and Tcode of a Program during run time
Hello,
I am new to abap and I have this question please. Is the a way to get the title, Tcode and Author of a program during run time? I would like to get the name and title of a program or a view or an include during run time.
Using table TADIR, you can only get the object_name and the author. Is the a way for me to get the Title of the repository object and any Tcode if any is available for the case of a program?
I loop forward for your respond.
Thank you.
SabinaYou can get it by accessing SYST.
SY-TITLE for Title
SY-TCODE for Tcode
I don't think there is any field in SYST for the Author.
To get the author name you can use the TRDIR table.
Regards,
Naimesh Patel -
How to get the private and public keys to use recaptcha?
I have registered with google to get a recaptcha for my website. All I got was the site key and secret key! Though I need to get the public and private key for muse!
Hello,
Please use site Key as "Public Key"and Secret key as "Private Key".
Regards
Vivek
Maybe you are looking for
-
Ipod shuffle not recognised by my desk top
I have a new ipod shuffle that does not show up in devices when I plug it into my desk top. What should I do. Have all the latest software and the device is working and being recognised by another computer.
-
We have a Library that supports 4 Content Types ("Content Type 1","Content Type 2","Content Type 3","Content Type 4") The user clicks new and selects "Content Type 3" Word is started The user edits the document Clicks Save "Choose Content Type" dial
-
Page item section option differes in Desktop and viewer
Hi Everyone. In the Page Items section of this report. The user can choose only ONE value in Desktop but coming to the Viewer, user can select ONE value or ALL for each of the fields once the query has run. Is there any way to hide the ALL option in
-
How to Test coherence cache configuration
Hi, I have configured coherence using the below two config xmls, I had started out by trying to configure a distributed cache scheme but I am not sure if it has come up correctly. This configuration works fine from caching point of view, it even does
-
Replicated Partition: One to many?
I am hoping to set up a replicated partition, which will take exchange rate data from source to multiple targets.The issue is that I have multiple homes in any given target database for (eg) USD rate. ie I have tried using UDA's, but one USD tagged m