Help for writing XSLT
Hi,
I have an Source XML as follows.
<ROOTNODE>
<A>value</A>
<B>value</B>
</ROOTNODE>
<ROOTNODE>
<A>value</A>
<B>value</B>
</ROOTNODE>
<CHILD1>
<A>value</A>
<B>value</B>
</CHILD1>
NOW AFTER PERFORMING XSLT I NEED TO GET THE RESULT XML AS FOLLOWS.
<ROOTNODE>
<ROOTNODE>
<A>value</A>
<B>value</B>
</ROOTNODE>
<ROOTNODE>
<A>value</A>
<B>value</B>
</ROOTNODE>
</ROOTNODE>
<CHILD1>
<CHILD1>
<A>value</A>
<B>value</B>
</CHILD1>
</CHILD1>
The problem is i donot know what elements will be coming in the source xml and i cant hardcode the element names in the xslt.
hi,
Try with OOPs method. here is the sample code
data :lo_mxml type ref to cl_xml_document,
m_document type ref to if_ixml_document,
l_dom type ref to if_ixml_element,
l_ele type ref to if_ixml_element,
l_ele1 type ref to if_ixml_element,
l_ele2 type ref to if_ixml_element,
l_ele3 type ref to if_ixml_element,
l_ele4 type ref to if_ixml_element,
l_ele5 type ref to if_ixml_element,
l_ele6 type ref to if_ixml_element,
l_ele7 type ref to if_ixml_element,
m_doctype type ref to if_ixml_document_type,
g_ixml type ref to if_ixml,
l_text type ref to if_ixml_text,
ls_srctab1 type xstring,
l_retcode type sysubrc. "#EC *.
create object lo_mxml.
perform header_xml.
l_retcode = lo_mxml->create_with_dom( document =
m_document ).
CALL METHOD LO_MXML->DISPLAY.
call method lo_mxml->render_2_xstring
exporting
pretty_print = 'X'
importing
retcode = l_retcode
stream = l_string.
class cl_ixml definition load.
g_ixml = cl_ixml=>create( ).
m_document = g_ixml->create_document( ).
call method m_document->create_document_type
exporting
name = 'cXML'
receiving
rval = m_doctype.
call method m_document->set_document_type
exporting
document_type = m_doctype.
call method l_dom->set_attribute
exporting
name = 'payloadID'
value = l_string
receiving
rval = l_retcode.
call method l_dom->set_attribute
exporting
name = 'timestamp'
value = l_string
receiving
rval = l_retcode.
*___HEADER NODE (CHILD OF CXML NODE)
l_ele = m_document->create_element( name = 'Header' ).
l_retcode = l_dom->append_child( l_ele ).
*___FROM NODE (CHILD OF HEADER NODE)
l_ele1 = m_document->create_element( name = 'From' ).
l_retcode = l_ele->append_child( l_ele1 ).
l_ele2 = m_document->create_element( name
= 'Credential' ).
l_retcode = l_ele1->append_child( l_ele2 ).
*____ATTRIBUTE FOR CREDENTIAL FROM NODE
move gc_cre_from to l_string.
call method l_ele2->set_attribute
exporting
name = 'domain'
value = l_string
receiving
rval = l_retcode.
Hope this will help for you
Cheers,
Sasi
Similar Messages
-
Hello guys,
I need help in writing XSLT.I have a XML structure as below.
<PushEventResult>
<pushEventDT>
<id>XX</id>
<serialNumber>111</serialNumber>
<Mpxn>1X1</Mpxn>
<EventData>
<alarmDtime>xxx</alarmDtime>
<alarmType>UP</alarmType>
<additionalData>dummy</additionalData>
</EventData>
<EventData>
<alarmDtime>xxx</alarmDtime>
<alarmType>DOWN</alarmType>
<additionalData>dummy</additionalData>
</EventData>
</pushEventDT>
</PushEventResult>
With XSLT I need to transform it in to this format.
<PushEventResult>
<pushEventDT>
<id>XX</id>
<serialNumber>111</serialNumber>
<Mpxn>1X1</Mpxn>
<EventData>
<alarmDtime>xxx</alarmDtime>
<alarmType>UP</alarmType>
<additionalData>dummy</additionalData>
</EventData>
</pushEventDT>
<pushEventDT>
<id>XX</id>
<serialNumber>111</serialNumber>
<Mpxn>1X1</Mpxn>
<EventData>
<alarmDtime>xxx</alarmDtime>
<alarmType>DOWN</alarmType>
<additionalData>dummy</additionalData>
</EventData>
</pushEventDT>
</PushEventResult>A possible attempt will be this set of templates.
<xsl:template match="PushEventResult">
<xsl:copy>
<xsl:apply-templates select="pushEventDT" />
</xsl:copy>
</xsl:template>
<xsl:template match="pushEventDT">
<xsl:for-each select="EventData">
<pushEventDT>
<xsl:call-template name="const_struct" />
<xsl:copy-of select="." />
</pushEventDT>
</xsl:for-each>
</xsl:template>
<xsl:template name="const_struct">
<xsl:apply-templates select="preceding-sibling::*[not(name()='EventData')]" mode="const" />
</xsl:template>
<xsl:template match="*" mode="const">
<xsl:copy-of select="." />
</xsl:template> -
Need help for writing extract program
hi
i need help for writing extract program to retriew data from legacy system.
i already developed bdc programs for me31k and me21.
my requirement is to write extract program s for those t.codes.
to retriew data from legacy system and stored in flat file.i need help with a java program. it is a program that allows the user to enter a student's GPA, number of extracurricular activities, and number of service activities. The user can not enter a gpa above 4.0 or below 0. The user can not enter a negative number for the number of both activities. If the student meets the following criteria: 1) GPA of 3.8 or above and at least one extracurricular activity and one service activity, 2) GPA below 3.8 but at least 3.4 and a total of at least three extracurricular and service activities, 3) GPA below 3.4 but at least 3.0 and at least two extracurricular activities and three service activities, the message "Scholarship candidate" should display. If the student does not meet the criteria above, then the message"not a candidate" should display. Can you help me, please?
You haven't posted ANY 'java program' for us to help with.
The forum is NOT a coding service. It is to help you with YOUR code.
Post the code you have written and SHOW us (don't just tell us) how you compile it and execute it and the results you get. Then we can help you with any problems you are are having.
If you need help understanding just what the program should be doing you need to ask your instructor to clarify the assignment. -
Help for writing a Map with out JDeveloper
Hi all,
Where can I find help documents or sample files so that I can write a custom mapping between an Oracle Object and Java Object. Yeh, this might be a simple task when we use JDeveloper , but just for writing this small piece of code I am not in a position to download JDeveloper of size 230MB and learn how to use it...
Plese give suggestions...
Thanks in advance...
Sateesh
nullTake a look at the JPublisher user's guide. You can also download JDeveloper in 20MB chunks if you can't download all 230MB at once.
Blaise -
Solicit help for writing a scipts
Hi,
I made a form (with Adobe Acrobat Reader Pro 9), I would like to ameliorate the way to display the inputted data
I made a screen capture which summarise the modification wanted,
in (1) I would like to be able to select the short date and to diplay it like this: (dd/mm/yyyy)
in (2) I've tried a script but the field in the result column is always equal to 1 when nothing have been input in C1
var a = this.getField("Resultat");
h.value = 0;
var b = this.getField("ValeurB");
var c = this.getField("ValeurA");
a.value = (b.value - c.value) + 1;
in (3) I have to count always (with my fingers lol) the time spent between the date started and date finished, is it possible to write a script?
( I've never used Javascript before, it's my first experience)
thank you in advance for your help.For the date difference calculation, you can do something like the following for the custom Calculate script of the field that shows the difference:
(function () {
// Get the date field values
var s1 = getField("d1").valueAsString;
var s2 = getField("d2").valueAsString;
// If both fields have an entry...
if (s1 && s2) {
// Convert the date strings to date objects
var d1 = util.scand("dd/mm/yyyy", s1);
var d2 = util.scand("dd/mm/yyyy", s2);
// Calculate the difference in days
var diff = Math.floor((d2 - d1) / 864e5);
// Set this field to the difference
event.value = diff;
} else {
// Clear this field of both dates are not entered
event.value = "";
Where "d1" and "d2" are the names of your two date fields. This assumes you have a single field for each date formatted like dd/mm/yyyy. If you're using a separate drop down for the day, month, and year, you'd have to build the date string from the individual field values, but the rest of the script would be the same. -
Please sugges the link helpful for writing efficient sql queries
Please suggest any good resource that is weblink which can help me in optimizing sql queries. especially while writing select statements improve the execution time of the sql query.
Thanx in advance
prasanthin general I found books from O'Reilly very helpful (not only for Oracle, but for Unix too).
Moreover there is pretty good Oracle Documentation available.
After all, it's not only about writing good queries, but also about setting up data-models, indexes, primary keys, etc.
Look for a real slow computer, take a lot of data, then try writing your speedy queries. This is the school of hard knocks, on the long run it's the best training. -
Need help for writing an own pulse script
Hello,
i want to generate a simple current pulse with my keithley 2602A, but i have a problem with the pulsewidth.
I observed the length of the pulse on an oscilloscope and it's nearly constant for about four times and then, the next time it takes about 40 seconds longer.
I wrote the following script:
smua.measure.rangev = 6.000000
smua.measure.rangei = 1.000000
smua.source.rangev = 6.000000
smua.source.rangei = 1.000000
smua.sense = 1.000000
ntimes = 100000.000000
smua.source.func = smua.OUTPUT_DCAMPS
smua.source.leveli = 0.186000
smua.source.limiti = 0.200000
smua.source.limitv = 5.000000
mybuf = smua.makebuffer(2)
mybuf.clear()
mybuf.appendmode = 1
smua.measure.count = 1
smua.source.output = 1
for i = 1 , ntimes do -- Perform following command(s) ntimes
end --for
smua.measure.i(mybuf)
smua.measure.v(mybuf)
smua.source.output = 0
I figured out, that the problem is in smua.measure.X and not in the loop.
Could you please help me?Definitely the wrong forum.
The forum you arre looking for can be found here:
http://forum.keithley.com -
Hi All,
I am new to the plugin development.
I was looking for a sample plugin which can pop a messege or dialoag box while saving or opening
Can anyone help me by sending a sample plugin code so that i can know the flow what a plugin does.
my e-mail id : [email protected]
Thanks
SrinivasThank you Mr Ian
I am able to start the plugin through the SDK
I have taken the WriteFishPrice sample from the SDK
the plugin works
but the values in the dropdown are hard coded in .fr file
is there any way where i can send the parameters to .fr file to add more items and not defining many list items in the WFPID.h
I might have confused you. let me clear the topic
in the example the Declaring of the combo box (dropdownlist) is in WFPID.h,
DECLARE_PMID(kWidgetIDSpace, kWFPDropDownListWidgetID, kWFPPrefix + 2)
and in the example they have defined 4 dropdownitems
#define kWFPDropDownItem_1Key kWFPStringPrefix "kWFPDropDownItem_1Key"
#define kWFPDropDownItem_2Key kWFPStringPrefix "kWFPDropDownItem_2Key"
#define kWFPDropDownItem_3Key kWFPStringPrefix "kWFPDropDownItem_3Key"
#define kWFPDropDownItem_4Key kWFPStringPrefix "kWFPDropDownItem_4Key"
where in the WFP_enUS.fr file they add the items to all the strings they defined
kWFPDropDownItem_1Key, "Tuna",
kWFPDropDownItem_2Key, "Salmon",
kWFPDropDownItem_3Key, "Bonito",
kWFPDropDownItem_4Key, "Yellowtail",
Is there any way that instead of defining 4 dropdownitem keys i define 1 and make as a collection of items and send the parameter to the .fr file?
Please guide me
Thank you
-Srinivas -
Need help for writing script for Cisco GSS
/* Style Definitions */
table.MsoNormalTable
{mso-style-name:"Table Normal";
mso-tstyle-rowband-size:0;
mso-tstyle-colband-size:0;
mso-style-noshow:yes;
mso-style-priority:99;
mso-style-qformat:yes;
mso-style-parent:"";
mso-padding-alt:0in 5.4pt 0in 5.4pt;
mso-para-margin:0in;
mso-para-margin-bottom:.0001pt;
mso-pagination:widow-orphan;
font-size:11.0pt;
font-family:"Calibri","sans-serif";
mso-ascii-font-family:Calibri;
mso-ascii-theme-font:minor-latin;
mso-fareast-font-family:"Times New Roman";
mso-fareast-theme-font:minor-fareast;
mso-hansi-font-family:Calibri;
mso-hansi-theme-font:minor-latin;
mso-bidi-font-family:"Times New Roman";
mso-bidi-theme-font:minor-bidi;}
We would like to know if running script from DB server it can activate and suspend of answer group instancesDefinitely the wrong forum.
The forum you arre looking for can be found here:
http://forum.keithley.com -
HELP for writing a Programme that displays text.
Check the API for methods in JEditorPane. Then write and run a program that uses a JEditorPane to just display text, just text.
What should I add or delete in the following code so that it just displays TEXT.
My code is ----->
WEBBROWSER------------------>
import java.awt.*;
import java.awt.event.*;
import java.net.*;
// Java extension packages
import javax.swing.*;
import javax.swing.event.*;
public class WebBrowser extends JFrame {
private WebToolBar toolBar;
private WebBrowserPane browserPane;
// WebBrowser constructor
public WebBrowser()
super( "Deitel Web Browser" );
// create WebBrowserPane and WebToolBar for navigation
browserPane = new WebBrowserPane();
toolBar = new WebToolBar( browserPane );
// lay out WebBrowser components
Container contentPane = getContentPane();
contentPane.add( toolBar, BorderLayout.NORTH );
contentPane.add( new JScrollPane( browserPane ),
BorderLayout.CENTER );
// execute application
public static void main( String args[] )
WebBrowser browser = new WebBrowser();
browser.setDefaultCloseOperation( EXIT_ON_CLOSE );
browser.setSize( 640, 480 );
browser.setVisible( true );
} // end main
} // end class WebBrowser
WebPane.java
// WebBrowserPane.java
// WebBrowserPane is a simple Web-browsing component that
// extends JEditorPane and maintains a history of visited URLs.
package browser;
// Java core packages
import java.util.*;
import java.net.*;
import java.io.*;
// Java extension packages
import javax.swing.*;
import javax.swing.event.*;
public class WebBrowserPane extends JEditorPane {
private List history = new ArrayList();
private int historyIndex;
// WebBrowserPane constructor
public WebBrowserPane()
// disable editing to enable hyperlinks
setEditable( false );
// display given URL and add it to history
public void goToURL( URL url )
displayPage( url );
history.add( url );
historyIndex = history.size() - 1;
// display next history URL in editorPane
public URL forward()
historyIndex++;
// do not go past end of history
if ( historyIndex >= history.size() )
historyIndex = history.size() - 1;
URL url = ( URL ) history.get( historyIndex );
displayPage( url );
return url;
// display previous history URL in editorPane
public URL back()
historyIndex--;
// do not go past beginning of history
if ( historyIndex < 0 )
historyIndex = 0;
// display previous URL
URL url = ( URL ) history.get( historyIndex );
displayPage( url );
return url;
// display given URL in JEditorPane
private void displayPage( URL pageURL )
// display URL
try {
setPage( pageURL );
// handle exception reading from URL
catch ( IOException ioException ) {
ioException.printStackTrace();
WebPAne.java---------------
// WebToolBar.java
// WebToolBar is a JToolBar subclass that contains components
// for navigating a WebBrowserPane. WebToolBar includes back
// and forward buttons and a text field for entering URLs.
package browser;
// Java core packages
import java.awt.*;
import java.awt.event.*;
import java.net.*;
// Java extension packages
import javax.swing.*;
import javax.swing.event.*;
public class WebToolBar extends JToolBar
implements HyperlinkListener {
private WebBrowserPane webBrowserPane;
private JButton backButton;
private JButton forwardButton;
private JTextField urlTextField;
// WebToolBar constructor
public WebToolBar( WebBrowserPane browser )
super( "Web Navigation" );
// register for HyperlinkEvents
webBrowserPane = browser;
webBrowserPane.addHyperlinkListener( this );
// create JTextField for entering URLs
urlTextField = new JTextField( 25 );
urlTextField.addActionListener(
new ActionListener() {
// navigate webBrowser to user-entered URL
public void actionPerformed( ActionEvent event )
// attempt to load URL in webBrowserPane
try {
URL url = new URL( urlTextField.getText() );
webBrowserPane.goToURL( url );
// handle invalid URL
catch ( MalformedURLException urlException ) {
urlException.printStackTrace();
// create JButton for navigating to previous history URL
backButton = new JButton( new ImageIcon(
getClass().getResource( "images/back.gif" ) ) );
//backButton = new JButton( "Back");
backButton.addActionListener(
new ActionListener() {
public void actionPerformed( ActionEvent event )
// navigate to previous URL
URL url = webBrowserPane.back();
// display URL in urlTextField
urlTextField.setText( url.toString() );
// create JButton for navigating to next history URL
forwardButton = new JButton( new ImageIcon(
getClass().getResource( "images/forward.gif" ) ) );
//forwardButton = new JButton("Fwd");
forwardButton.addActionListener(
new ActionListener() {
public void actionPerformed( ActionEvent event )
// navigate to next URL
URL url = webBrowserPane.forward();
// display new URL in urlTextField
urlTextField.setText( url.toString() );
// add JButtons and JTextField to WebToolBar
add( backButton );
add( forwardButton );
add( urlTextField );
} // end WebToolBar constructor
// listen for HyperlinkEvents in WebBrowserPane
public void hyperlinkUpdate( HyperlinkEvent event )
// if hyperlink was activated, go to hyperlink's URL
if ( event.getEventType() ==
HyperlinkEvent.EventType.ACTIVATED ) {
// get URL from HyperlinkEvent
URL url = event.getURL();
// navigate to URL and display URL in urlTextField
webBrowserPane.goToURL( url );
urlTextField.setText( url.toString() );
Please REPLY.WEBBROWSER------------------>
import java.awt.*;
import java.awt.event.*;
import java.net.*;
// Java extension packages
import javax.swing.*;
import javax.swing.event.*;
public class WebBrowser extends JFrame {
private WebToolBar toolBar;
private WebBrowserPane browserPane;
// WebBrowser constructor
public WebBrowser()
super( "Deitel Web Browser" );
// create WebBrowserPane and WebToolBar for navigation
browserPane = new WebBrowserPane();
toolBar = new WebToolBar( browserPane );
// lay out WebBrowser components
Container contentPane = getContentPane();
contentPane.add( toolBar, BorderLayout.NORTH );
contentPane.add( new JScrollPane( browserPane ),
BorderLayout.CENTER );
// execute application
public static void main( String args[] )
WebBrowser browser = new WebBrowser();
browser.setDefaultCloseOperation( EXIT_ON_CLOSE );
browser.setSize( 640, 480 );
browser.setVisible( true );
} // end main
} // end class WebBrowser
WebPane.java
// WebBrowserPane.java
// WebBrowserPane is a simple Web-browsing component that
// extends JEditorPane and maintains a history of visited URLs.
package browser;
// Java core packages
import java.util.*;
import java.net.*;
import java.io.*;
// Java extension packages
import javax.swing.*;
import javax.swing.event.*;
public class WebBrowserPane extends JEditorPane {
private List history = new ArrayList();
private int historyIndex;
// WebBrowserPane constructor
public WebBrowserPane()
// disable editing to enable hyperlinks
setEditable( false );
// display given URL and add it to history
public void goToURL( URL url )
displayPage( url );
history.add( url );
historyIndex = history.size() - 1;
// display next history URL in editorPane
public URL forward()
historyIndex++;
// do not go past end of history
if ( historyIndex >= history.size() )
historyIndex = history.size() - 1;
URL url = ( URL ) history.get( historyIndex );
displayPage( url );
return url;
// display previous history URL in editorPane
public URL back()
historyIndex--;
// do not go past beginning of history
if ( historyIndex < 0 )
historyIndex = 0;
// display previous URL
URL url = ( URL ) history.get( historyIndex );
displayPage( url );
return url;
// display given URL in JEditorPane
private void displayPage( URL pageURL )
// display URL
try {
setPage( pageURL );
// handle exception reading from URL
catch ( IOException ioException ) {
ioException.printStackTrace();
WebPAne.java---------------
// WebToolBar.java
// WebToolBar is a JToolBar subclass that contains components
// for navigating a WebBrowserPane. WebToolBar includes back
// and forward buttons and a text field for entering URLs.
package browser;
// Java core packages
import java.awt.*;
import java.awt.event.*;
import java.net.*;
// Java extension packages
import javax.swing.*;
import javax.swing.event.*;
public class WebToolBar extends JToolBar
implements HyperlinkListener {
private WebBrowserPane webBrowserPane;
private JButton backButton;
private JButton forwardButton;
private JTextField urlTextField;
// WebToolBar constructor
public WebToolBar( WebBrowserPane browser )
super( "Web Navigation" );
// register for HyperlinkEvents
webBrowserPane = browser;
webBrowserPane.addHyperlinkListener( this );
// create JTextField for entering URLs
urlTextField = new JTextField( 25 );
urlTextField.addActionListener(
new ActionListener() {
// navigate webBrowser to user-entered URL
public void actionPerformed( ActionEvent event )
// attempt to load URL in webBrowserPane
try {
URL url = new URL( urlTextField.getText() );
webBrowserPane.goToURL( url );
// handle invalid URL
catch ( MalformedURLException urlException ) {
urlException.printStackTrace();
// create JButton for navigating to previous history URL
backButton = new JButton( new ImageIcon(
getClass().getResource( "images/back.gif" ) ) );
//backButton = new JButton( "Back");
backButton.addActionListener(
new ActionListener() {
public void actionPerformed( ActionEvent event )
// navigate to previous URL
URL url = webBrowserPane.back();
// display URL in urlTextField
urlTextField.setText( url.toString() );
// create JButton for navigating to next history URL
forwardButton = new JButton( new ImageIcon(
getClass().getResource( "images/forward.gif" ) ) );
//forwardButton = new JButton("Fwd");
forwardButton.addActionListener(
new ActionListener() {
public void actionPerformed( ActionEvent event )
// navigate to next URL
URL url = webBrowserPane.forward();
// display new URL in urlTextField
urlTextField.setText( url.toString() );
// add JButtons and JTextField to WebToolBar
add( backButton );
add( forwardButton );
add( urlTextField );
} // end WebToolBar constructor
// listen for HyperlinkEvents in WebBrowserPane
public void hyperlinkUpdate( HyperlinkEvent event )
// if hyperlink was activated, go to hyperlink's URL
if ( event.getEventType() ==
HyperlinkEvent.EventType.ACTIVATED ) {
// get URL from HyperlinkEvent
URL url = event.getURL();
// navigate to URL and display URL in urlTextField
webBrowserPane.goToURL( url );
urlTextField.setText( url.toString() );
} -
Help for writing to excel file from Java Program
Hi,
I am new to Java and Java API. I need to write to some specific cells of an excel file from a Java Program. Please anyone help me or give some directions.
Thanks,
ReetHi,
I saw an example while searching in google about importing jxl.*. Could you direct me how I can import this package as java does not have it. I heard that jxl is much easier that POI although I am not new to both of them.
Thanks,
Priya -
help needed for writing query
i have the following tables(with data) as mentioned below
FK*-foregin key (SUBJECTS)
FK**-foregin key (COMBINATION)
1)SUBJECTS(table name)
SUB_ID(NUMBER) SUB_CODE(VARCHAR2) SUB_NAME (VARCHAR2)
2 02 Computer Science
3 03 Physics
4 04 Chemistry
5 05 Mathematics
7 07 Commerce
8 08 Computer Applications
9 09 Biology
2)COMBINATION
COMB_ID(NUMBER) COMB_NAME(VARCHAR2) SUB_ID1(NUMBER(FK*)) SUB_ID2(NUMBER(FK*)) SUB_ID3(NUMBER(FK*)) SUBJ_ID4(NUMBER(FK*))
383 S1 9 4 2 3
384 S2 4 2 5 3
---------I actually designed the ABOVE table also like this
3) a)COMBINATION
COMB_ID(NUMBER) COMB_NAME(VARCHAR2)
383 S1
384 S2
b)COMBINATION_DET
COMBDET_ID(NUMBER) COMB_ID(FK**) SUB_ID(FK*)
1 383 9
2 383 4
3 383 2
4 383 3
5 384 4
6 384 2
7 384 5
8 384 3
Business rule: a combination consists of a maximum of 4 subjects (must contain)
and the user is less relevant to a COMB_NAME(name of combinations) but user need
the subjects contained in combinations
i need the following output
COMB_ID COMB_NAME SUBJECT1 SUBJECT2 SUBJECT3 SUBJECT4
383 S1 Biology Chemistry Computer Science Physics
384 S2 Chemistry Computer Science Mathematics Physics
or even this is enough(what i actually needed)
COMB_ID subjects
383 Biology,Chemistry,Computer Science,Physics
384 Chemistry,Computer Science,Mathematics,Physics
you can use any of the COMBINATION table(either (2) or (3))
and i want to know
1)which design is good in this case
(i think SUB_ID1,SUB_ID2,SUB_ID3,SUB_ID4 is not a
good method to link with same table but if 4 subjects only(and must) comes
detail table is not neccessary )
now i am achieving the result by program-coding in C# after getting the rows from oracle
i am using oracle 9i (also ODP.NET)
i want to know how can i get the result in the stored procedure itsef.
2)how it could be designed in any other way.
any help/suggestion is welcome
thanks for your time --PradeeshWell I forgot the table-alias, here now with:
SELECT C.COMB_ID
, C.COMB_NAME
, (SELECT SUB_NAME
FROM SUBJECTS
WHERE SUB_ID = C.SUB_ID1) AS SUBJECT_NAME1
, (SELECT SUB_NAME
FROM SUBJECTS
WHERE SUB_ID = C.SUB_ID2) AS SUBJECT_NAME2
, (SELECT SUB_NAME
FROM SUBJECTS
WHERE SUB_ID = C.SUB_ID3) AS SUBJECT_NAME3
, (SELECT SUB_NAME
FROM SUBJECTS
WHERE SUB_ID = C.SUB_ID4) AS SUBJECT_NAME4
FROM COMBINATION C;
As you need exactly 4 subjects, the columns-solution is just fine I would say. -
Need helping in writing query for finding percentage of duration
Can any one please help in writing query for this.
The table is like this :-
ID Region Month Duration
I1 R1 Jan 80
I2 R2 Jan 70
I3 R1 Jan 70
I4 R3 Jan 40
I5 R1 Feb 80
I6 R2 Feb 30
I7 R3 Mar 100
I want to write a query to find
% of duration for each and every region against each and every month.
Please help in solving this query. I am in urgent need of this.
Thanks in advance.I also have to do in MS Access 2003You also have to ask into an other forum since here it's an Oracle forum, to try to find Oracle solution.
Nicolas. -
Help me for writing the password script on solaris
hi,
help me for writing password scripts to change the user/root password.
in the script itself myself want to mention the new password.
now user want to login with the new password only.
model script:
echo $test:`perl -e '$x=crypt('$test123','test');
print $x'`::::::: >> /etc/shadow
test--->username
test123---->new password.
the above script is not working.
kindly help me for writing the script.
Regards,
rajaWell. For one thing, if you just append the new password to the /etc/shadow file there will be two entries for the user in that file (at least if the user already had a password). Which probably is a bad thing.
-
Mail has started sending duplicates of a message, especially group messages. It also opens 2 windows for writing a new email. Help. How do I fix this?
Unfortunately there isn't official commercial support for Mozilla Thunderbird from Mozilla Corp.. I believe some contributors here ([http://mozilla.magicfab.ca myself included]) do offer such support, though.
''Before doing anything else, please do exit Thunderbird completely and [https://support.mozilla.org/en-US/kb/profiles-tb#w_backing-up-a-profile backup the profile folder] - it contains all your email, settings, filters, etc.''
Regarding your issue, it looks like the mail folder information may be corrupt. In the left pane, in the folder list, right-click on the Sent folder and select '''Properties'''. Choose "'''Rebuild Index'''" or "'''Repair Folder'''" - do you even have that option? Once done, exit TB completely and restart it.
Updating to a newer version will help anyone help you, if only because some of the documentation for older Thunderbird versions is a bit harder to find and testing to try & reproduce your problem will be harder. Don't do this just yet, though :)
After this issue has been addressed I would suggest considering using IMAP if your provider allows you to, and of course archiving your email to Local Folders and doing regular backups of your profile.
If you want to arrange commercial support, contact me via the link I provided above and we can discuss rapidly. Otherwise I am fine continuing here, however I can only reply as time permits. I am in Montreal (so, EST time zone).
Maybe you are looking for
-
Why can't I download a movie from my iTunes Library to my iPod 4G?
I just bought a HD movie from iTunes, but when I tried to download it to my iPod, it would recognize that the movie was on my iPod, but the movie woudn't be in my Videos App on my iPod. So then I redownloaded it in SD, and I tried syncing it to it ag
-
I have a 30+ series bar chart and the dates along the bottom are not showing in order...a sample of one of the series is as follows: select null link, trunc(SAMPLE_TIME) label, SUM(EVENT_TIME) "CGS wait for IPC msg" from "DART"."DART_TOP5_TIMED" wher
-
Why have my tiff files on my external hard drive been converted to CR2 files?
I've been using Lightroom 3 with an external hard drive for a few years now with no problems. I shoot raw with my Canon t1i and jpg with my Canon SX-10. Just last week I hooked up my external hard drive and Lightroom wouldn't connect to it. Usually w
-
Hi, When I'm doing MIGO for Goods Receipt, its showing list of all PO in F4 for document no. I want list of only open PO. i.e. if MIGO is done for PO it should not come in list.
-
'max case when...then' does it work in Desktop reports as a calculation?
Hi! I've used 'max case when...then' in my SQL in Admin edition. It works fine. However when I try to use it as a part of my calculation: MAX(CASE WHEN (:Payroll Month 1 - Gross Sal) THEN TO_NUMBER(NVL("Gross Salary ".Basic Salary, 0)) Else 0 END) in