A consolidated using nested decode question

Hi Experts,

I have a requiement as I am trying to solve by nested to decode, but it gives bad result for certain values. I will be grateful for pointers on it. Here's the whole upward for a test case:

create table test (emp_id varchar2 (20), name varchar2 (20), e-mail varchar2 (100));

insert into test values ('1 ', 'a',' [email protected]');

insert into test values ('2 ', null,' [email protected]');

Insert test values ('3 ', null, null);

commit;

The requirement is to print the name if it is not null. If it is null then print email. If the email is also null then print emp_id.

Here is what I tried:

select decode(decode(name,null,nvl(email,'xxx')),'xxx',emp_id) from test where emp_id='3';

But this gives a null value for emp_id ' 2 'and ' 1'. I don't know where I am going wrong. Please suggest.

Thank you

Hello

If you want to know why the phrase DECODE you posted does not work, it helps to format your code.

Select decode (decoding (name

null

nvl (email, "xxx")

)

, "xxx."

emp_id

)

of the test

where emp_id = '3'

;

This makes it easy to see that the outward expression of DECODE has only 3 arguments.  This means that it will always return NULL or 3rd argument (emp_id).  Clearly, this isn't what you want: you want an expression that sometimes will return name and email, sometimes too.

As mentioned above, COALESCE seems to be the best way to do what you want.

Nested NVLs would be another (but of course lower) way.

CASE is also better than DECODE.

The following query shows how to get the same results in all these ways:

SELECT NVL (name

NVL (e-mail

emp_id

)

)            AS n

CASE

WHEN the name IS NOT NULL, THEN name

WHEN an email IS NOT NULL THEN an email

Emp_id ELSE

END AS c

DECODE (name,

, NULL, DECODE (e-mail

NULL, emp_id

E-mail

)

name

) AS d

OF the test

;

Again, I recommend COALESCE for this work.

Tags: Database

Similar Questions

  • Software used to decode the media not available on this system

    I read a lot on this subject on various sites of forms and failed to find a solution.

    My project is filmed in 1080i @22Mbps and is 2 hours long that I split on two discs... There is NO images or graphics aside a grab single image to roll over the titles, there is some .mp3 and one. WMA file for audio.

    My method of editing, I edited the entire project in a single calendar, so when I get overall even length I it spread over approximately a two-disc length... Disc 2 was made as H.264 blu - ray and any in yet for blu - ray authoring this worked flawlessly, however with disc one I get the error "the software used to decode the media not available on this system...". blah blah blah! »

    I'm working on windows 10 PC with enough RAM and processing power and graphics.

    Can anyone provide a reason or a solution please.

    I rechecked the timeline and there are no gaps or breaks in there, I made the file as H.264 and imported the .mp4 still work but flow is low.

    Thank you

    P.

    Ok.. then MPEG2-Blu-ray has imported and burned to disc correctly... I'll let discs go to the client in this format and hope that its ok for them

  • What approach would be best for creating a condition of display by using the DECODE function criteria?

    Hello world

    The requirement is to filter a LOV based on a date entered by the user and a condition that uses DECODE. If : update or : pSystemLinkageFunctionDate Exchange then the LOV should be updated. So, I created a VO of read-only by using SQL. But I can't create a view of criteria that uses the DECODING. What approach would be the best method to meet this requirement?

    Select

    PET.expenditure_type

    pet.start_date_active

    pet.end_date_active

    petsl.start_date_active

    petsl.end_date_active

    petsl.system_linkage_function

    Of

    pa_lookups pl

    pa_expend_typ_sys_links petsl

    pa_expenditure_types pet

    pa_system_linkages psl

    where 1 = 1

    and pet.unit_of_measure = pl.lookup_code

    and pet.expenditure_type = petsl.expenditure_type

    and petsl.system_linkage_function = psl.function

    and pl.lookup_type = 'UNIT '.

    and: pDate between nvl(pet.start_date_active,:pDate)

    and nvl(pet.end_date_active,:pDate)

    and: pDate between nvl(petsl.start_date_active,:pDate)

    and nvl(petsl.end_date_active,:pDate)

    and petsl.system_linkage_function = decode(:pSystemLinkageFunction,'L','S','E')

    James

    Hi Timo,

    ADF business components: 11.1.1.62.29

    Platform Java (TM): 1.6.0_24

    Oracle IDE: 11.1.1.6.38.62.29

    Support for version control: 11.1.1.6.38.62.29

    Thanks for the link... I'll take a look. However, the DECODING work now; I wasn't quite deep in the stack trace to find the error that turned out be related to one of the dregs.

    James

  • Survey using multiple-choice questions

    Hello

    I'm trying to get the answer to a poll, I am using multiple choice questions and each answer numbering as well as cpQuizInfoAnswerChoice = a number. I wanto then add this number to get a total score. The crash of the idea that dependign on the score of hat they get to take them to another slide.

    I have taken a quick glance at this guide here: http://blog.lilybiri.com/graded-survey

    It helped me a little, but what I need to do, is add the numbesr of a series of 10 questions.

    So if the user gets a score of 1, then 3, then 3, then 2, and so I would add the score for questions.

    Can someone please help, sorry I'm new to advanced actions, and I'm not sure what I have to write to make it work.

    Thanks a lot for any help

    I use version 6 of captivate.

    It makes no sense to add 0 to the first statement, you do not v_dummy at all, replace the first two statements by one:

    Expression v_teacher = v_teacher + cpQuizInfoAnswerChoice

    Bit easier...

  • Adobe still the software that is used to decode the media is not available on this system. install the correct decoders for the file you are editing can help fix the problem

    Hello

    I got this message after the import on ten H.264 files that I coded for Adobe media encoder.  "It is not available on this system from adobe yet the software that is used to decode the media. install the correct decoders for the file you are editing can help fix the problem. »

    The files that we have shot with HD cameras.  Edited in Premiere Pro CS3.  I installed the update 3.0.1 with always the same error.

    I also tried a new project and after about ten or so files imported into a timeline, the breakdown of the system.  I tried twice...

    Thanks in advance

    Please report to us. I don't know the exact specifications. for stills in still, the limit is 4000 pixels in the largest dimension for PrPro.

    Now, I must add that in PS. resizing algorithms are better, in my opinion, than those of PrPro and again. This means that there is nothing to gain and quality of untying, important images much larger than the size of the frame of the project, i.e. of 720 x 480 for NTSC SD projects yet. The size of the image will be the limiting factor, so scratch that.

    Even in projects PrPro, I resize to exactly what I need. If I will not pan on a zoomed image, I resize it to the size of the image of the project. If I move on a zoomed image, I resize just what I need.

    Good luck

    Hunt

  • Use to decode

    Hello world

    I put a code inside my report 6i SQL query statement, but I want only the decoding to bring value that is greater than the other. The only way I know how to use it is if a value is null then bring value, but not when a value is greater than the other.

    Can someone help me please?

    This is the code:

    SELECT B.PERIOD,B.GRADE,B.CLASS_ID,A.CLASS_NAME,
    CREDIT_VALUE_FIN,DECODE(ROUND(B.FINAL_GRADE), NULL, B.SEMESTER_REC2, ROUND(B.FINAL_GRADE)) AS FINAL_GRADE,B.GRADE_LETTER,NOTAS,SEMESTRES,C.LAST_NAME,
    C.FIRST_NAME,C.GENDER
    FROM TABLE_1 A, TABLE_2 B,TABLE_3 C
    WHERE B.SCHOOL_ID = :CIA AND
                   B.STUDENT_ID = :ESTUDIANTE AND
                   B.GRADE IN ('9','10','11','12') AND
                   B.FINAL_GRADE IS NOT NULL AND
                   B.SCHOOL_ID = A.SCHOOL_ID AND
                   B.CLASS_ID = A.CLASS_ID AND
                   B.PERIOD = A.SCHOOL_YEAR AND
                   B.TEACHER_ID = A.TEACHER_ID AND
                   C.SCHOOL_ID = B.SCHOOL_ID AND
                   C.STUDENT_ID = B.STUDENT_ID
                   ORDER BY B.CLASS_ID
    

    I'm not 100% sure what you're asking.  It is more a question of SQL that you would be better to post in this forum (PL/SQL, and SQL), but...

    You say you want to compare B.FINAL_GRADE to B.SEMESTER_REC2 and then select the value of the people?  If so, you can use DECODE with the digital SIGN function.  Something like this:

    ..., Select decode (sign (round (b.final_grade) - b.semester_rec2), 1, round (b.final_grade), b.semester_rec2) final_grade,...

  • Bi publisher with symbol decode question

    Hello I have a problem with decoding number 1 or 0 in the account statement, I want to display 'V' to place 1 and area 0 instead, how to implement this in my rtf model?

    C: <? crosstab:c68146; "" G_1; "RES {o = a, t = t}, ROLE {o = a, t = t}, TECHROLE {, o = a, t = t}, ITRESTYPE {, o = a, t = t}, TRAITORS {, o = a, t = t}, ITRESKEY {, o = a, t = t} '; "ORG {, o = a, t = t} '; "' ORG '; "" County "? > count here stated that displayed in crosstab numbers 1 or 0

    H: <? horizontal-break-table: 6? >

    G: <? for-each@column:$c68146//C1? >

    ORG: <? / H ? >

    E: <? end foreach? >

    G: <?-foreach: $c68146 / / R1? >

    RS: < xsl: attribute name = 'number-rows-split' xdofo:ctx = 'block' > < xsl: value-of select = "ancestor::R1/RS" / > < / xsl: attribute >

    RES: <? If@cell:./R1N=1? > <? end if? > <? / ancestor::R1/H? >

    G: <? for-each:.//R2? >

    RS: < xsl: attribute name = 'number-rows-split' xdofo:ctx = 'block' > < xsl: value-of select = "ancestor::R2/RS" / > < / xsl: attribute >

    ROLE: <? If@cell:./R2N=1? > <? end if? > <? / ancestor::R2/H? >

    G: <? for-each:.//R3? >

    RS: < xsl: attribute name = 'number-rows-split' xdofo:ctx = 'block' > < xsl: value-of select = "ancestor::R3/RS" / > < / xsl: attribute >

    TECHROLE: <? If@cell:./R3N=1? > <? end if? > <? / ancestor::R3/H? >

    G: <? for-each:.//r4? >

    RS: < xsl: attribute name = 'number-rows-split' xdofo:ctx = 'block' > < xsl: value-of select = "ancestor::R4/RS" / > < / xsl: attribute >

    ITRESTYPE: <? If@cell:./R4N=1? > <? end if? > <? / ancestor::R4/H? >

    G: <? for-each:.//R5? >

    RS: < xsl: attribute name = 'number-rows-split' xdofo:ctx = 'block' > < xsl: value-of select = "ancestor::R5/RS" / > < / xsl: attribute >

    PEOPLE: <? If@cell:./R5N=1? > <? end if? > <? / ancestor::R5/H? >

    G: <? for-each:.//R6? >

    ITRESKEY: <? / H ? >

    G: <? for-each@cell:.//R6C1? >

    99900: <? / M1? >

    E: <? end foreach? >

    E: <? end for each? > <? end for each? > <? end foreach? > <? end foreach? > <? end for each? > <? end for each? >

    This is my code for created in Office bi publisher rtf model, how to implement my question in this code?

    IM finding the solution, if this useful for you, im implement this in my code this way:

    on the other

    If. / M1 = 0 then ' '

    end if? >

  • using nest if then statements using ABM

    I have a two input, 1 output circuit, as in the attached schema. My third node is set down by the very high resistance voltmeter. What I have is a user defined current source ABM that depends on other parameters in the circuit. I wonder it is what my conditional statement is entered in the right format? Conditions are particularly complex and describe as follows:

    If the voltage difference between V2 and U1 is greater than 0, then the current in the ABM = 10 ^-12

    If this voltage difference that the above is not greater than zero and if (V (1) u (1))<(V(2)-U(1)), then="" the="" abm="" current="" is="">

    Otherwise, if (V (1) u (1)) > = (V (2) u (1)) then the current is (0.1*((-(V(2)-U(1)))^0.35))*0.00001596*(((V(2)-U(1))^2)/2)

    As you can see, they are very complex conditions and my concern is that I can't just type in U1 and get the compiler to understand I want the voltage read on the voltmeter of bottom-node. I think I'm using the correct nesting in the encoding format is: if (T, X, (if(Q,R,S))).

    Any help would be appreciated, and details can be provided.

    I don't know why its not throwing an error for the use of u (1), maybe it's a valid keyword.

    If you want to reference a voltage properly, it should be V (net_name) for single ended voltages (referenced to ground) or V (net1, net2) for differential voltages... For models ABM I suggest turning on net visibility throughout the schematic so that you know the net name to the positive terminal of U1 or anywhere else for that matter.

    I think the syntax you have to if/then/else is correct otherwise.

    Kind regards
    Pat Noonan
    National Instruments

  • Use of licenses/Questions

    Hello

    I am interested in Adobe Stock, however, I'm still not quite clear on the standard license rights and restrictions of use (which I read several times).

    If someone could give me concrete answers to the following questions, I would be very happy:

    1. If I acquire the standard of a stock image license for myselfam I allowed to use the same image of stock for multiple projects? Say, use a paper structure photo on different digital drawings of mine.

    Note: I understand that I must get another license, if I had to use the same image of stock for a client.

    2. a link (to the Adobe Stock page) for a stock image used on a Web site strictly necessarily in copyright information or is "NameOfAuthor ©" considered sufficient? What is the best practice?

    3. copyright information pass under the image, or should it be written on the image, as in being a part of the image?

    4. assuming that the copyright notice can be put under the image or text separated in front of her, if I use an image of stock in a post on a Web site (like a header image, for example) with the relevant information of the copyright on this same page -

    This same (possibly cropped) image can be used as thumbnail for the social media 'actions' without distinct mentions of copyright on the posts 'shared '?


    5. If I use an image - composed of pieces of multiple images of stock of different authors - do I put separate copyright information for each image used on the page/image?

    Is it possible to 'group' copyright or - if information is not - how best to do this?

    6. I understand Adobe Stock don't offer no licenses at the present time, however, is it OK if I buy an extended license on Fotolia for an Adobe Stock image I already have a license and already "used"?

    I will do my best to answer all your questions. You need to refer to the license agreement for the definitive and final word however.

    1. Yes, as long as the projects are for your personal use, that's OK. If you own several businesses and intend to use the same image for each company, you need a separate license.

    2. a photo credit is required when you use an image for editorial use, like a newspaper or magazine article, or for social media. Use of the web in general does not require a photo credit and a link is no longer needed.

    3. If you use the image in social media, the appropriations must be typed directly on the image at a visible place. If you use the image for an editorial article then having the credit adjacent to the image is sufficient.

    4. you can link to a page on the social media without adding extra credit. If, however, you want to download the image directly on social media as a reference to a link, you need to add the credit on the image.

    5. If the composite is for social media use, so, Yes, a credit for each contributor is required.

    6. Yes, if you use an image from Adobe Stock in a way that is not consistent with the standard license agreement, you must immediately delete the image or license extended to Fotolia assuming that the extended license allows your use.

    I hope this helps.

    -Mat Hayward

  • SQL with the Table using nested

    Hello

    Please help how to do that thing

    I have a nested table of object type

    create or replace type a1 as an object

    (

    a number,

    b varchar2 (30),

    VARCHAR2 (30) region

    );

    create table a1 type a1_array s;

    declare

    v_a1 a1;

    v_a1_array a1_array:=a1_array();

    Start

    v_a1 = a1 (1, '1', 'AUS');

    v_a1_array. EXTEND;

    v_a1_array (1): = v_a1;

    v_a1 = a1 (2, '2', 'AUS');

    v_a1_array. EXTEND;

    v_a1_array (2): = v_a1;

    v_a1 = a1 (3, '3', 'NAM');

    v_a1_array. EXTEND;

    v_a1_array (3): = v_a1;

    end;

    Now, I v_a1_array have 3 row 2 with region AUS and the other with NAM region.

    SQL help can I get lines only "AUS" and look in the TABLE OF TYPE v_a1_array (using Where clause and functions (Table))

    Any help will be much appreciated. Please help. I have Oracle 11g

    Thank you

    I hope that you are looking for this.

    pretend like your excel temp (with clause)

    v_a2 - is a type of a1_array

    SQL > select * from v version $;

    BANNER
    --------------------------------------------------------------------------------
    Oracle Database 11 g Enterprise Edition Release 11.2.0.2.0 - 64 bit Production
    PL/SQL Release 11.2.0.2.0 - Production
    CORE Production 11.2.0.2.0
    AMT for Linux: Version 11.2.0.2.0 - Production
    NLSRTL Version 11.2.0.2.0 - Production

    SQL > DROP TYPE a1_array;

    Type fell.

    SQL > DROP TYPE a1;

    Type fell.

    SQL > CREATE or REPLACE TYPE a1 AS OBJECT
    2 (a NUMBER, b VARCHAR2 (30), region VARCHAR2 (30));
    3.

    Type of creation.

    SQL > CREATE TYPE a1_array IS TABLE of a1;
    2.

    Type of creation.

    SQL > DECLARE
    v_a1 2 a1_array;
    3 v_a2 a1_array;
    4 BEGIN
    5 WITH temp
    6 AS (SELECT 1 a, 1 b, "AUS" AS region FROM DUAL
    7 UNION ALL
    8. SELECT 2 AS a, 2 b, "AUS" AS region FROM DUAL
    9 UNION ALL
    10. SELECT 3 a, b '3', 'NAM' AS region OF DOUBLE)
    11. SELECT a1 (x.a, x.b, x.region)
    In BULK 12 COLLECT IN v_a1
    Temp 13 x;
    14
    15 SELECT a1 (x.a, x.b, x.region)
    In BULK 16 COLLECT IN v_a2
    TABLE (v_a1) 17 x
    18 WHERE x.region = 'NAM ';
    19
    20
    21 FOR I IN 1... v_a2. COUNTY
    22 LOOP
    (23) DBMS_OUTPUT.put_line
    24 v_a2 (i) .a | '-' || v_a2 (i) .b | '-' || v_a2 (i) .region);
    25 END OF LOOP;
    26 END;
    27.
    3-3-NAM

    PL/SQL procedure successfully completed.

    SQL > spool off;

  • Error using nested for each activity group transform Oracle SOA 11 g

    I posted this problem in XML general forum section. I don't know if it was in the right place because the error occurs in a BPEL.

    Thank you for taking the time to post this thread.
    I created a XSLT transformation that runs on oxygen, but does not work in a SOA transformation activity.

    Given this XML-

    < country >
    < info enum = "CTRY" name = 'United States' States-total = "50" / >
    < enum = 'ST' index info = '0' sname = "New York" population = "8 244 910" / >
    < enum = 'ST' index info = '0' sname = "Chicago" population = "2 707 120" / >
    < info enum = "CTRY" name = 'Germany' States-total = "16" / >
    < enum = 'ST' index info = '1' sname = population "Berlin" = "3 469 910" / >
    < enum = 'ST' index info = '1' sname = population "Brandenburg" = "2 500 000" / >
    < / country >

    Work of XSLT in the oxygen-

    < xsl: template match = "/" >
    < country >
    [< xsl: for each group-select = "" countries / * ' group-starting-with="info[@enum='CTRY"] ">"
    < CountryInfo >
    < xsl: Call-template name = "ctry" / >
    < / CountryInfo >
    < / xsl: for each group->
    < / country >
    < / xsl: template >

    < xsl: template name = "ctry" >
    < name > country: < xsl: value-of select="@name"/ > < / name >
    districts of <>< xsl: value-of select="@total-states"/ > < / districts >
    < xsl: for each group-select = "current - group ()" group-by="@index" >
    < xsl: Call-template name = "States" / >
    < / xsl: for each group->
    < / xsl: template >

    < xsl: template name = "States" >
    < name of xsl: variable = "index" select="@index"/ >
    States <>
    < xsl: for each select = "current - group ()" >
    < name >
    < xsl: value-of select="@sname"/ >
    < / name >
    < / xsl: foreach >
    < / states >
    < / xsl: template >

    I get the desired oxygen - result

    < country >
    < CountryInfo >
    < name > country: United States of America < / name >
    < > 50 districts < / districts >
    States <>
    < name > New York < / name >
    < name > Chicago < / name >
    < / states >
    < / CountryInfo >
    < CountryInfo >
    < name > country: Germany < / name >
    < > 16 districts < / districts >
    States <>
    < name > Berlin < / name >
    Brandenburg < name > < / name >
    < / states >
    < / CountryInfo >
    < / country >

    In a transformation of Oracle, I get an error "cannot perform XPath expression. I have narrowed down the cause of the error. The error is caused by
    the nested for each group - using 'current - group ()' and 'group-by=@index '.

    < xsl: for each group-select = "current - group ()" group-by="@index" >
    < xsl: Call-template name = "States" / >
    < / xsl: for each group->

    Oracle does not throw an error if I use ' Country/info' instead of ' current - group () or group-starting-with, but this does not produce the desired result.
    because he needs to be grouped by "@index."

    Does anyone know why the Oracle processing activity is not able to use the nested < xsl: for each group-select = "current - group ()" group-by="@index" >?

    This error has been fixed by modifying .

    It seems that the XSLT for Oracle parser does not correctly XSLT 2.0. This is understandable since in 11g does not have full support for XSLT 2.0.

  • Error using nested for each group - in Oracle XSLT

    Hello everyone. Thank you for taking the time to post this thread.
    I created a XSLT transformation that runs on oxygen, but does not work in Oracle.

    Given this XML-

    < country >
    < info enum = "CTRY" name = 'United States' States-total = "50" / >
    < enum = 'ST' index info = '0' sname = "New York" population = "8 244 910" / >
    < enum = 'ST' index info = '0' sname = "Chicago" population = "2 707 120" / >
    < info enum = "CTRY" name = 'Germany' States-total = "16" / >
    < enum = 'ST' index info = '1' sname = population "Berlin" = "3 469 910" / >
    < enum = 'ST' index info = '1' sname = population "Brandenburg" = "2 500 000" / >
    < / country >

    Work of XSLT in the oxygen-

    < xsl: template match = "/" >
    < country >
    [< xsl: for each group-select = "" countries / * ' group-starting-with="info[@enum='CTRY"] ">"
    < CountryInfo >
    < xsl: Call-template name = "ctry" / >
    < / CountryInfo >
    < / xsl: for each group->
    < / country >
    < / xsl: template >

    < xsl: template name = "ctry" >
    < name > country: < xsl: value-of select="@name"/ > < / name >
    districts of <>< xsl: value-of select="@total-states"/ > < / districts >
    < xsl: for each group-select = "current - group ()" group-by="@index" >
    < xsl: Call-template name = "States" / >
    < / xsl: for each group->
    < / xsl: template >

    < xsl: template name = "States" >
    < name of xsl: variable = "index" select="@index"/ >
    States <>
    < xsl: for each select = "current - group ()" >
    < name >
    < xsl: value-of select="@sname"/ >
    < / name >
    < / xsl: foreach >
    < / states >
    < / xsl: template >

    I get the desired oxygen - result

    < country >
    < CountryInfo >
    < name > country: United States of America < / name >
    < > 50 districts < / districts >
    States <>
    < name > New York < / name >
    < name > Chicago < / name >
    < / states >
    < / CountryInfo >
    < CountryInfo >
    < name > country: Germany < / name >
    < > 16 districts < / districts >
    States <>
    < name > Berlin < / name >
    Brandenburg < name > < / name >
    < / states >
    < / CountryInfo >
    < / country >

    In a transformation of Oracle, I get an error "cannot perform XPath expression. I have narrowed down the cause of the error. The error is caused by
    the nested for each group - using 'current - group ().'

    < xsl: for each group-select = "current - group ()" group-by="@index" >
    < xsl: Call-template name = "States" / >
    < / xsl: for each group->

    Oracle does not throw an error if I use ' Country/info' instead of 'current - group ()', but this does not produce the desired result
    because he needs to be grouped by "@index."

    Does anyone know why my XSLT does not work in a transformation from Oracle?

    oracleistheway wrote:
    Does anyone know why my XSLT does not work in a transformation from Oracle?

    What do you mean by "transform Oracle?

    If you are referring to the integrated database XSLT processor available through XMLTransform or DBMS_XSLProcessor API, it does not support XSLT 2.0, 1.0 only.

    If you use the XDK Java (oracle.xml.parser.v2) Please give the exact version.

  • Why the hell use nested tables?

    Hello
    I'm boning up on top of the PL/SQL (again) waiting to get a new job.
    I have several years of experience in various roles related to the data, including many used Oracle.
    On the issue of collections, I ask myself, in light of my experience, to find and not for the first time, why the hell would anyone want to do this:

    create or replace type TEST_TT as table of varchar2(10);
    /
    
    create table TEST_TABLE ( X number
                             ,Y test_tt) 
                             nested table Y store as Y_TABLE;                      
    I really, really, can't think why we want to store data like that. It seems unnecessarily complex, hiding a one-to-many relationship inside TEST_TABLE, which should rather be modeled and implemented as a separate table.
    In addition, there are a lot of tutorials on the collections that tell us how to do the above (in fact I read Feuerstein right now), but nobody seems to tell us WHY we should do it.

    Can someone help me out here?

    Thank you.
    Jason

    I can't imagine wanting to create a table like this one either (or, if this can help, can Tom Kyte).

    The collections are terribly useful in PL/SQL, when they help you avoid one treatment per line. I can't imagine wanting to integrate into my data model. Frankly, it's much the same with the types of objects - they are quite useful in PL/SQL, but I would never want to create a table in my data model that contained an object.

    Justin

  • Functions using nested

    Hello Im trying to create a dynamic HTTP function which allows me to dynamically return any result in a table. In the code below within the nested function, Im inside the nested function I can gain access to the data, but outside of the nested function, the data is not returned. Could someone help me please? IM pulling my hair out here. See code below:

    <? XML version = "1.0" encoding = "utf-8"? >
    " < = xmlns:mx mx:Application ' http://www.Adobe.com/2006/MXML "layout ="absolute"> "

    < mx:Script >
    <! [CDATA]
    Import mx.rpc.http.mxml.HTTPService;
    Import mx.collections.ArrayCollection;
    Import mx.rpc.events.ResultEvent;

    public void sendQuery(db:String,query:String):ArrayCollection
    {
    var returnData:ArrayCollection = new ArrayCollection collection;
    var tmpArray:ArrayCollection = new ArrayCollection collection;

    var obj:Object = new Object();
    obj. Database DB;
    obj. Query = query;

    var httpService:HTTPService = new HTTPService;
    httpService.method = "POST";
    httpService.url = " " http://localhost/return_SQL.php ";
    httpService.useProxy = false;
    httpService.addEventListener (ResultEvent.RESULT, recieveData);
    httpService.send (obj);

    function recieveData(evt:ResultEvent):ArrayCollection
    {
    tmpArray = evt.result.data.graphdata;
    Return tmpArray;
    test. DataProvider = tmpArray ! ŒUVRES!
    }
    test.dataProvider = tmpArray; !!! DOES NOT WORK!

    Return returnData;
    }

    public function testExer (): void
    {
    var myData:ArrayCollection = new ArrayCollection();
    myData = sendQuery ('visa ',' SELECT * from redemption_data');
    }

    []] >
    < / mx:Script >

    < mx:DataGrid = "214" x y = '112' id = 'test' >

    < / mx:DataGrid >
    < mx:Button = "233" x = "262" label = "Button" click = "testExer ()" / >

    < / mx:Application >

    You can't do that. Http service calls are asynchronous in Flex, which means that the result of the service will be unavailable at the time the function ends (because the function runs synchronously). You must use an asynchronous method (events, reminders, or even binding handlers).

  • Nested model question

    Hello, I would like to do a nested model of a master model; However, I don't know how to get the desired result.

    The master has a sidebar menu item which is not editable which will apply to multiple pages. I would like to make the model nested without the side menu, but don't know who to make an editable in the nested version.

    I might just do an another master without the side menu, but this would make the update of changes to the site level more complicated.

    Any suggestions? Thank you.

    I'll be able to edit the menu as a library item and any changes will take place in each of the pages that this element is located in? Thank you

    The convenience to do this entirely depend on how you built your menu.  I almost always use ProjectSeven PopMenuMagic on my sites, and the edition menu couldn't be simpler.  Once you create the menu, you would never need to touch anything other than the HTML part of things - the CSS and javascript are always the same (and in addition, they are related to the parent, not the library in any case item folder).

    I suggest that practice you this dance with a few test pages first.  Enter a CSS/Javascript menu in a library of point/include file requires some skills and knowledge of HTML.

Maybe you are looking for