Need query for email id replace
Hi All,
i have the input as a email like --'[email protected]'
need output only the --'arun' .
please give me the solution...
try this..,
SQL> with tab as
2 (
3 select '[email protected]' email from dual)
4 select substr(email,1,instr(email,'@')-1) from tab;
SUBS
arunYou can use
update <tablename>
set email=substr(email,1,instr(email,'@')-1)
where=<condition>Twinkle
Edited by: Twinkle on Oct 21, 2009 11:03 AM
Similar Messages
-
Need Query for empty partitions
I am having nearly 700 partitions for a table.Now i want to find out only the empty partitions.I need query for that.
Thankx..Not the most elegant solution, but it works:
declare
rc number;
str varchar2(200);
begin
for i in (select table_owner, table_name, partition_name from dba_tab_partitions) loop
str := 'select count(*) from ' || i.table_owner || '.' || i.table_name || ' partition (' || i.partition_name || ')';
execute immediate str into rc;
if rc = 0 then
dbms_output.put_line(i.table_owner || '.' || i.table_name);
end if;
end loop;
end; -
Hi ,
i m looking for 'email' icons in .ico format for a client server
application .. does any one know where to get it or if some1 has
it pleeze email it to me .... thanx in advance ....
i have another problem .. i need to refresh the parent screen
after updation of a second screen .. does n e 1 have n e idea
how to go abt doin it ???
nullWhen you target objects, you need to consider the path to the object based on where you are trying to target from. So if your code is in the main timeline and your button is inside a movieclip, then you need to target the button via the movieclip...
movieclipName.muteBtn.addEventListener(MouseEvent.CLICK, endMusic);
As far as stopping a moiveclip resulting in stopping a sound from playing, it is not likely to work. To stop a sound you need to target the sound to stop it. -
Need instructions for 17" LCD replacement...
Need instructions for the original (non-ALS) 17" LCD replacement...
Ive replaced everything else, time to replace the LCD, but need the procedure to do it.
ThanksBefore you do surgery on your imac, go to applications, system preferences, displays, and see if you can adjust the brightness. My screen was significantly darker after I upgraded to 10.4.3 and I was able bring it back to life. For some reason the upgrade caused the brightness button to regress to 0 on a scale of one to ten- hope this works for you
-
Need (procedure or function or sql query )for Email filter
Hi All,
in (procedure or function or sql query ) ,if i pass the a input parameter like (anbu@y or anbu@ or anbu@yahjjj ) ,i need to get output like [email protected] .
please give me code for this ...SQL> with t
2 as
3 (
4 select 'anbu@y' email from dual union all
5 select 'anbu@' from dual union all
6 select 'anbu@yahjjj' from dual
7 )
8 select email, regexp_replace(email, '@.*','@yahoo.com') email_new
9 from t
10 /
EMAIL
EMAIL_NEW
anbu@y
[email protected]
anbu@
[email protected]
anbu@yahjjj
[email protected] -
Need Query for Item Relationship of Oracle Apps
Hello Team,
I need the Query to select the Item Relationship.
In Oracle Apps we have different tyes of Structure
ItemA -> ItemB
ItemB -> ItemC
ItemC -> ItemD
ItemG -> ItemH
ItemK -> ItemL
ItemW -> ItemQ
and this also is possible (meand many to one relationship)
ItemA -> ItemB
ItemB -> ItemC
ItemC -> ItemD
ItemT -> ItemD
and in the Select Query i want the below result
ItemA -> ItemB 1
ItemB -> ItemC 2
ItemC -> ItemD 3
ItemG -> ItemH 1
ItemK -> ItemL 2
ItemW -> ItemQ 1
and this also is possible (means many to one relationship)
ItemA -> ItemB 1
ItemB -> ItemC 2
ItemC -> ItemD 3
ItemT -> ItemD 1
means i want the Hierarchy number also
Please help me to in order to get the relationship by sql query.
Kind Regards,thanks for the quick response and i would love to spend time perusing the forum for this question but i didn't have time today. i'll do that now though.
what i'm mostly interested in is a chronological view (lastUpdateDate) of the change to pricing for an item in the system. there is a lot of activity in our system around price changes for promotions and i want to keep track of when it's changed in the source system and pair that with our other downstream systems.
i'm assuming we can add this functionality through a udf some way or maybe sp_TransNotification proc? -
Need query for requistion and rfq numbers
Dear All,
I need a query to list all requisition number for which RFQ is created and RFQ is partially converted to PO, if RFQ is fully converted to PO, it should not fetch the details.please help me on this.
Thanks
DebendraAre you referring to sourcing RFQ or core quotations?
-
Need query for this logic..
Hi,
Need a SQL query to achieve this..
Ex:
Select object_name from user_objects where object_name in('EMP','DEPT')
You will get 2 table names.
DEPT
EMP
Now I want to count how many records are there in each table
Output should be like
DEPT 4
EMP 13
Please let me know how can we write it ?
Thanks in Advance
DevenderYou need to create a function to cout rows.
Here is an example
CREATE OR REPLACE
FUNCTION get_rows (
t_owner IN varchar2 default user,
t_name IN varchar2
RETURN integer
IS
outVal integer;
BEGIN
select null
into outVal
from dba_tables
where ( owner=t_owner )
and ( table_name=t_name );
execute immediate 'select count(*) from '||t_owner||'.'||t_name into outVal;
RETURN outVal;
EXCEPTION
WHEN no_data_found THEN
return null;
END;
/And here is the query.
Processing ...
select owner,object_name,get_rows(owner,object_name) n_rows
from dba_objects
where object_name in('EMP','DEPT')
Query finished, retrieving results...
OWNER OBJECT_NAME ROWS
SCOTT EMP 14
SCOTT DEPT 4
2 row(s) retrieved -
Need Specs for HP m9150f replacement Case Fan
The case fan in the rear of my HP m9150f computer is getting noisy.I need the specifications of it in order to be able to purchase a replacement such as it;s size and connector.
Hi
Please find the link given below might help you.
http://partsurfer.hp.com/Search.aspx?type=PROD&SearchText=KC880AA
Let us know how it goes!
"I work for HP."
****Click the (purple thumbs up icon in the lower right corner of a post) to say thanks****
****Please mark Accept As Solution if it solves your problem****
Regards
Manjunath -
Hi i'm Alex and im having problems setting up my email and bbm on my blackberry curve 8520. i'm with orange as a dolphin plan and just wondering if any one can help set up my bbm and enterprise Activation Password.
Hello !
It seems you dont have BlackBerry Internet Service (BIS) Plan activated on your device.
Please contact your Service Provider for activating it.
Hope this resolves your Problem!
If your problem has been resolved then would request you to Click on "Like" and accept as "Solution" so that other Advisors doesnt invest their time on this Message anymore.
Thanks. -
Report Builder Version:10g
Hi Guys Good Morning to one and all
I have a table Named Onlsuvdet which captures the answers from
an online survey front end which has multiple choice questions.
the table structure is as follows
create table onlsuvdet(shloid number,questno char(5),respo1 char(5),respo2 char(5));
and the sample data is as follows
SHLOID QUEST RESPO RESPO
9315 1 2
9315 2 3
9315 3 4
9315 3 5
9315 4 1
9315 5 2
9315 5 1
Now i want the result as follows
shlogid quest1 quest2 q3 q4 q5
9315 2 3 4,5 1 2,1
So my requirement is a query which displays this data as above.
Please helpppp
Any help will be appreciated :)
Thanks & RegardsHi,
user123 wrote:
Report Builder Version:10g
Hi Guys Good Morning to one and all
I have a table Named Onlsuvdet which captures the answers from
an online survey front end which has multiple choice questions.
the table structure is as follows
create table onlsuvdet(shloid number,questno char(5),respo1 char(5),respo2 char(5));Thanks for posting the CREATE TABLE statement. That helps.
Why are you using the CHAR datatype, rather than VARCHAR2? CHAR is nothing but trouble.
and the sample data is as follows
SHLOID QUEST RESPO RESPO
9315 1 2
9315 2 3
9315 3 4
9315 3 5
9315 4 1
9315 5 2
9315 5 1Always post your data in a form people can use to re-create the problem and test their solutions. for example:
INSERT INTO onlsuvdet (shloid, questno, respo1, respo2) VALUES (9315, '1 ', '2 ', NULL);
INSERT INTO onlsuvdet (shloid, questno, respo1, respo2) VALUES (9315, '2 ', '3 ', NULL);
INSERT INTO onlsuvdet (shloid, questno, respo1, respo2) VALUES (9315, '3 ', '4 ', NULL);
INSERT INTO onlsuvdet (shloid, questno, respo1, respo2) VALUES (9315, '3 ', NULL, '5 ');
INSERT INTO onlsuvdet (shloid, questno, respo1, respo2) VALUES (9315, '4 ', '1 ', NULL);
INSERT INTO onlsuvdet (shloid, questno, respo1, respo2) VALUES (9315, '5 ', '2 ', NULL);
INSERT INTO onlsuvdet (shloid, questno, respo1, respo2) VALUES (9315, '5 ', NULL, '1 ');I'm making a lot of guesses about the data. for example, I'm guessing there will never be more than 2 rows with the same shloid and questno.
Why do you have 2 columns, respo1 and respo2? Is exactlyly one of them always NULL? If respo1 is NULL, will there always be another row with the same shloid and questno, but with a NULL respo2?
Now i want the result as follows
shlogid quest1 quest2 q3 q4 q5
9315 2 3 4,5 1 2,1Be consistent with the column names; either call them all questn (like I did below) or call them all qn.
So my requirement is a query which displays this data as above.Perhaps something like this:
WITH joined_data AS
SELECT r1.shloid
, r1.questno
, RTRIM ( r1.respo1 || ',' || r2.respo2
) AS respo
FROM onlsuvdet r1
LEFT OUTER JOIN onlsuvdet r2 ON r1.shloid = r2.shloid
AND r1.questno = r2.questno
AND r1.respo1 IS NOT NULL
AND r2.respo2 IS NOT NULL
SELECT shloid
, MAX (CASE WHEN questno = '1 ' THEN respo END) AS quest1
, MAX (CASE WHEN questno = '2 ' THEN respo END) AS quest2
, MAX (CASE WHEN questno = '3 ' THEN respo END) AS quest3
, MAX (CASE WHEN questno = '4 ' THEN respo END) AS quest4
, MAX (CASE WHEN questno = '5 ' THEN respo END) AS quest5
FROM joined_data
GROUP BY shloid
I hope this answers your question.
If not, point out a few places where the query above gets the wrong results. Post the correct results (formatted, between \ tags, as explained in the FAQ
http://wiki.oracle.com/page/Oracle+Discussion+Forums+FAQ
) and explain how you get the correct results from the given data. Correct or add to the sample data that I psoted, if necessary. -
CREATE TABLE TEST_MATCH
MTCH1 NUMBER(9),
MTCH2 NUMBER(9),
UPDT_MTCH CHAR(2 BYTE),
UPDT_NBR NUMBER(10)
SET DEFINE OFF;
Insert into TEST_MATCH
(MTCH1, MTCH2, UPDT_MTCH)
Values
(2616131, 300137070, '02');
Insert into TEST_MATCH
(MTCH1, MTCH2, UPDT_MTCH)
Values
(2571056, 300129277, '02');
Insert into TEST_MATCH
(MTCH1, MTCH2)
Values
(2623529, 300175046);
COMMIT;
i need to update the column UPDT_NBR which is currently NULL
UPDATE TEST_MATCH
SET UPDT_NBR =
NVL(2616131, 300137070) FOR THESE TWO MATCHES-> (1234567),
(2571056, 300129277) FOR THESE TWO MATCHES -> (1111111),
(2623529, 300175046) FOR THESE TWO MATCHES ->(222222);
Thanks for all your help in my previous post. And thanks again for looking into my post.Hi,
If it is just three records it would be better if you fire individual update statement 3 times.
But if it is a sample data only and you have many updates to do then only way I think it is is possible is either by creating temporary table or using subfactoring(same as creating temporary table)
Regards
Anurag -
Need query for refresh test database.
Hi,
I want refresh production database to test database refresh using expdp dumpfile. Please provide steps this is the requirement
This request is to refresh the Tecnomatix test database MFEM which is
on the NATEST server wnmcdwtk.natest.gm.com. This database needs to
be refreshed using an Oracle full backup dump file from the Tecnomatix
production database MFEP which runs on the production NAENG server
wnmcdds8.naeng.gm.com. The MFEM and MFEP databases are both at Oracle
v10.2.0.4.Hi,
You have posted to the wrong section of the forum. This forum us for Berkeley DB.
Regards,
Alex Gorrod
Oracle Berkeley DB -
Need query for Item - Price Change History
I need help finding information around Price Change History by Price List.
Information of interest is Date of Update and By Whom. Also, if a Datasource is 'N-Unknown', what does this generally mean?
select
i.itemcode,
i.itemname,
iphist.price,
pl.listname,
pl.datasource as 'ChangeSource',
'' as 'PriceChangeUpdateDate',
'' as 'UpdateByUser'
from ait1 iphist, oitm i, opln pl
where 1=1
and iphist.pricelist = pl.listnum
and i.itemcode = iphist.itemcode
and iphist.itemcode in ('1234')
and pl.listnum in (6)
thanks in advance...thanks for the quick response and i would love to spend time perusing the forum for this question but i didn't have time today. i'll do that now though.
what i'm mostly interested in is a chronological view (lastUpdateDate) of the change to pricing for an item in the system. there is a lot of activity in our system around price changes for promotions and i want to keep track of when it's changed in the source system and pair that with our other downstream systems.
i'm assuming we can add this functionality through a udf some way or maybe sp_TransNotification proc? -
Need query for connecting flights
Hi all.
My requirement is as follows
suppose my itnery is AAA-BBB-CCC.And there are few flights between AAA-BBB and BBB-CCC.I need all the valid connecting flights everyday.My table data is as follows
orig dest fltno arrivaldate depdate legno itid
AAA BBB 121 23-05-2011 15:40:00(arrical ar BBB) 1 x
AAA BBB 123 23-05-2011 16:40:00(arrical ar BBB) 1 x
BBB CCC 212 24-05-2011 04:05:00(arrical ar CCC) 23-05-2011 19:50:00(depat from BBB) 2 x
BBB CCC 213 24-05-2011 13:05:00 (arrical ar CCC) 24-05-2011 04:50:00(depat from BBB) 2 x
now i need to get for legno 1 all the flights in leg 2, whose depdate is grater than arrival date in leg 1.
Thanks.Hi,
Whenever you have a problem, please post CREATE TABLE and INSERT statements for the sample data. Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
Always say which version of Oracle you're using.
If I understand the problem, then you can use somehting like this:
SELECT l2.*
FROM table_x l1
JOIN table_x l2 ON l2.legeno = l1.legno + 1
AND l2.orig = l1.dest
AND l2.depdate > l1.arrivaldate
WHERE l1.legno = 1
;A self-join, like this, will work if you're looking for a specific leg. If you're interested in all legs (or all legs after a certain point), regardless of whether that's 1, 2, 3 or more, then use CONNECT BY instead of a self-join.
Maybe you are looking for
-
I am trying not lose my mind - and I won't even go into the Paralells issues. My Grandmother just had a stroke, and I just want to get the video from some of this summer's parties with her. Same MacBook, Same Sony DCR-SR68 Handycam, Same IMovie The
-
How to find out the Sequence settings of a created sequence?
I have had a problem come up a few times where I am switching back and forth from one format to another, I frequently work on multiple edits, and my sound goes out of sync. This is usually because the sequence is set wrong (from when I switch and for
-
hello, This is my first post in this forum and i am new to htmldb. i want to translate my application into italian but the problem i am facing is how to translate the xliff file when i am trying to open the xliff file generated by Oracle html db in x
-
Hello, I created generic Data Source as ZMM_MAIN, I selected LBKUM(Total Valuated Stock) data type as "QUN" refference field as 0UNIT in the data source so that I can have selection criteria in infopackage. When i replicate this datasource in BI , Un
-
NW PI 7.1 Install on i5OS V6R1
Attempting to install NW PI 7.1 on i with lots of problems. Has anyone had any success. We are stuck on 'Import Java Dump' step with: 30.03.10 22:36:03 com.sap.inst.jload.Jload logStackTrace SEVERE: java.lang.OutOfMemoryError: Java heap space (failed