Case logic

I have wrote following script.
Purpose of this script is to track error in log file and notify use via email.
Currently this script only track one error at a time.
SrchKey="SRVE0242I:"
LogFilePATH/log/SystemOut.log
MailTo="[email protected]"
[ ! -f PATH/alert.last ] && touch PATH/alert.last
egrep $SrchKey $LogFile > PATH/alert.new
if [ -s PATH/alert.new ] ;then
diff PATH/alert.new PATH/alert.last > PATH/alert.msg
cp PATH/alert.new PATH/alert.last
[ -s PATH/alert.msg ] &&
mailx -v -s "$SrchKey Alert" $MailTo < PATH/alert.msg
else
echo "Nothing to report, sir." | mailx -s "No Alert Today" ${MailTo}
fi
I want to track multiple errors one script.
Do I need case logic, if yes How to add case logic?
ANy help will be appriciated. thanks
D

Your mean whole above script or which code.
currently script is tracking only one error as bellow:
I declared only one variable so far:
SrchKey="SRVE0242I:
I will add multiple error as below
SrchKey="SRVE0242I: | error | hang |
Do I need to put before declaration?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • How to implement "if/then/else" or "case" logic in a Statement Expression?

    I need a loop in my test sequence, so I define a Locals.LoopIndex which is of type Number, and I also define a Locals.PromptMessage, which is of type String. Within the loop body, have a statement step, in which I want to assign Locals.PromptMessage different strings according to the value of Locals.LoopIndex. The logic is like this (in suedo code)
    case Locals.LoopIndex:
    1: Locals.PromptMessage = "string1";
    break;
    2: Locals.PromptMessage = "string2";
    break;
    or
    if (Locals.LoopIndex == 1)
    then Locals.PromptMessage = "string1";
    else if (Locals.LoopIndex == 2)
    then Locals.PromptMessage = "string2";
    How can I implement this in the Statement Expression?
    Thanks!

    You can use the conditional expression (not sure what it is called). Syntax is Locals.variable=(BooleanExpression?ValueIfTrue:ValueIfFalse). To implement your pseudo code it would look like this:
    Locals.PromptMessage=(Locals.LoopIndex==1?"string1":"string2")
    This means the same as:
    If Locals.LoopIndex=1 then
    Locals.PromptMessage = "string1"
    Else
    Locals.PromptMessage = "string2"
    End If
    Another way to do it is like this, but the first method is preferred:
    Locals.LoopIndex==1?(Locals.PromptMessage="string1")Locals.PromptMessage="string2") -- must use parenthesis as shown
    This syntax is BooleanExpression?(Statement if BooleanExpression is true)Statement if BooleanExpression is false)
    You can nest the expression to create ElseIf conditions:
    Locals.PromptMessage=(Locals.LoopIndex==1?"string1"Locals.LoopIndex==2?"string2":"string3"))
    This means the same as:
    If Locals.LoopIndex=1 then
    Locals.PromptMessage = "string1"
    ElseIf Locals.LoopIndex=2 then
    Locals.PromptMessage = "string2"
    Else
    Locals.PromptMessage = "string3"
    End If
    I don't know if there is a limit to the nesting.
    Hope this helps.
    - tbob
    Inventor of the WORM Global

  • Getting PL/SQL:ORA-00933 when using CASE logic as a control structure

    Hello Everybody,I have created a PL/SQL block(Control Structure) to calculate bonus of employees based on salary of the employee,but I get errors like ORA-00933 and ORA-06550.Given below is the PL/SQL block which I tried to implement
    SQL> DECLARE
    2
    3 v_EMPNO NUMBER(7,2):= &p_EMPNO;
    4 v_SAL EMP.SAL%TYPE;
    5 v_BONUS NUMBER;
    6
    7 BEGIN
    8 SELECT SAL
    9 FROM EMP
    10 INTO v_SAL
    11 WHERE EMPNO = v_EMPNO;
    12
    13 v_BONUS :=
    14 CASE v_SAL
    15 WHEN v_SAL = 0 THEN 0
    16 WHEN v_SAL < 1500 THEN (0.1*v_SAL)
    17 WHEN v_SAL BETWEEN 1500 AND 3000 THEN (0.15*v_SAL)
    18 WHEN v_SAL > 3000 THEN (0.20*v_SAL)
    19 END;
    20
    21 DBMS_OUTPUT.PUT_LINE(' EMPNO '||v_EMPNO||' SALARY '||v_SAL||' BONUS '||V_BONUS);
    22
    23 END;
    24 /
    Enter value for p_empno: 7100
    old 3: v_EMPNO NUMBER(7,2):= &p_EMPNO;
    new 3: v_EMPNO NUMBER(7,2):= 7100;
    INTO v_SAL
    ERROR at line 10:
    ORA-06550: line 10, column 7:
    PL/SQL: ORA-00933: SQL command not properly ended
    ORA-06550: line 8, column 7:
    PL/SQL: SQL Statement ignored
    Is it that I can not use "CASE" as a control structure in the above block , when I code
    "SELECT SAL
    FROM EMP
    INTO v_SAL
    WHERE EMPNO = v_EMPNO;" to get v_SAL and then use it in CASE exp to calculate a value for v_Bonus.
    Kindly let me know.

    Hi,
    The CASE Expression is also available in PL/SQL.
    Try this code:
    DECLARE
       V_EMPNO   NUMBER (7, 2)  := 7788;
       V_SAL     EMP.SAL%TYPE;
       V_BONUS   NUMBER;
    BEGIN
       SELECT SAL
         INTO V_SAL
         FROM EMP
        WHERE EMPNO = V_EMPNO;
       V_BONUS :=
          CASE
             WHEN V_SAL = 0
                THEN 0
             WHEN V_SAL < 1500
                THEN (0.1 * V_SAL)
             WHEN V_SAL BETWEEN 1500 AND 3000
                THEN (0.15 * V_SAL)
             WHEN V_SAL > 3000
                THEN (0.20 * V_SAL)
          END;
       DBMS_OUTPUT.PUT_LINE (   ' EMPNO '
                             || V_EMPNO
                             || ' SALARY '
                             || V_SAL
                             || ' BONUS '
                             || V_BONUS
    END;As you are Using,Comparison Expression to find a match, Your Searched CASE Expression should be something like this.
    DECLARE
      sal       NUMBER := 2000;
      sal_desc  VARCHAR2(20);
    BEGIN
      sal_desc := CASE
                     WHEN sal < 1000 THEN 'Low'
                     WHEN sal BETWEEN 1000 AND 3000 THEN 'Medium'
                     WHEN sal > 3000 THEN 'High'
                     ELSE 'N/A'
                  END;
      DBMS_OUTPUT.PUT_LINE(sal_desc);
    END;If you are Using CASE as a Value matching then your piece of code should be like this..
    DECLARE
      deptno     NUMBER := 20;
      dept_desc  VARCHAR2(20);
    BEGIN
      dept_desc := CASE deptno
                     WHEN 10 THEN 'Accounting'
                     WHEN 20 THEN 'Research'
                     WHEN 30 THEN 'Sales'
                     WHEN 40 THEN 'Operations'
                     ELSE 'Unknown'
                   END;
      DBMS_OUTPUT.PUT_LINE(dept_desc);
    END;Thanks,
    Shankar

  • Case statement logic for External Tables

    Hi All,
    Is there anyway I can perform a CASE logic in External table creation script?
    I have a column which is supposed to receive only Numbers. But if i inadvertently receive a String, i want to insert NULL for that instance.
    My table has the following creation syntax: ( I have to make a check for the NumValue column - althought I am using VARCHAR2(50) I have the transformation stage where the NumValue column has a CASE logic ; my entire file is getting rejected just because a single row in the input dat file is coming as a String)
    CREATE TABLE XYZ_TABLE
         LineNumber NUMBER(20),
         NumValue VARCHAR2(50 BYTE)
    ORGANIZATION EXTERNAL
    ( TYPE ORACLE_LOADER
    DEFAULT DIRECTORY "EXT_TAB_DIR"
    ACCESS PARAMETERS
    ( RECORDS DELIMITED BY NEWLINE
    BADFILE 'EXT_TAB_DIR_LOG':'FILE1.BAD'
    LOGFILE 'EXT_TAB_DIR_LOG':'FILE1.LOG'
    DISCARDFILE 'EXT_TAB_DIR_LOG':'FILE1.DSC'
    FIELDS TERMINATED BY '#|#'
    OPTIONALLY ENCLOSED BY '#$' and '$#'
    MISSING FIELD VALUES ARE NULL(
    LINENUMBER,
         NUMVALUE
    LOCATION
    ( 'FILE1.dat'
    REJECT LIMIT UNLIMITED;
    Thank you,
    Chaitanya

    Chaitanya wrote:
    So here, in the CASE logic, can i perform a check for validating if the value received for NumValue is only number and not some Varchar2 value (which I am currently receiving for some rows)Assuming "is only number" means NumValue column can containg digits only:
    insert
      into TableABC(
                    linenumber,
                    nuvalue
      select  linenumber,
              NumValue
        from  TABLEXYZ
        where regexp_like(NumValue,'^\d+$')
    /SY.
    P.S. If NULL column NumValue is allowed, add OR NumValue IS NULL

  • Keystation Pro 88 (or other controller) as the Logic Control

    Has anybody got their setup like this? I've been trying to get this to work for the past 6 hours and no luck. Can someone please help me? Just bought Studio 2 days ago and haven't touched it yet cuz I can't get the keyboard to fully work.
    Joined: 17 Jan 2006
    Posts: 55
    Location: Los Angeles
    Posted: Sun Jul 15, 2007 12:03 am Post subject: Keystation Pro 88 (or other controller) as the Logic Control
    I'm sure some of you already know how to do this. I just figured I'd write this up at some point to share with others. The basic idea is to use the Keystaion Pro 88 (or some other MIDI Controller) as an actual Control Surface, or in this case the Logic Control, to have more freedom with the MIDI Controller, i.e. using the group of 8 faders (on the Keystation) to control Volume for tracks 1-8 in the arrange window, and then hitting Bank Right to automatically control tracks 9-16, and as a result making a universal controller not bound by specific channel messages, or MIDI CC Volume messages etc... in short the essence of any Control Surface.
    What I'm describing below is what this app will also do: http://www.opuslocus.com/lcxmu/index.php
    I basically just wanted to avoid using a separate application all together. Keep in mind that the app does simplify the whole process, but Logic inherently can do pretty much everything the app does.
    I recommend reading this in its entirety before attempting.
    KeyStation Pro 88 as Logic Control
    Part One: Add Logic Control as Control Surface
    1. Open Logic.
    2. Preferences / Control Surfaces / Setup...
    3. New / Install / Select your preferred device (in my case Logic Control
    4. Click the icon in the setup window for the Logic Control.
    5. On the left hand side under "Logic Control" you should see an "Out Port:" and "Input:" ... select the desired MIDI in/out through which your device is connected.
    6. Open Preferences / Control Surfaces / Controller Assignments. Make sure you select the "EXPERT VIEW" check box.
    7. You should now see a bunch of different Zones in the Zone column, one of which is "Control Surface: Logic Control"
    8. Create your own Zone, KeyStation Pro 88 (or whatever) using the Plus sign in the bottom left corner of the Controller Assignments window.
    9. Now basically go through the existing parameters already available in the Logic Control Zones, Select what you want. You can select entire Modes or individual Controls / Parameters. You can select multiple values (only multiple Control / Parameters NOT modes) by selecting and dragging or simply with select and holding command.
    10. Command-C the selected Modes and then click back onto you user zone that you created above.
    11. Click inside the Mode column (or Control / Parameter column depending upon what you selected and copied from the Logic Control zones).
    12. Command-V to paste the Modes into your user Zone.
    13. Do this for as many Modes / Controls you want, that your specific MIDI controller interface will be able to handle.
    Part Two: Assigning Input Values
    1. Open Preferences / Control Surfaces / Controller Assignments
    2. Now for each parameter that you copied, you will need to set the input MIDI value from your controller.
    3. Click on your User Zone, then Mode, then the first parameter in the 3rd column.
    4. You should see a "MIDI Input" option (this should already be set correctly as long as you set it earlier in Step 5 of Part One). If it's not set to the correct MIDI input (which I found to be the case sometimes even after Step 5), then change that here.
    5. Next to "Value Change:" you will see a box with MIDI data in it. Delete the existing date by highlight and delete.
    6. Activate "Learn Mode" (bottom right corner of Controller Assignments window) then click within the "Value Change" box, then move the corresponding fader, button etc. The "Value Change" should now show the MIDI data value for that fader. Be careful here, there should only be 3 groups of 2 for data here... if you see 2 groups, of 3 groups, of 2 then typically the FIRST group of 3 should be the value you want here. You can always delete the data, and move the fader again to be sure. The reason for the 2 groups of 3 is not in error: some buttons send TWO MIDI values, one on press and one on release. You can use this to your advantage and assign TWO different functions to these buttons, thus the first (press hold) value can do one thing and the second (release) value can do another. You can also change the MIDI controller to only send 1 message on press and nothing on release, or simply make sure that only the on value is present in the "Value Change" box.
    7. You'll have to do this for all the different knobs / faders etc. on your MIDI controller. There are many shortcuts of course. You can manually type in the Values if you know them. For the Keystation Pro, M-Audio has an app called Enigma that I recommend for changing controller parameters and much more on the Keystation. You can use this app to assign all the actual control data that each button or fader sends to the sequencer, once you know the values you can convert that data to the MIDI data values and enter them into the Value Change box.
    8. Once you're done assigning values to the controllers, you can delete all the Zones except for the user Zone you created earlier. Before you do this, it's a good idea to back up the Control Surface preference file just in case you ever want to grab something else from the Logic Control Zones. You could always add a second Logic Control and copy the Zone from that, but you'd have to reassign all the MIDI Input: values ... short version, just back up the preference file before you delete the Zones. The reason why you want to delete the Zones that you're not using is simply because if you have a controller that happens to send out MIDI data to the sequencer, and the actual Logic Control happens to have that MIDI data value already inherent it it's Zones, then you could be asking for trouble, simply put you'd be sending MIDI data to change Volume and the Logic Control maybe has that MIDI Data Value already assigned to Pan for the existing track.
    The file to backup is located here: ~Users/username/Library/Preferences/Logic/com.apple.logic.pro.cs
    As a precaution I have always backed up my Logic Preference file WITH this .cs file. Technically it's not necessary... for instance: Let's say you trash your preferences and open Logic to find that the Logic Control is missing from the Control Surfaces Setup. So you add it back and now you find out that Logic is missing the User Zone that you created. If you close Logic and copy the .cs file back to the directory above, then upon reopening Logic you should find your User Zone is in place again. But I've had mixed results with that, so just in case I copy over the preference file with the .cs file as a pair. It seems that the Logic pref file only contains information that the Logic Control is a Control Surface on your system and the .cs file is the preferences for that specific Surface.
    Another note: after a recent Logic update, maybe 7.2? ... it was whichever update added support for more Control Surfaces, I can't remember. This update basically erased all the hours of hard work linking the Keystation to Logic as the Logic Control. This only happened with this specific Control Surface update, but not with 7.2.3, probably simply because they didn't make any changes to the .cs pref file.
    Anyhow, when this happens again in the future, there seems to be a quick fix. I take NO responsibility for you somehow crashing Logic on a continual basis after applying the fix. Personally I have seen NO issues by doing this at all. I simply copied a version of the .cs file with the new update missing the Keystation Zone, as well as a version of the .cs file WITH the Keystation Zone, to a PC (I think it was a PC, don't believe I tried it with textedit, although should work as well). I opened both of the files in notepad and compared them. I noticed the word Keystation towards the bottom and realized that most all the data (gibberish) was exactly the same up until a point in which the file with the Keystation data had a group that was absent from the new .cs pref file from the new update. So I basically copied the data from the old .cs pref file, pasted it into the new .cs pref file, saved it and open Logic. Logic warned me that a pref file was corrupt or something of that nature, but loaded fine anyway, and the Keystation Zone was back in Controller Assignments.
    One last thing... the problem that some of you may run into is that by making your MIDI controller a Control Surface, or turning your Keystation Pro into a Logic Control, limits some of the functionality of the MIDI Controller. For instance, a Logic Control's main purpose is to control different faders, knobs and what not of MANY different tracks. When you move a fader for volume on the Logic control, it will move the fader corresponding to the selected track... it's not programed to say change the actual midi CC 7 for Volume, only the actual Fader. Thus, what if you want the MOD wheel to still control modulation and you want the sustatin pedal to continue to act as a sustain pedal. Well, if Logic sees that Port 1 is the input for the Logic Control, but in reality the Keystation, then it's only going to allow specific events through. The way around this issue is by using both the input options that the Keystation has... hook the MIDI out into Logic and use the USB port as well. I run the Keystation as a Logic Control through the USB port, and use the MIDI out for actual MIDI data. But the catch is you have to make sure you only connect the MIDI Port into Logic's sequencer in the environment. Thus open the environment, open Clicks & Ports, Port 1 and Port 2 are the IN/OUT for the USB port. Midi Port is the Keystation's MIDI port. Select and delete the cable for the SUM, and run individual cables for the ports you want to use. Thus, all your other MIDI interface Ports, the Caps Lock keyboard etc. Just be sure that if your using Port 1 (USB Port Out from Keystation) for the fake Logic Control, that it DOES NOT cable into the "Input View" or "to Recording & Thru". This creates yet another issue:
    The controls on the Keystation have to send SOME form of MIDI control message / data to Logic. Well if the faders on the Keystation are preset to send Ch1-9, Volume 0-127 messages, then when you move a fader on the Keystation (as the Logic Control) since the Keystation is still reaching the sequencer from the MIDI port, you will be sending MIDI values that can effect your current track possibly when you don't want to. The work around for this is to be sure that all the faders / knobs that you want to use as your fake Logic Control are sending useless MIDI data... i.e. CC 75, 76, 77, and so on. This way moving faders won't effect playback, although you could still in theory record this MIDI data into your sequencer. You could however filter this events from entering the sequencer input with a transformer since you know precisely what MIDI CC values you are changing. The easy way to assign these values is to use the program Enigma from M-Audio that I mentioned above.
    More discussion specifically related to the Keystation Pro 88:
    You can do a lot using the Controller Assignments and different Zones from the Logic Control. For instance, the real Logic Control has Solo, Mute, and Record buttons for the 8 faders. The Keystation Pro only has 1 button underneath each fader. But you could use one of the other buttons to toggle Solo, Mute, and Record mode so that depending on which mode your in, the buttons underneath each fader will correspond to Mute or Solo etc. By the way, a good setup from my experience is to use the first 8 faders of the Keystation as the track faders, and the final 9th fader for Master Volume. You can then set two of the buttons underneath the Knobs as Bank Left and Bank Right buttons to change the 8 fader tracks to correspond to the onscreen track groups of 8. Also don't forget that you can assign TWO functions to EACH button, since a button press can send a value of 127 and a button release can send a 00 value. So if you press and hold a button it can activate "Shift-select Mode" and until released it can make the buttons under the faders act as Volume to Zero resets or whatever you want. When you release the button it will go back to just Mute mode or Solo mode. The Controller Assignments window has MANY options, and parameters some of which are very confusing and take a lot of trial and error to understand... the manual helps a little but of course isn't perfect.

    I'm thinking about buying a Keystation Pro 88 (2nd hand) so I was googling around and found this:
    http://www.soundonsound.com/sos/Oct04/articles/keystation.htm
    [quote]
    I had some trouble getting the transport controls to work with Emagic's Logic, even when I loaded the 'Pro 88 Logic Preset.LSO' file on the supplied CD-ROM into Logic. I contacted the guys who designed and set up the Keystation here in the UK at the old Evolution offices, and between us we managed to work out what was going wrong. First of all, you need to enter the appropriate MIDI key commands in Logic's user preferences. These cannot be updated with an LSO file, so the commands have to be entered using the Learn Key function in Logic (see the screenshot below for the list we used). Then we discovered that the transport keys were toggling, which meant that only each second press of each key was actually working. It turned out that I had an early version of the Logic preset before this had been fixed, but the more recent one has been put on the M Audio web site for anyone else that needs it. It took about 30 seconds to change the output commands so that the buttons were no longer toggling.[/quote]
    Did you get it to work correctly eventually?

  • CASE Expression question

    Hi,
    I am wondering how to implement case logic where THEN statement would be written only once for many WHEN's.
    This example is from the oracle documentation, I extended it a bit.
    SELECT cust_last_name,
    CASE credit_limit
    WHEN 100 THEN 'Low'
    WHEN 200 THEN 'Low'
    WHEN 5000 THEN 'High'
    ELSE 'Medium'
    END
    FROM customers;
    As you see we select 'Low' for both values 100 and 200.
    What I am really looking for is something like:
    SELECT cust_last_name,
    CASE credit_limit
    WHEN 100
    WHEN 200 THEN 'Low'
    WHEN 5000 THEN 'High'
    ELSE 'Medium'
    END
    FROM customers;
    OR
    SELECT cust_last_name,
    CASE credit_limit
    WHEN 100 OR 200
    THEN 'Low'
    WHEN 5000 THEN 'High'
    ELSE 'Medium'
    END
    FROM customers;
    But both of selects are not valid in oracle (tested on 10g Rel2)
    Maybe it is very simple and I am witting it wrong, or it is working only the way I have to repeat the THEN to every WHEN.
    Thanks in advance!
    let's say I would like to perform the same step

    Hello
    What about
    tylerd@DEV2> SELECT
      2      CASE
      3          WHEN dummy IN('X','Y','Z') THEN
      4              'Dummy is X, Y or Z'
      5          WHEN dummy LIKE 'A%' THEN
      6              'Dummy is like A'
      7          ELSE
      8              'Dummy is something else'
      9      END
    10  FROM
    11      dual
    12  /
    CASEWHENDUMMYIN('X','Y'
    Dummy is X, Y or ZTHTH
    David

  • Logical file paths invisible

    Hello All,
    Can any 1 share their views on why excialty Logical file paths & Logical file names are used.
    From last 2 days we are facing an issue on our PRD system.
    In our case Logical file paths & Logical file names are used for interfacing external Application programs.
    The files are processed & sent either Inbound or Outbound.
    Apparently, The Logical file paths(2 of them) which was visible earlier is now invisible. The reason for this is unknown. But the Interface functions still work well.
    Is there a reason why its invisible suddenly? Can it be made visible again or do we need to create new ones?
    Tx-code FILE  is used for "Logical file path definition"
    Please suggest,
    Regards,
    Ravi

    Hi,
    >Can any 1 share their views on why excactly Logical file paths & Logical file names are used.
    Logical paths and files are very useful for 2 reasons.
    You can write abap programs independant from the OS, you can even have different OS in the same system. For example the CI server onh Unix and the app servers on Windows.
    On windows, it is also very useful to have paths independant of the environment (DEV, QAS, PRD) because you can use variables.
    Example you can use this kind of syntax :
    <P=SAPMSHOST>\SAP_IN\<SYSID>_<CLIENT>\DIR1\DIR2\<FILENAME>
    For the "invisible paths", I have absolutely no idea because all my logical paths have never disapeared until someone deleted them.
    Regards,
    Olivier

  • Syncing AkaiPro Mini to Logic's tempo

    Just bought the Akai Mini http://www.akaipro.com/mpkmini for it's flexible arpeggio feature. It's supposed to be able to allow the tempo in Logic to determine the tempo of the arpeggio, but I can't figure out how to make that happen. The manual, naturally, doesn't make this clear at all. Any pointers would be greatly appreciated.
    Thanks...

    For the record, I found the answer on YouTube. http://www.youtube.com/watch?v=ck1OOXEOY3Q
    As he explains, you have to
    Go into the Logic project's "Settings."
    Select "Syncronization."
    Select the "MIDI" tab
    Then, next to "Transmit MIDI Clock", check "Destination 1" and use the pulldown menu to choose your device, in my case the MPK Mini. See pic below...
    In other words, it's not enough to tell the MPK Mini to use an external clock (which you do through it's Editor software). You have to tell that clock (in this case, Logic's) to send it's signal to the MPK Mini. The "conversation" has to go both ways...
    This was helpful to me. Hope it's of some use to others!
    Hat tip to http://www.youtube.com/user/Chillerman345 for his clear and concise tutorial.

  • Which is a better source for an Indicator, physical or logical

    Hi guys,
    this is something I was wondering -
    which is better for filtering out a value? (for example to Count measures with certain Indicator equal to Yes).
    A) Logical (check "Use existing logical columns as the source") and the use something like CASE Logical table.Indicator Measure When 'YES' Then 1 END
    or
    B) Physical (create a column and in Data Type select the Column mapping and map as
    CASE Physical table.Indicator Measure When 'YES' Then 1 END
    Physical table is the same.
    I know, it's always best to push things to DB back. But in this case, it'd be the same, it doesn't appear to me which option is better at this point.
    By the way, both of them work.
    Thanks
    Message was edited by:
    wildmight

    Both should be same. You can verify this by checking the physical sql generated by using both methods. Most likely they would be same.

  • Text Style question re INSTR Global text source - Logic Pro X

    I write arrangments for an 18 piece big band. The line up is 5 saxes, 4 trumpets, 4 trombones, piano, bass, drums, male vocalist & female vocalist.
    I only have one GM sound module (Kentron SD2). I use a Midisport 2x4 Midi Interface between the Mac Mini and the Sound Module.
    The set up in Logic Pro X is that in the midi envronmemnt I have 1 multi instrument with the complete band linked up to that
    The set up is as follows:
    Channel 1  1st and 2nd Altos
    Channel 2  1st and 2nd Tenors
    Channel 3  Baritone
    Channel 4  1st and 2nd Trumpets
    Channel 5  3rd and 4th Trumpets
    Channel 6  1st and 2nd Trombones
    Channel 7  3rd and 4th Trombones
    Channel 8  Piano
    Channel 9  Bass
    Channel 10 Drums
    Channel 11 Male Vocal
    Channel 12 Female Vocal
    All the above instrments are on individual tracks even where they share a midi channel- these parts are printed out for use by the band
    Channel 13-16 are spare channels that I use during the development of the arrangement - the track contents for these are not printed out
    Here is the problem. When I print out the parts for the various insturments and use the INSTR global text to identify the specific instrument on the part header, what is displayed is the patch identity for the various instruments as indicateid in the Library. Logic is not reading the track name for this.
    It follows that 1st and 2nd Altos will show on the part header  Alto Sax - similarly for the other wind instruments sharing a midi channel.
    I am a recent convert from Logic Audio for Windows v 5.5.1 where I used the same set up. In that case Logic read the track information and therefore the instrument identification was correctly displayed on the printed parts.
    Any ideas how I can overcome this problem without having to go into each part and manually change the instrument description.
    thanks
    Swingtones

    Hi everyone, Sorry for my earlier long post, I just found the answer. All I needed to do is select REGION instead of INSTR
    Happy Days!
    Swingtones

  • CASE statement inside DECODE

    Hi All,
    I am trying to use a CASE logic inside a DECODE function while selecting data from a table. But unable to get the correct syntax. Is there something that I might be missing?
    My snippet looks like -
    SELECT DECODE(CASE WHEN COL2 > 10 THEN 'HIGH', WHEN COL2 < 10 THEN 'LOW' END RANGEVALUE, 'HIGH', 'YES','LOW','NO','N/A')
    FROM TEST_TABLE;My table looks like -
    TEST_TABLE
    COL1 VARCHAR2(10),
    COL2 NUMBER(8,0)

    Chaitanya wrote:
    My snippet looks like -
    SELECT  DECODE(
                   CASE
                     WHEN COL2 > 10 THEN 'HIGH'
                     WHEN COL2 < 10 THEN 'LOW'
                   END,
                   'HIGH','YES',
                   'LOW','NO',
                   'N/A'
      FROM  TEST_TABLE
    /But it is an overkill:
    SELECT  CASE
              WHEN COL2 > 10 THEN 'YES'
              WHEN COL2 < 10 THEN 'NO'
              ELSE 'N/A'
            END
      FROM  TEST_TABLE
    /Or, if you wnat to use DECODE:
    SELECT  DECODE(
                   SIGN(COL2 - 10)
                   1,'YES'
                   -1,'NO',
                   'N/A'
      FROM  TEST_TABLE
    /SY.

  • A case that works with Vision M play

    I am going to buy a Zen Vision M (can't wait!!!!) this month. I was browsing the selection of players at Wal-Mart and came across this mp3 player case. It was about 3-5 bucks (bought it before Christmas, can't remember the exact price now). A Wal-Mart associate let me try the case out on the display Vision M and it works great!? It's a soft case, has a zipper that goes around three sides of the case. There's a pocket inside the case to store small items and there's a form fitting strap on the back so you can slip it over the back of your hand to carry it with a better grip. The case has some padding to it and the packaging claims it is "weather resistant". Also has?a headphone line out hole in the top of the case so you can thread the headphone wire through it in order to listen to the player while its in the case. The brand is Case Logic. (www.caselogic.com)?Just thought I'd throw that out there for anyone interested.

    Im not sure of its size but an altoids case could be feasable.
    check out mine:
    http://smg.photobucket.com/albums/v627/Fev3r/Zen/
    its easy to make and really cheap, PM me if you have any questions

  • Which way - Streams or Logical Standby?

    Hi,
    I'm having a requirement to replicate a schema between two databases. The scenario is that we've got an Interactive Voice Recorder system for tracking voice calls to a call center contact.
    The system will be hosted in two sites, with kind of load balancing where calls are routed to either of the centers. The two centers will each have an OLTP database, and the databases will of-course be similar.
    There's a particular schema that needs to be replicated between the two databases so that the schema is available in either of the nodes. We were thinking of Active Standby but this seems to be out of question because the two databases need to be open read-write all the time.
    We are looking into Streams to accomplish this, but we wonder if a logical standby can also accomplish the same, since it can be open read-write?
    The database version will be 11.1.0.7.0

    user11983948 wrote:
    Thanks Anuraq,
    The volume of the data that will be replicated will be small, just a single schema. I also did not clarify, but the data in the two databases will be kept only for about 30 days, then truncated, after being sent to a separate warehouse server where the data will be stored and analyzed.
    Regards,
    dulaIf the data replicated is small, and dmls are free then streams would be better than logical standby.
    Regarding the truncate part you meant the data would be deleted from the table which are older than 30 days. Streams would be able to handle that. Make sure you delete the data from one site only and that would be replicated on another site. I also assume you are looking for two way replication in that case logical standby is not an option.
    Regards
    Anurag

  • Desperately In Need Of Case For (ZEN MicroPho

    I've done hours of research but can't come up with any Microphoto Cases, I realize the normal Zen Micros cut off the top of the ZMP's screen. I don't want that, at this point I'll take anything from Silicon to Aluminum cases. Anybody have any ideas?
    (Please no Altoids Tin)Message Edited by AnDrew005 on 02-3-2006 04:50 AM

    on my zen micro i simply use a case-logic soft/spongy case. this is for a dsc-p9. i had to modify the clip as it was a loop. here in thailand i was able to find a clip (use an old clip from cell phone case) and sew it into the thing. punch a hole in the back for the line. im pretty happy with it although its a wee bit short with the jack atthe top - us0 bucks.
    th ebiggest issue youll have fashioing a case is the jack at the top. enuff clearance for teh jack, but not a suitcase on your belt.

  • Logic to lookup custom table

    Hi All,
    I have created a custom table like below.
    Document Type     Cleared Flag
    C1                      B
    C2                      B
    L1                      A
    W1                      F
    D1                      B
    D2                      A
    A1                      J
    A2                     A
    A3                     J
    X1                     X
    ZP                     E
    T1                     Z
    P1                     A
    P2                     A
    P3                     A
    P4                     A
    P5                     A
    P6                     A
    P7                     A
    M1                     H
    W3                     A
    W2                    W
    My report has some case logic like below.
    case bkpf-blart.
        when 'C1'.
          move 'B' to t_sales_comp-cleared_flag.
        when 'C2'.
          move 'B' to t_sales_comp-cleared_flag.
        when 'L1'.
          move 'A' to t_sales_comp-cleared_flag.
        when 'W1'.
          move 'F' to t_sales_comp-cleared_flag.
        when 'D1'.
          move 'B' to t_sales_comp-cleared_flag.
        when 'D2'.
          move 'A' to t_sales_comp-cleared_flag.
        when 'A1'.
          move 'J' to t_sales_comp-cleared_flag.
        when 'A2'.
          move 'A' to t_sales_comp-cleared_flag.
        when 'X1'.
          move 'X' to t_sales_comp-cleared_flag.
        when 'ZP'.
          move 'E' to t_sales_comp-cleared_flag.
        when 'T1'.
          move 'Z' to t_sales_comp-cleared_flag.
      when 'P1'.                                         "VS001--
        when 'P1' or 'P2'.                                 "VS001++
              move 'A' to t_sales_comp-cleared_flag.
        when 'P3' or 'P4'.                                 "VD001++
              move 'A' to t_sales_comp-cleared_flag.
        when 'M1'.
          move 'H' to t_sales_comp-cleared_flag.
        when 'W3'.
          move 'A' to t_sales_comp-cleared_flag.
        when 'W2'.
          move 'W' to t_sales_comp-cleared_flag.
        when others.
          move space to t_sales_comp-cleared_flag.
      endcase.
    Now i have to replace this CASE logic to look at this Ztable to populate t_sales_comp-cleared_flag.
    Any body help in giving idea.
    Regards,
    Sai

    Hi Sai,
    instead of using Case why dont you use if statements as below.
    select Document Type, Flag from Ztable into itab where blart = input blart(s).
    loop at  t_sales_comp.
      read table itab into wa with key blart.
      if sy-sybrc = 0.
       move wa-flag to  t_sales_comp-cleared_flag.
       modify t_sales_comp transporting cleared_flag.
       clear t_sales_comp.
      endif.
    endloop.
    Hope this will help you.
    <b><REMOVED BY MODERATOR></b>
    Satish
    Message was edited by:
            Alvaro Tejada Galindo

Maybe you are looking for