Two different results in grapher for a Bode plot -- one's right, one's wrong. Why?

I'm simulating a simple RLC band pass filter and looking at the output in grapher.
In the AC analysis setup screen, if I define the output as Vout/Vin and set up the vertical scale as decibel - the resulting graph is correct.
On the other hand, if I define the output as dB(Vout) - dB(Vin), or dB(Vout/Vin), or dB(mag(Vin))- dB(mag(Vout) using the add expression command and set up the vertical scale as linear -- the output is inverted (instead of a band pass filter -- the output looks like a notch filter and the magnitudes are wrong).
The second technique "used to" work - but truthfully I can't remember if this was in Multisim or in PSpice.
So, what am I doing wrong? 

Hello,
When you set the vertical scale to linear in the AC Analysis window, only the magnitude of the output variable is evaluated to be drawn on the top graph whilewhether it is positive or negative is evaluated in the bottom graph, the phase graph (-1 = 180 phase shift).
When you choose a logarithmic scale, the 20*log of this magnitude is evaluated and it can be positive or negative according to whether this magnitude is greater or less than 1. By setting the vertical scale to linear and your output to an expression your basically drawing the magnitude of your expression (any of the three you mentioned below) on your top graph which will always be a poisitve value.
Also, in your graph when you enter any of these expressions notice that the phase information has been ommitted (bottom graph) and has been replaced by a constant 180 which represents the negative sign of the magnitude.
Hope this explains the results you were getting.
Mahmoud W
National Instruments

Similar Messages

  • How to Create a new column from two different result sets

    How to Create a new column from two different result sets, both the result set uses the different date dimensions.

    i got solutions for this is apply filters in column formula it self, based on the requirement.

  • Execute the same query twice, get two different results

    I have a query that returns two different results:
    Oracle Version : 10.2.0.1.0
    I am running the following query on the Oracle server in SQL*Plus Worksheet.
    SELECT COUNT(*)
    FROM AEJOURNAL_S1
    WHERE CHAR_TIME BETWEEN TO_DATE('12-AUG-10 01:17:39 PM','DD-MON-YY HH:MI:SS AM') AND
    TO_DATE('13-AUG-10 14:17:34','DD-MON-YY HH24:MI:SS')
    AND DESC2 LIKE '%'
    AND DESC1 LIKE '%'
    AND DESC2 LIKE '%'
    AND ETYPE LIKE '%'
    AND MODULE LIKE '%'
    AND LEVELL = '11-WARNING'
    ORDER BY ORDD DESC;
    The very first time the query is run, it will return a count of 259. The next time the query is run, lets say, 10 seconds later, it will return a count of 260. The above query is exemplary of the kind of thing I'm trying to do. It seems like the more fields filtered against '%', the more random the count return becomes. Sometime you have to execute the query three or four times before it levels out to a consistent number.
    I'm using '%' as the default for various fields, because this was the easiest thing to do to support a data-driven Web interface. Maybe I have to 'dynamically' build the entire where clause, instead of just parameterizing the elements and having default '%'. Anyway, to eliminate the web interface for the purpose of troubleshooting the above query was run directly on the Oracle server.
    This query runs against a view. The view does a transpose of data from a table.
    Below is the view AEJOURNAL_S1
    SELECT
    CHAR_TIME,
    CHAR_INST,
    BATCH_ID,
    MIN(DECODE(CHAR_ID,6543,CHAR_VALUE)) AS ORDD,
    MIN(DECODE(CHAR_ID,6528,CHAR_VALUE)) AS AREAA,
    MIN(DECODE(CHAR_ID,6529,CHAR_VALUE)) AS ATT,
    COALESCE(MIN(DECODE(CHAR_ID,6534,CHAR_VALUE)),'N/A') AS CATAGORY,
    MIN(DECODE(CHAR_ID,6535,CHAR_VALUE)) AS DESC1,
    MIN(DECODE(CHAR_ID,6536,CHAR_VALUE)) AS DESC2,
    MIN(DECODE(CHAR_ID,6537,CHAR_VALUE)) AS ETYPE,
    MIN(DECODE(CHAR_ID,6538,CHAR_VALUE)) AS LEVELL,
    MIN(DECODE(CHAR_ID,6539,CHAR_VALUE)) AS MODULE,
    MIN(DECODE(CHAR_ID,6540,CHAR_VALUE)) AS MODULE_DESCRIPTION,
    MIN(DECODE(CHAR_ID,6541,CHAR_VALUE)) AS NODE,
    MIN(DECODE(CHAR_ID,6542,CHAR_VALUE)) AS STATE,
    MIN(DECODE(CHAR_ID,6533,CHAR_VALUE)) AS UNIT
    FROM CHAR_BATCH_DATA
    WHERE subbatch_id = 1774
    GROUP BY CHAR_TIME, CHAR_INST, BATCH_ID
    So... why does the query omit rows on the first execution? Is this some sort of optimizer issue. Do I need to rebuild indexes? I looked at the indexes, they are all valid.
    Thanks for looking,
    Dan

    user2188367 wrote:
    I have a query that returns two different results:
    Oracle Version : 10.2.0.1.0
    I am running the following query on the Oracle server in SQL*Plus Worksheet.
    SELECT COUNT(*)
    FROM AEJOURNAL_S1
    WHERE CHAR_TIME BETWEEN TO_DATE('12-AUG-10 01:17:39 PM','DD-MON-YY HH:MI:SS AM') AND
    TO_DATE('13-AUG-10 14:17:34','DD-MON-YY HH24:MI:SS')
    AND DESC2 LIKE '%'
    AND DESC1 LIKE '%'
    AND DESC2 LIKE '%'
    AND ETYPE LIKE '%'
    AND MODULE LIKE '%'
    AND LEVELL = '11-WARNING'
    ORDER BY ORDD DESC;
    The very first time the query is run, it will return a count of 259. The next time the query is run, lets say, 10 seconds later, it will return a count of 260. The above query is exemplary of the kind of thing I'm trying to do. It seems like the more fields filtered against '%', the more random the count return becomes. Sometime you have to execute the query three or four times before it levels out to a consistent number.
    I'm using '%' as the default for various fields, because this was the easiest thing to do to support a data-driven Web interface. Maybe I have to 'dynamically' build the entire where clause, instead of just parameterizing the elements and having default '%'. Anyway, to eliminate the web interface for the purpose of troubleshooting the above query was run directly on the Oracle server.
    This query runs against a view. The view does a transpose of data from a table.
    Below is the view AEJOURNAL_S1
    SELECT
    CHAR_TIME,
    CHAR_INST,
    BATCH_ID,
    MIN(DECODE(CHAR_ID,6543,CHAR_VALUE)) AS ORDD,
    MIN(DECODE(CHAR_ID,6528,CHAR_VALUE)) AS AREAA,
    MIN(DECODE(CHAR_ID,6529,CHAR_VALUE)) AS ATT,
    COALESCE(MIN(DECODE(CHAR_ID,6534,CHAR_VALUE)),'N/A') AS CATAGORY,
    MIN(DECODE(CHAR_ID,6535,CHAR_VALUE)) AS DESC1,
    MIN(DECODE(CHAR_ID,6536,CHAR_VALUE)) AS DESC2,
    MIN(DECODE(CHAR_ID,6537,CHAR_VALUE)) AS ETYPE,
    MIN(DECODE(CHAR_ID,6538,CHAR_VALUE)) AS LEVELL,
    MIN(DECODE(CHAR_ID,6539,CHAR_VALUE)) AS MODULE,
    MIN(DECODE(CHAR_ID,6540,CHAR_VALUE)) AS MODULE_DESCRIPTION,
    MIN(DECODE(CHAR_ID,6541,CHAR_VALUE)) AS NODE,
    MIN(DECODE(CHAR_ID,6542,CHAR_VALUE)) AS STATE,
    MIN(DECODE(CHAR_ID,6533,CHAR_VALUE)) AS UNIT
    FROM CHAR_BATCH_DATA
    WHERE subbatch_id = 1774
    GROUP BY CHAR_TIME, CHAR_INST, BATCH_ID
    So... why does the query omit rows on the first execution? Is this some sort of optimizer issue. Do I need to rebuild indexes? I looked at the indexes, they are all valid.
    Thanks for looking,
    DanIn fact you the first time you ran the query the data has been retrived from disk to memory , in the second time the data is already in memory so the respnse time should be faster ,but if you chagne any condition or column or letter case the optimizer will do the first step (data will be retrived from disk to memory )

  • Why do I get two different results from the same coefficients?

    I am getting two different results from the Polynomial Evaluation function.
    For the first one, I am getting the coefficients from a Polynomial Fit function.  I feed the coefficients from the Fit function into the Poly Eval function and get the correct result of 12.8582 when I evaluate 49940.
    For the second one, I create constant array of the SAME values that were returned from the Polynomial Fit function (i typed them in).  However, I am getting an incorrect result of -120.7913 when I feed the constant array into the Poly Eval function when I evauate 49940.
    How can this happen when I am using the same array values?
    Attached is an image of what I am explaining.
    Solved!
    Go to Solution.
    Attachments:
    polynomial_evaluation.jpg ‏213 KB

    Hi Altran,
    are you sure about using the "same" coefficients?
    Did you compare them? Did you (atleast) set the display properties to 17 significant digits?
    Please attach a VI instead of a picture...
    Best regards,
    GerdW
    CLAD, using 2009SP1 + LV2011SP1 + LV2014SP1 on WinXP+Win7+cRIO
    Kudos are welcome

  • Two different preferences dialogue box for the "HP Designjet 800PS 42 by HP HPGL2"!

    Two different preferences dialogue box for the “HP Designjet 800PS 42 by HP HPGL2”!
    I’m wondering why there are two different preferences dialogue box for the “HP Designjet 800PS 42 by HP HPGL2”!
    How to have the drivers and software that enable me to have the preferences dialogue box appearing in the second screenshot below?
    My windows is 7 64 bits ultimate
    Thank you
    Best
    Jamal

    Many thanks garytech1 for the answer,
    I did! The link is below
    http://h30499.www3.hp.com/t5/Printers-Designjet-Large-Format/Two-different-preferences-dialogue-box-...
    Best
    Jamal

  • How can I interact between two different frames in the same indesign template as well as from one template to another.

    I am looking for the best way (or any way) to interact between two different frames in the same indesign template as well as from one template to another. It's for a DPS app which needs to carry some button initiated data from one page to another and then present it in a table.

    There is no simple way to do it, as itunes wont let you use it on another computer without wiping the contents first.
    However if you really want to transfer songs to another computer then you could try this;
    * make sure that your ipod is accessible as a disk drive (ipod options)
    * when you plug your ipod into the computer you want to transfer to make sure you select "no" or "cancel" when it asks to wipe the contents. Leave the ipod connected and quit from itunes.
    * go to "my computer" and access the ipod directly. You probably have to select "view hidden files" from windows. You will see a lot of folders with odd names like ZX838aff with similar named files inside.
    * copy these files to a folder on your computers hardrive. Now remove the ipod and start itunes.
    * import the files from the folder you made in the last step.
    * Now your music is on itunes, but with unrecogisable names.
    This is the only way I have found to do it, but there may be another way, say with an application to do the hard work for you.
    Generic homebuild PC Windows XP
    Generic homebuild PC   Windows XP  

  • CR 4 Ent, Xcelsius and WebI - one query and two different results

    Dear Sirs,
    I'm using BO 4.0 platform and 3 tools: Crystal Reports for Enterprise, WebI and Dashboard Design (Xcelsius).
    I have one question, because in my opinion in this solution is one inconsistency.
    I have one table in SQL Server (like below):
    IDRec (autoinc)  | Col1 (varchar)   | Col2 (int)
    1      A    1
    2      A    1
    3      B    2
    4      B    2
    I have one universe with ONLY 3 dimensions (IDRec, Col1, Col2). I haven't any measures.
    And:
    1. Using CR 4 Ent and I create report using 3 dimensions (IDRec, Col1, Col2).
    I make sure, that I selected option: "Retrieve duplicate rows"
    If I have 3 columns in details I have 4 records (4 rows) in my report, when I have 2 columns (Col1 Col2) I have only 2 records (2 rows) in report (Page view).
    So universe (or something like this) use option DISTICT (I think).
    2. When I use WebI (14.0.2) I have the same situation.
    3. When I use Dashboard Desigm (Xcelsius 2011) I have 4 rows !!!  ALWAYS - it doesn't matter I selected "Retrieve duplicate rows" or not  !!!
    When I look to "View script" window, I not see DISTINCT clause.
    Am I doing something wrong?
    I can change the settings so as to be able to see duplicate records?
    It's very important for some calculation, especially in Crystal Reports (for Enterprise).

    Hi,
      Thanks for the response...But the result is deviating from the expected..
           expected is
         if we have first query returns              second query returns
                  1                                                     4
                  2                                                     5
                  3                                                     6
         these two queries result should be in one table , with first query result in first column and second query result in second column.
       The two queries fetching data from same table(category table as in my post) with different search criteria( in where clause).......Regards,
    Rakesh.

  • SLI - Can I use two different video card versions for SLI?

    Hello,
    Can I use two different generations of MSI video cards that implement the same GPU for SLI?   
    The two video cards are:
    MSI N260GTX-T2D896-OCv2 GeForce GTX 260 896MB <-- What I currently have
    MSI N260GTX-T2D896-OCv3 GeForce GTX 260 896MB
    MSI N260GTX-T2D896-OCv4 GeForce GTX 260 896MB
    The main difference between these three seems to be that the OCv3 has two fans and a different heatsink than the OCv2.  The OCv4 has one fan like the OCv2 and but it is located in a different location and some weird spikey heatsink thing going on.  I already have the OCv2 but I am looking to get another card for SLI and newegg doesn't sell the OCv2 anymore.  The important thing is that I am looking for is stability and it seems that the most ideal setup would be to get identical cards.
    By the way, why are there so many versions (updates?) to this card?  Have there been issues related to the card that necessitate a revision?
    Thanks

    Different coolers(HS and fans) and possibly different makers of vRAM.  But, you should be able to run SLI without issues regardless of the versions.

  • Two different billing document types for 1 sales document type.

    Hi Gurus,
    I have a requirement , wherein our client is having counter  sale.
    He is using one sales doc type , and while creating a order , he is manually adding payment terms.
    Requirement is , if the payment terms are cash, billing doc type created later on should be one , else during credit sales , billing document type should be different.
    As per my understanding this is not possible.
    Want to know if anyone has some different thought on this.
    Thanks in advance
    Nilesh.

    Dear Nilesh,
    There two options you can look in to
    One option is
    1.You can define different sales document types for cash and credit.
    2. You can define two different billing documents.
    3.Do the copy control settings for each combination
    Cash sales order >Delivery>Cash invoice
    Credit sales order >Delivery>Credit invoice
    Second option is
    1. You can maintain single sales document for both the processes.
    2.Define two different billing types then do the copy control settings for both billing types.
    But in this option user need to select the billing type manually based on the process while creating billing document.
    I hope this will help you,
    Regards,
    Murali.

  • Host setup having two different Sender Id's for EDI X12 over generic exch

    Greetings. I am attaching the document which has screen prints of B2B set up that we have done for a trading partner called PETsMART and the Host set up for RSC(interchange sender/receiver Id is 9014270492). The TP is sending 850s to us and we are (the sellers) sending Invoices (810). I am pasting the RAW EDI data for the 850s and 997s sent by PETsMART and RSCs Respectively. Their interchange sender Id is ISA06 173808684. They are sending the Interchange receiver Id as 781318710 for one account and 9014270492 for the second account. But the set up we have for RSC capabilities (EDI_X12 Over Internet) is for only one interchange receiver Id. I mean to say we can support only one Interchange Receiver Id. How can we support both the accounts at the same time? I dont think we can set up two different hosts. Can we? Is there a way to support this?
    First the RSC Host set up has been done with interchange sender Id as 781318710 and did the testing with a test PO and sent the FA. Later the intrechange sender Is set up as 9014270492 and did the second test PO and sent the set up. The trading partner can send the POs in production with any of the sender id. How to support both the Ids at the same time?
    850 (PO)
    ISA*00* *00* *01*173808684 *01*781318710 *080418*0747*U*00401*000004844*0*P*>~
    GS*PO*173808684*781318710F*20080418*0747*4006*X*004010~
    ST*850*6428~
    BEG*00*SA*451941612**20080418~
    CUR*BY*USD*1.000~
    PER*SU*RON BACORN~
    FOB*CC*FA~
    DTM*001*20080425~
    DTM*002*20080424~
    N9*AH*ZZ~
    MSG*EDI Test Only~
    N1*BT*PETSMART*1*173808684~
    N1*VN*Radio Systems Corp*1*781318710F~
    N1*ST*NEWNAN DISTRIBUTION CENTER*92*0038~ PO1*1*1*EA*140.41**UP*729849111455*VC*PBK00-11145~
    PID*F****2 IN 1 BOXED KENNEL~
    CTT*1~
    SE*16*6428~
    GE*1*4006~
    IEA*1*000004844~
    Acknowledgement (997)
    ISA*00* *00* *01*781318710 *01*173808684 *080418*1049*U*00401*000001032*0*T*>~
    GS*FA*781318710*173808684*20080418*1049*1032*X*004010~
    ST*997*1022~
    AK1*PO*4006~
    AK2*850*6428~
    AK5*A~
    AK9*A*1*1*1~
    SE*6*1022~
    GE*1*1032~
    IEA*1*000001032~
    850 (PO)
    ISA*00* *00* *01*173808684 ZZ9014270492 *080515*1444*U*00401*000000359*0*P*>~
    GS*PO*173808684*9014270492*20080515*1444*359*X*004010~
    ST*850*1123~
    BEG*00*SA*451943998**20080515~
    CUR*BY*USD*1.000~
    PER*SU*RON BACORN~
    FOB*CC*FA~
    DTM*001*20080526~
    DTM*002*20080525~
    N9*AH*ZZ~
    MSG*EDI Test Only~
    N1*BT*PETSMART*1*173808684~
    N1*VN*Fencemaster*1*9014270492~
    N1*ST*NEWNAN DISTRIBUTION CENTER*92*0038~ PO1*1*1*EA*140.41**UP*729849111455*VC*HBK11-10977~
    PID*F****2 IN 1 BOXED KENNEL~
    CTT*1~
    SE*16*1123~
    GE*1*359~
    IEA*1*000000359~
    Acknowledgement (997)
    ISA*00* *00* ZZ9014270492 *01*173808684 *080519*1749*U*00401*000001035*0*T*>~
    GS*FA*9014270492*173808684*20080519*1749*1035*X*004010~
    ST*997*1025~
    AK1*PO*360~
    AK2*850*1123~
    AK5*A~
    AK9*A*1*1*1~
    SE*6*1025~
    GE*1*1035~
    IEA*1*000001035~
    awaiting your response.
    Thanks and Regrads,
    Sudhakar Papaganti

    Hi,
    As per the above suggestion I have added the Interchange receiver Id and redeployed the configuration. The TP is not getting the FA for the second account whose interchange Id is added. The error is as folows.
    2008.07.25 at 11:33:16:818: RMI TCP Connection(3)-192.168.1.53: B2B - (DEBUG) oracle.tip.adapter.b2b.document.edi.ISelectorImpl:doLookup key = InterchangeReceiverQual, val = [ZZ]
    2008.07.25 at 11:33:16:818: RMI TCP Connection(3)-192.168.1.53: B2B - (DEBUG) oracle.tip.adapter.b2b.document.edi.ISelectorImpl:doLookup param = [01]
    2008.07.25 at 11:33:16:818: RMI TCP Connection(3)-192.168.1.53: B2B - (DEBUG) oracle.tip.adapter.b2b.document.edi.ISelectorImpl:doLookup Value and doc parameter don't match
    2008.07.25 at 11:33:16:819: RMI TCP Connection(3)-192.168.1.53: B2B - (DEBUG) oracle.tip.adapter.b2b.document.edi.ISelectorImpl:doLookup key = InterchangeSenderID, val = [173808684]
    2008.07.25 at 11:33:16:819: RMI TCP Connection(3)-192.168.1.53: B2B - (DEBUG) oracle.tip.adapter.b2b.document.edi.ISelectorImpl:doLookup param = [173808684]
    2008.07.25 at 11:33:16:819: RMI TCP Connection(3)-192.168.1.53: B2B - (DEBUG) oracle.tip.adapter.b2b.document.edi.ISelectorImpl:doLookup key = InterchangeReceiverID, val = [9014270492]
    2008.07.25 at 11:33:16:820: RMI TCP Connection(3)-192.168.1.53: B2B - (DEBUG) oracle.tip.adapter.b2b.document.edi.ISelectorImpl:doLookup param = [781318710]
    2008.07.25 at 11:33:16:820: RMI TCP Connection(3)-192.168.1.53: B2B - (DEBUG) oracle.tip.adapter.b2b.document.edi.ISelectorImpl:doLookup Value and doc parameter don't match
    Can some body suggest me whatz going wrong here. The ecs file has the value "ZZ" in the valid code list.
    Thanks and Regards
    Sudhakar

  • Same calculation producing two differing results

    Hi All
    I have some code in a user exit on save of a delivery (VL02N) that calculates the number of bags/pallets required to furnish that delivery.
    I am now adding the same code to a user exit on save a sales order (VA02) to calculate the number of bags/pallets again but when run it is producing differing results.
    the code is as follows:
    DATA: bag_weight(12) TYPE p DECIMALS 4.
    DATA: pallet_weight TYPE marm-umrez.
    DATA: bag_denominator TYPE i.
    bag_weight = pallet_weight / bag_denominator.
    Assuming pallet_weight = 1000 and bag_denominator = 40.
    On save of a delivery it is calculating bag_weight as 25.0000 (correct):
    On save of a sales order it is calculating bag_weight as 0.0025 (incoorect).
    All data declaration, code etc is the same. Does anybody have any clue as to why it would give two differing answers, I would not like to have to add a additional multiplication step to correct the result otherwise.
    Thanks in advance
    David

    Hi,
    Whenever you are using the Packed numbers, you need to check or set the program attribute fixed point arithmetic only as only this ensure that the decimal point is calculated correctly.
    Have a look at the help.sap.com documentation link:
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/eb2fd9358411d1829f0000e829fbfe/content.htm
    Hope this helps.
    Thanks,
    Samantak.

  • Same sql statement two different results?

    Hi,
    I was wondering if anyone knows why I am getting different
    results on the same query.
    Basically... when I run this query in "view" in sql server, I
    get the results I need, however when I run in Coldfusion, I am
    getting totally different results.... It is a totally different
    result...
    the query:
    SELECT DISTINCT
    tbl_employees.indexid, tbl_employees.[Employee ID] as
    employeeid, tbl_employees.[First Name] as firstname,
    tbl_employees.[Last Name] as lastname,
    tbl_employees.[Supervisor ID] as supervisorid,
    tbl_workaddress_userdata.firstname,
    tbl_workaddress_userdata.lastname,
    tbl_workaddress_userdata.supervisorid,
    tbl_workaddress_userdata.location,
    tbl_workaddress_userdata.employeeid,
    tbl_workaddress_userdata.locationdescription
    FROM tbl_employees FULL OUTER JOIN
    tbl_workaddress_userdata ON tbl_employees.[Employee ID] =
    tbl_workaddress_userdata.employeeid
    WHERE (tbl_employees.[Supervisor ID] = 7) AND
    (tbl_workaddress_userdata.location IS NULL)

    I suspect you and your CF DSN are looking at two different
    DBs...
    Adam

  • Two different results using one query

    Hi Friends
    Oracle version that I am using is : Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - 64bit Production
    With the Partitioning, OLAP and Data Mining options
    I have a scenario where one account can be related to two customers. Hence, in table have many rows for one account. Here’s the sample data:
    Account_ID | product_code | cust_id | relationship_code | entity_code
    1111 | ABC | 1234 | SOL | CUST
    1111 | ABC | 2222 | ZZZ | LINK
    1111 | ABC | 4455 | ABC | LINK
    2222 | ABC | 7890 | SOL | CUST
    2222 | ABC | 5678 | ZZZ | LINK
    3333 | JFK | 5878 | TST | CUST
    3333 | JFK | 3254 | PRI | CUST
    3333 | JFK | 3299 | PRI | CUST
    4444 | JFK | 2535 | SOL | CUST
    4444 | JFK | 4565 | SOL | CUST
    5555 | DEF | 6666 | PRI | CUST
    5555 | DEF | 6667 | TST | CUST
    5555 | DEF | 9667 | TST | CUSTIn this scenario, I need two outputs differently:
    Output 1: When an account has relationship_code = ‘SOL’ then take the least cust_id
    1111 | ABC | 1234 | SOL | CUST
    2222 | ABC | 5678 | ZZZ | LINK
    4444 | JFK | 2535 | SOL | CUST Output 2: else take the highest cust_id
    3333 | JFK | 5878 | TST | CUST
    5555 | DEF | 9667 | TST | CUSTHow can I get this result using one query?

    Not sure what you mean. Works OK:
    SQL> with t as (
      2             select 1111 account_ID,'ABC' product_code,1234 cust_id,'SOL' relationship_code,'CUST' entity_code from dual union all
      3             select 1111,'ABC',2222,'ZZZ','LINK' from dual union all
      4             select 1111,'ABC',4455,'ABC','LINK' from dual union all
      5             select 2222,'ABC',7890,'SOL','CUST' from dual union all
      6             select 2222,'ABC',5678,'ZZZ','LINK' from dual union all
      7             select 3333,'JFK',5878,'TST','CUST' from dual union all
      8             select 3333,'JFK',3254,'PRI','CUST' from dual union all
      9             select 3333,'JFK',3299,'PRI','CUST' from dual union all
    10             select 4444,'JFK',2535,'SOL','CUST' from dual union all
    11             select 4444,'JFK',4565,'SOL','CUST' from dual union all
    12             select 5555,'DEF',6666,'PRI','CUST' from dual union all
    13             select 5555,'DEF',6667,'TST','CUST' from dual union all
    14             select 5555,'DEF',9667,'TST','CUST' from dual union all
    15             select 6666,'XYZ',8877,'SOL','CUST' from dual
    16            )
    17  select  account_ID,
    18          product_code,
    19          cust_id,
    20          relationship_code,
    21          entity_code
    22    from  (
    23           select  account_ID,
    24                   product_code,
    25                   cust_id,
    26                   relationship_code,
    27                   entity_code,
    28                   case max(case relationship_code when 'SOL' then 1 else 0 end) over(partition by account_ID)
    29                     when 1 then dense_rank() over(partition by account_ID order by cust_id)
    30                     else dense_rank() over(partition by account_ID order by cust_id desc)
    31                   end rnk
    32             from  t
    33          )
    34    where rnk = 1
    35  /
    ACCOUNT_ID PRO    CUST_ID REL ENTI
          1111 ABC       1234 SOL CUST
          2222 ABC       5678 ZZZ LINK
          3333 JFK       5878 TST CUST
          4444 JFK       2535 SOL CUST
          5555 DEF       9667 TST CUST
          6666 XYZ       8877 SOL CUST
    6 rows selected.
    SQL> SY.

  • Two installations, two drives, two different results.

    I have a cheap and cheerful IOMEGA external drive, firewire connection, which had a full up to date Leopard OS from which I run Disk Warrior and TechTool. I like to keep them at a distance.
    As a precaution I ran the Snow Leopard upgrade on this and it did its business without a hitch.
    I proceeded to upgrade my main HD, full housekeeping done, again all went smoothly, but I found that *Address Book* came over empty and the Mail application was extremely buggy , requiring Force Quit to exit each time. Time Machine/Time Capsule to the rescue, all 9 hours of it.
    A rainy day prompted me to try again, same result, same recovery method.
    I checked out my external drive to find Mail and Address Book working quite nicely, thank you, but its not where I want to be, and Mail is my most used application.
    I would hope that this would give a clue to where the problem lies, obviously, the Snow Leopard upgrade disk is not the culprit.
    Any advice would be most welcome, pitched to the level of an ex-Windows, relative newbie Mac owner. I thought I had left this sort of thing behind!
    Thank you

    I've been to your web-site, idyllic , don't know why you bother sticking your head in front of a computer screen.
    Thanks! I'm basically lazy, and photography requires some actual effort, while computers require just sitting on your butt... Seriously, though, I do tend to spend my time on many different pursuits.
    I have the original disks that came with the computer (10.5).
    What say you if I did an "Archive and Install" , preserving users and network settings, hopefully, then updating the resultant OS up to the present and then using the Snow Leopard Upgrade disk.
    That would be worth a try, assuming you're doing an Archive & Install over a restored copy of your old Leopard system. You wouldn't be able to install Leopard over Snow Leopard without an Erase & Install (I think). This would replace some components of your system, and might fix whatever problems are causing your issues.
    About 20 months have gone by since then, perhaps the Combo updater would cover it?
    If you're going to install 10.5, then immediately install Snow Leopard on top of that, I don't know that I would bother with updating 10.5 to 10.5.8 first. You should get the same result either way, but the update would take a lot of time.
    As I write this I'm beginning to feel that there may be hundreds of reasons of not doing this, but feel free to throw cold water on it.
    Well, it might not work and you might still have to do a clean install... but it's worth a try if you've got the time to try it.

  • HT204053 Can two different icloud accounts used for the same mac computer and same Itunes account still transfer photos and downloaded apps to all devices associated with that mac?

    I purchased my wife an Iphone and we currently use the same icloud account, but we just ran out of storage. I'm not sure if we need so much more space that I'm ready to upgrade to 15 total GB of storage. If my wife sets up her own icloud account for her iphone will she and I still be able to share our photos, downloaded apps and music with different icloud accounts?

    Apps and music aren't anything to do with your iCloud account, indeed you can use different ID's for each.
    If you create and use another ID for iCloud, you will not be able to share both photostreams to the same user account on the computer.
    This could be worked around with a second user account on the computer for the second user to do all their computing in. However you may find that photostreams shared albums will work around the problem for you. For example if you create a shared album and share it with your partner, any photos you add to that album will be available in your partners photostream on the computer.

Maybe you are looking for