How to store multiple records for one master reocrd using sequnce
dear,
my question is in one form i have master block f and detail block.
my question is i created one sequence and assign to master table. but i dont know how to assign that sequence to multiple record in detail table for that particular master record. i got lots of answer previously but i m not getting exactly.pls tell me full procedure otherwise gv me one demo application
NOTe: the sequnce is created after master record commiting to database.
PLS pls help me
Thanks
damby
i did not get answer pls help me.
Similar Messages
-
How to concatenate multiple records into one
Hi everybody:
I want to know if exist some way to concat multiple records into one without using cursors. For example, I have a table named "Authors" like this:
Lan|Author
English|Ernest Hemingway
Spanish|Octavio Paz
Spanish|Mario Vargas Llosa
English|Sinclair Lewis
Spanish|Gabriel García Márquez
And I want to get this:
Author
Octavio Paz, Mario Vargas Llosa, Gabriel García Márquez
I have worked with SQL Server and I can do something like this:
CREATE FUNCTION dbo.MyConcat (@lan varchar(10))
RETURNS varchar(5000) AS
BEGIN
declare @retvalue varchar(5000)
set @retvalue=''
select @retvalue = @retvalue + Author +',' from Authors where lan = @lan
return substring(@retvalue,1,len(@retvalue)-1)
END
ie, do not use cursors to concatenate records. However, with ORACLE, I have to do someting like this.
FUNCTION MyConcat(P_Lan IN VARCHAR2) RETURN VARCHAR2 IS
v_ret VARCHAR2(4000);
v_element VARCHAR2(4000);
v_cursor sys_refcursor;
BEGIN
OPEN v_cursor FOR SELECT Author FROM Authors where Lan = P_Lan
LOOP
FETCH v_cursor INTO v_elemento;
EXIT WHEN v_cursor%NOTFOUND;
IF v_ret IS NULL THEN
v_ret := v_element;
ELSE
v_ret := v_ret || ', ' || v_element;
END IF;
END LOOP;
RETURN v_ret;
END;
Exist some other way to do this?
Best Regards
JackTks both for answer... I forgot to mention that I am using Oracle 10g. I read about LISTAGG() but this function is available for Oracle 11g release 2.
I wil read about the other techniques than Hoek mention
Best Regards.
Jack -
How to open multiple sessions for one user?
Sorry for the silly question but I couldn't find it googling or searching through this forum, so I started wondering whether it's possible in SQL Developer to open multiple sessions for one user. I'm fairly new to SQL Developer and databases in general.
When I open SQL Developer and connect to a schema, a worksheet opens named MYSCHEMA. If I disconnect then connect, another worksheet opens, named MYSCHEMA~1. I assumed these were different sessions, but if I enter into one worksheet:
select col1 from my_table where row_id = 1
-- shows result is 1
update my_table set col1 = 0 where row_id = 1
select col1 from my_table where row_id = 1
-- shows result is 0and then enter into the second worksheet:
select col1 from my_table where row_id = 1
-- shows result is 0I would have expected the second worksheet to report 1 because the first worksheet did not issue a COMMIT. Thus, I'd guess both worksheets are the same session? Is that right? If so, how do I have two sessions open simultaneously (opened by same user)?
I'm trying to implement the code at the bottom of this post, for which testing requires at least two sessions:
Re: Help with Procedure
Edited by: tem on Apr 18, 2012 6:44 AMThanks Jim,
Ctrl-Shift-N doesn't do anything for me. I'm on a mac -- by experimenting it looks like command-N does what you're looking for. This appears to be the same as left-clicking on the "New" icon in the top left corner of SQL Developer, or selecting from the pull-down menu, File > New.
This opens "Create a New" window that appears to be a wizard. What would I select at this point? Options are: Database Connection, Table, View, Package, ...
I don't see an option for "Worksheet".
UPDATE:
OK, I found that if I select "SQL File", a worksheet becomes available. Perhaps this is what you intended. However, when I issue the command
select col1 from my_table where row_id = 1;it still returns 0 instead of 1. Hmm, maybe my initial assumption was wrong -- if this is a second (e.g. different) session, should I expect the changes made in the first session in SQL Developer (the UPDATE command) WITHOUT a commit, to be observed in this second session? I thought that changes made in one session were not viewable in a different session until these changes are committed in the first session? If so, how to show this in SQL Developer? I must be missing something basic here.
Or, is SQL Developer issuing some sort of "auto-commit" without my knowledge?
Edited by: tem on Apr 18, 2012 8:00 AM -
Attach multiple emails to one master email using Java mail API
Java version: JDK 1.5.0_15
Hi,
I am using Java API to send email using our corporate microsoft exchange server. Everything is working fine, now I have a requirement to attach multiple emails to one master email and send.
Question:
Using JAVA API is it possible to attach multiple emails to one email?
Regards,
ArupThe beginning of this FAQ entry tells you how to attach one message to another message:
http://www.oracle.com/technetwork/java/javamail/faq/index.html#forward -
How to store multiple data in one aray at one go?
Hi i am creating a Recipe Cooking Book and i have got a recipe class, ingredient class, equipment class and jFORM GUI. the gui form will have a list and it will contain couple of equipments. the user should be able to select more than 1 equipments which would use the pass- by - value to the recipe class and it will be passed to equipment class.
The problem that encounter is that when i have to select multiple values from list, it should store all selected equipments to array.
This is where i am stuck as i don't know how to store couple of equipment at one creation.
This is my recipe constructor in recipe class
public Recipe(int aRecipeID, String aRecipeName, String aCountryofOrigin,
String aType, String aPreparationTime, String aCookingTime,
String aRecipeDescription, String aProcedure,
ClsEquipment[] aequipment, String aImage1, String aImage2,
String aImage3) {
Create(aRecipeID, aRecipeName, aCountryofOrigin, aType,
aPreparationTime, aCookingTime, aRecipeDescription, aProcedure,
aequipment, aImage1, aImage2, aImage3);
public void Create(int aRecipeID, String aRecipeName,
String aCountryofOrigin, String aType,
String aPreparationTime, String aCookingTime,
String aRecipeDescription, String aProcedure,
ClsEquipment[] aequipment, String aImage1, String aImage2,
String aImage3) {
RecipeID = aRecipeID;
RecipeName = aRecipeName;
CountryofOrigin = aCountryofOrigin;
Type = aType;
PreparationTime = aPreparationTime;
CookingTime = aCookingTime;
RecipeDescription = aRecipeDescription;
Procedure = aProcedure;
*equipment[j] = aequipment[k];*
Image1 = aImage1;
Image2 = aImage2;
Image3 = aImage3;
this is The command that i have in Jform gui
public void jRcreateButton_actionPerformed(ActionEvent e) {
int i=0;
myRecipe.Create(Integer.parseInt(jRidTextField.getText()),jRnameTextField.getText(),jRcountryTextField.getText(),jRtypeTextField.getText(),jRptimeTextField.getText(),jRctimeTextField.getText(),jRdescriptionTextArea.getText(), jRprocedureTextArea.getText(),new ClsEquipment(jAEequipmentList.getSelectedValues()),jRimage1TextField.getText(),jRimage2TextField.getText(),jRimage3TextField.getText());
Let me conclude what i am trying to do. Basically i want the user to select more than 1 equipments from the List and the user should also input other recipe data. once this is done, the should click on create.
when creating one recipe, u need more than 1 equipment so that created recipe should store selected equipments, which i will later on retrieve and display on screen.
can u please guide me where i am goin wrong and how i could fix it.
thank you in advance
Edited by: JAVABABY on Feb 18, 2008 8:40 AM*equipment[j] = aequipment[k];*JList's getSelectedValues() method returns an array of Objects, so if you wanted to store it into another Object[] reference, you'd just use
equipment = aequipment;But, you are storing it as an Equipment array, so you'll need to loop over the Object array and cast each element to an Equipment reference, and store it into the Equipment array. Something like this:
equipment = new Equipment[aequipment.length];
for (each element x in aequipment) {
equipment[x] = (Equipment)aequipment[x];
} -
How to set multiple senders for one account
Hi all,
I have a BIS account with my provider and a paid gmail account which collect for me mails from different address. Is it possible to set multiple senders for this account, thus it seems that I'm replying from one of these address and not only from my google address? In fact, it's important for me also that all mails come out from the same SMTP server (google).
Thanks in advance.
Best regards,
PierluigiFor the BlackBerry to "send using" a specific email account, it must be set up on your BIS account as an email account, otherwise, you can send from that account.
You can do that, and then block ALL incoming emails from those accounts, and allow only incoming mail from your one Gmail account, if you desire.
1. If any post helps you please click the below the post(s) that helped you.
2. Please resolve your thread by marking the post "Solution?" which solved it for you!
3. Install free BlackBerry Protect today for backups of contacts and data.
4. Guide to Unlocking your BlackBerry & Unlock Codes
Join our BBM Channels (Beta)
BlackBerry Support Forums Channel
PIN: C0001B7B4 Display/Scan Bar Code
Knowledge Base Updates
PIN: C0005A9AA Display/Scan Bar Code -
HT1879 how to buy multiple songs for one person & pay for all at once
i want to purchase a bunch of singles for one person, & pay for all at once. is that possible?
Basis can do a export and import transport, still if don't have connection between boxes.
or
check this
http://www.sap-basis-abap.com/abap/copy-program-variants-from-one-to-another.htm
a® -
How to Print multiple Records under one level in Etext templates.
Hi,
I am working on the Etext templates and customizing the standard template “US NACHA PPD FORMAT”.
This standard template don’t have a addenda record.. I have modified and it is working for single Addenda records. But when I have multiple ADDENDA records to be printed in one particular *<outboundpayment>* level, it is not printing.
How do I modify the template so that Multiple Addenda records get printed?
Note: I have multiple *<MyPayables>* tags under *<OutboundPayment>* tags.
Please help me in understanding this…
Regards
Pradeep GWhat you probably need to do is generate each bio
individually with the
<cfdocument...> tag just the way you want them. And
then use some of
the advanced <cfpdf...> functionality that allows you
to append two or
more individual PDF's into a single large PDF.
Here are some resources that describe some of the
<cfpdf...> functionality.
http://www.coldfusionjedi.com/index.cfm/2007/7/9/ColdFusion-8-Working-with-PDFs-Part-1
http://www.coldfusionjedi.com/index.cfm/2007/7/10/ColdFusion-8-Working-with-PDFs-Part-2
http://cfpdf.blogspot.com/
http://cfpdf.blogspot.com/2007/06/cfpdf-action-merge_27.html
http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=cfpdf_02.html -
SRM MDM - store multiple pricing for one entry and have it select the price based on a users site
I've had an interesting request. We have a region where they have one supplier who will support some products for multiple sites. The sites are in different cities and so the pricing varies based on the location of the user. I know how to do price scaling in SRM MDM but wasn't sure if there was a way to have one part that could someone pick the right price based on the user. I don't think this can be done since we don't pass any "user" information in the OCI connection.
Has anyone run into this scenario and was there some other way to not duplicate the entries or create a separate view just because the pricing was different for the same product but different site? I'm open for suggestions. I'm looking to make long term maintenance of the data as easy as possible.
We are still running SRM MDM 5.5 SP6
Thanks,
CathyTom,
Check if the below given link can give you some lead.
http://help.sap.com/saphelp_NW04/helpdata/en/dc/dc7614099b11d295320000e8353423/content.htm
Thanks,
K.Kiran. -
How to get multiple records in one row and different column
Hi All,
I am using oracle database 11g
and i have a two tables table_1, table_2
table_1 having columns
emp_no
first_name
middle_name
last_name
email
and table_2 having columns
emp_no
phone_type
phone_number
and having entires
emp_no phone_type phone_number
1001 MOB 9451421452
1001 WEMG 235153654
1001 EMG 652341536
1002 MOB 9987526312
1003 WEMG 5332621456
1004 EMG 59612356
Now i want the output of values with phone type as MOB or WEMG in a single row with different columns
emp_no first_name middle_name last_name email mobile officeno
1001 mark null k [email protected] 9451421452 235153654
1002 john cena gary [email protected] 9987526312 null
1003 dany null craig [email protected] null 5332621456
1004 donald finn sian [email protected] null null
can i have any inputs to achive this???
Regards
$sidFrank Kulash wrote:
sonething like this:Frank, you missed aggregate function (pivot requires one). However main thing is it will cause ORA-01748:
with table_1 as (
select 1001 emp_no,'mark' first_name,null middle_name,'k'last_name,'[email protected]' email from dual union all
select 1002,'john','cena','gary','[email protected]' from dual union all
select 1003,'dany',null,'craig','[email protected] null' from dual union all
select 1004,'donald','finn','sian','[email protected]' from dual
table_2 as (
select 1001 emp_no,'MOB' phone_type,9451421452 phone_number from dual union all
select 1001,'WEMG',235153654 from dual union all
select 1001,'EMG',652341536 from dual union all
select 1002,'MOB',9987526312 from dual union all
select 1003,'WEMG',5332621456 from dual union all
select 1004,'EMG',59612356 from dual
SELECT *
FROM table_1 t1
JOIN table_2 t2 ON t1.emp_no = t2.emp_no
PIVOT ( max(t2.phone_number)
FOR t2.phone_type IN ( 'MOB' AS mob
, 'WEMG' AS wemg
FOR t2.phone_type IN ( 'MOB' AS mob
ERROR at line 19:
ORA-01748: only simple column names allowed hereYou need to:
with table_1 as (
select 1001 emp_no,'mark' first_name,null middle_name,'k' last_name,'[email protected]' email from dual union all
select 1002,'john','cena','gary','[email protected]' from dual union all
select 1003,'dany',null,'craig','[email protected] null' from dual union all
select 1004,'donald','finn','sian','[email protected]' from dual
table_2 as (
select 1001 emp_no,'MOB' phone_type,9451421452 phone_number from dual union all
select 1001,'WEMG',235153654 from dual union all
select 1001,'EMG',652341536 from dual union all
select 1002,'MOB',9987526312 from dual union all
select 1003,'WEMG',5332621456 from dual union all
select 1004,'EMG',59612356 from dual
table_3 as (
select t1.emp_no,first_name,middle_name,last_name,email,
phone_type,phone_number
FROM table_1 t1
LEFT JOIN table_2 t2 ON t1.emp_no = t2.emp_no
SELECT *
FROM table_3
PIVOT ( max(phone_number)
FOR phone_type IN ( 'MOB' AS mob
, 'WEMG' AS wemg
EMP_NO FIRST_ MIDD LAST_ EMAIL MOB WEMG
1004 donald finn sian [email protected]
1003 dany craig [email protected] null 5332621456
1001 mark k [email protected] 9451421452 235153654
1002 john cena gary [email protected] 9987526312
SQL>SY. -
How to post multiple images in one blog post using iweb
Hi
I would like to post multiple images in a single blog post. When ever I add a second or third image in the "entry" section of iweb, it does not show up in the blog post on the homepage of the blog. does anyone know if it is even possible to have multiple, separate images in one post, and if so, how.
Here is a link to my blog: http://www.hoopography.com. You can see how there is only one image. I I want to talk about multiple items, I need to create an image in Pages and put them all together. I would really like to break out of the one box (placeholder) mold. I feel so constrained in iweb right now. I think I have done a lot with my blog, but I am always looking to learn more about iweb and improve my blog. Thanks for any help!!!what's the url of your blog? I'd like to check it out. I'm always interested in learning more about iWeb to improve my blogs. Mine are: http://www.hoopography.com and http://www.wnysportscards.com
-
How can load properties file for one time and use in entire application
Hi folks,
I dont want to read properties file every time , and want to get property value in any servelet or jsp page.(means i want to read only property file only for once and want to get value in any where ) , how to do this.
Message was edited by:
RajeshwarReddyTmeans we have to read file every time Know but i dont
want to be happen that ??? No you don't . You read the file once. You store it in the hashmap. Then you hand that hashmap to whatever class needing the data.
getProperties() returns the hashmap, doesn't read the file.
Maybe I should have called the method getMap or something.
Message was edited by:
karma-9 -
How do i scan multiple pages for one attachment
I know how to scan but I don't know how to scan multiple pages for one attachement....Help please
Hi dagda24,
You can scan multiple pages into a single document with the scan to PDF option. Use the following steps to do so:
1. Open MP Navigator.
2. Click One Clcik.
3. Click Save to PC.
4. Change the File Type from PDF to PDF (multiple pages).
5. Make any other changes as needed, then click scan.
Did this answer your question? Please click the Accept as Solution button so that others may find the answer as well. -
Concatenate multiple records into one single record
Hello everyone,
Can anyone guide me how to merge multiple records into one single record
like......... I am getting the data in the file like
aaaaa/bbbbbbb/ccccccccccc/dddddddddddd/eee
ffffff/gggg/hhhhhhhhhhhhhh
/123/4567/55555/99999999/kaoabfa/eee
fffff/kkkkkkkk/llllllllllllllllllllllll
when i use gui_upload I am getting the data into the internal table in the above format.
My main intension is to split the record at / to multiple lines and dowload it into another file.
What i am planning to do is... if the line does not start with / then i want to concatenate the multiple lines into single line and then split it into multiple records. Can anyone guide me how to achieve this.Yes, it should work.
In my example
Loop at itab.
concatenate i_text itab into i_text.
endloop.
You change that loop for the loop of your internal table with the file records
So if you have this three records
'aaaa/bbb/ccc'
'/dddd/efg'
'hijk/lmn'
i_text will look like this at the end
'aaaa/bbb/ccc/dddd/efghijk/lmn'
then in this part of the code
split i_text at '/' into table itab2.
itab2 will have the records looking like this
aaaa
bbb
ccc
dddd
efghijk
lmn' -
Delete Multiple Records from Item Master
Hi,
We received wrong master data which has been uploaded and two groups have to be deleted. All the items in those particular groups have also to be deleted. Can anyone suggest how to delete multiple records from Item Master?
Currently I am navigating through each Item and doing a Right Click + Remove. It is very painful given the huge number of records.
Regards
SudattHi Sudatt.....
I recommend you not to run any kind of delete or update SQL query as it harms DB.
You can create your own front end application with the help of any technical consultant which can be
achieved very easily. Else such problems create a big problem during upgradation to next version.......
Regards,
Rahul
Maybe you are looking for
-
When I want to downald a game of cars that cost 0.99 and it says it dont work
-
i transferred PPT files from a windows based laptop to my macbook, at first it was able to run the animations in the file no problem, its my first time to use a mac also bythe way, so i started downloading freebies like the VLC, FLIP4MAC, and other p
-
Help!!! remote client throws NullPointerException
Hi, I get the following exception when trying to use a remote client on Win2k with weblogic 6.0 evaluation copy, trying to connect to a Unix machine running Weblogic 5.1 sp9. I am simply trying to run te statefulSession bean client example. please he
-
How to create simple 3D illustrations?
Hello! Please, take a look at this image: I am looking for a way to create these simple kinds of 3D illustrations. I use Illustrator myself in my daily work, but almost never for 3D (probably because I almost never create any 3D material). My questio
-
Hi I Run Windows 7. Since upgrading to Firefox 4.0 I am unable to "clear history" and get the message "QuickTime failed to initialize". I can delete history when in safe mode with plug-ins disabled. Re-installing quick time fails to resolve the issue