Pl help me with the best way of coding this

I have a procedure in which there is a varchar2 parameter passed ie p_job . I have to use this parameter in the where clause of the static query.
If the passing value is '*' then
IF p_job = '*' THEN
WHERE JOB IN ('MANAGER', 'CLERK', 'SALESMAN')
ELSE
WHERE JOB=p_job
How to write the query?
Manjula

Where job = DECODE(p_job,'*','MANAGER','*','CLERK','*','SALESMAN',p_job) That would give you only the first value from the decode, not the IN list of values that the OP requires.
SQL> variable p_job varchar2(10)
SQL>
SQL> exec :p_job := '*' ;
PL/SQL procedure successfully completed.
SQL> select DECODE(:p_job,'*','MANAGER','*','CLERK','*','SALESMAN',:p_job) from dual ;
DECODE(:P_JOB,'*','MANAGER','*',
MANAGER
1 row selected.
SQL>

Similar Messages

  • I've been using older printers (including an imagesetter) connected to10.5.8  With a new 10.6 machine I'm looking to still use the printers. I can use the olderG5 as a sever if need be. What would be the best way to do this?   ine

    I've replaced my 10.5.8 with another machine 10.6.8 which as we know doesn't support Apple Talk which has been used to print to 2 bulletproof older printers and an imagesetter. I wan't to keep using the printers and can use the 10.5.8 as a server. What is the best way to do this?

    Hi
    You could do this a number of ways. Using the LPD Daemon might work best for your location?
    First: assign the machine you're going to use as the 10.5.8 'server' a fixed IP address.
    Second: add desired printers to that machine using the usual methods.
    Once added share them using the Print Sharing option in the Sharing Preferences Pane. On the 10.6.8 machine add the printer using the IP address of the 10.5.8 'server'.
    System Preferences > Print & Fax and click the '+' icon. Click on the IP Icon and key in the IP address you previously assigned. Leave the Queue field alone and select the relevant PPD from the Print Using field (see below). You'll have to search for these yourself.
    You don't have to 'install' the PPDs on the 10.6.8 machine as such. Simply copying them over from their location on the 10.5.8 machine (use a memory stick to do the transfer) to the same location on the 10.6.8 machine will be enough.
    There should be no need to restart.
    HTH?
    Tony

  • I have two videos and I would like to use parts of both videos with one audio track what is the best way to edit this?, I have two videos and I would like to use parts of both videos with one audio track what is the best way to edit this?

    In Final Cut Express I have two videos I'd like to merge parts of each video into a final film.  What is the best way to do this in FCE?

    Hi
    I use a slightly different way than Alchroma.
    Same
    • One video on track 1 and the other on Video.track 2
    • Resize to 25% and move one to the left and the other to the right
    Diff
    • I don't use the blade tool
    • I use the Pen tool and change the transparency - then I get fast or slow transitions in same stroke and easy to fine-tune later if needed. (But this can be done with the Roll-tool if Blade is used - so it might be as easy)
    Final
    • Resize to 100% and Center
    Video is done
    Audio - very close to this by changing the level so that best audio will dominate
    • Pen tool here too
    But that's me - the Alchroma way is as good as this or may be better for some
    Yours Bengt W

  • My business has 100 ipads 3g with no control at the moment - i need to now control the ipads - what apps they can use - and restict certian use on the ipads - whats the best way to do this - it will need to be done remotley.

    my business has 100 ipads 3g with no control at the moment - i need to now control the ipads - what apps they can use - and restict certian use on the ipads - whats the best way to do this - it will need to be done remotley.

    MDM  -- moble device management 
    MDMs
    Airwatch, Meraki, MobileIron, Profile Manager on OS X Server, or Zenprise
    For a comparison see this page:
    http://www.enterpriseios.com/wiki/Comparison_MDM_Providers
    Airwatch
      http://www.air-watch.com/
    Meraki -- A free MDM   [ expect lots of email and phone calls about upgrades ]
      http://www.meraki.com/products/systems-manager/
      https://discussions.apple.com/thread/4067210?tstart=0
      Good howto by Sergio Sosa.
      https://discussions.apple.com/thread/2594001?start=15&tstart=0
    MobileIron
      http://www.mobileiron.com/
    Profile Manager by Apple
    Zenprise
      http://www.zenprise.com/

  • I would like to display what's on my Mac Pro monitor on my iPad with as little latency as possible. What's the best way to do this?

    I would like to display what's on my Mac Pro monitor on my iPad with as little latency as possible. What's the best way to do this?

    Your image history (if I understand you properly) is stored in your catalog file, and nowhere else, and so it is only on a single drive.
    Do you mean you have edited photos on multiple drives? This isn't a problem for Lightroom at all, the software doesn't care, and you can leave things just the way they are. But if it bothers you for some reason, you can move the photos to a single drive if you want. In Lightroom select the desired photos or folders (it's easier to do this using Folders) and drag them to the desired drive.
    Alternative if you will be moving lots of folders: Adobe Lightroom - Find moved or missing files and folders

  • Hi, I bought my iPhone in Canada but have moved to Australia. I need to speak with someone at Apple Canada what is the best way to do this? Is there is an e-mail address?

    Hi, I bought my iPhone in Canada but have moved to Australia. I need to speak with someone at Apple Canada what is the best way to do this? Is there is an e-mail address? When I call the Apple Canada number it says I can't call from my location.

    In what way did you buy your iPhone? If you paid full price at the Apple Store then your phone should be provider unlocked and should work with practically any SIM card you choose to insert in it. If you bought it cheaper with a contract then it's provider locked then your best bet is to call your cellular provider in Canada. Be sure to note your IMEI number (Settings > General > About) as they're going to need it to do an unlock. Be aware they may or may not charge for this.

  • TS1314 I have lots of organized photos on my PC and I want to keep them organized to sync to ipad.... how is the best way to do this?

    I have spent a lot of time saving, organizing and arranging photos (for the last 7 years) on my PC, and would like to know the best way to transfer these, AND MAINTAIN THE ORGANIZATION OF THE FOLDERS, to my new ipad (and later, my iphone). I have a really good system, and I do not want to have to do it all over again, on the ipad. I DO NOT want to subscribe to another monthly service fee (i.e. the iCloud) but DO have iTunes on my PC.
    What is the simplest method to do this ?  I have tried synching, but, each time have lost photos (on my ipad) OR have had NO ORGANIZATION AT ALL to the photos once synced.  I have all these photos (5.6gb) in the My Pictures folder, then subdivided into years, then subdivided into events and months within the years.  So, my transfer of the My Picures folder, completely transfers all of them, but with NO further organization.  Again, I have spent years doing this, and don't want to have to re-invent the wheel. 
    Can someone advise (or even better, lead me to a youtube video) that accurately shows the best way to do this ?
    Thank you, in advance, for your help.
    p.s.  I particularly enjoy Dan Nations very informative articles on how to get the best from my products.  And, wish Apple would explain "how it works" regarding the syncing methods on the Operating System.  It is the only thing I "don't get" about using my iPad..... meanwhile I LOVE my new mini ! ! ! ! ! ! ! thanks Apple, for keeping things simple.... Please don't change that !

    Correct, it will only be one-level, the Photos app doesn't support sub-albums - the sub-folders photos will be included in the parent's album.
    If you select My Pictures at the top of the Photos tab when syncing, then you should get an album for each folder that is directly under it - so if I understand correctly what you described then that would mean an album for 2013, one for 2012 etc. And each of those should include all the photos in the subfolders under it - so 2013 would include the photos from the events and months subfolders under it.
    You can't sync them separately, only the contents of the last sync remains on the iPad, by not including a folder in the next photo sync you are effectively telling iTunes that you no longer want that folder/album on the iPad so it will be removed and be replaced by the contents of the new sync (you can't delete synced photos directly on the iPad, instead they are deleted by not including them in the next sync).
    The app that I use, Photo Manager Pro, allows you to select and copy a folder (via FTP), but you would need to select each subfolder individually, which if you have a lot would be time-consuming (I think that if you select '2013' it would ignore the folders beneath it).

  • I want to upgrade my Imac from tiger 10.4.11 to Mac OS 10.6 Snow Leopard. What is the best way to do this.

    I have just purchased an iphone 4 and it needs me to have the latest itunes on my computer.  I have not upgraded by computer for some time and thought this is probably the time to do it. My computer is an imac intel with Tiger 10.4.11. I want to upgrade my Imac from tiger 10.4.11 to Mac OS 10.6 Snow Leopard or higher.  What is the best way to do this?  Appreciate any help as I am out of practice. I used to be an old hand at this, but things have moved on since I didn't upgrade or use my computer as much!

    Catherina wrote:
    ...  What is the best way to do this?
    The best way, really the only way, is to purchase Snow Leopard.
    Online (UK): http://store.apple.com/uk/product/MC573/mac-os-x-106-snow-leopard
    Elsewhere: call the phone number in the Apple Online Store.
    Apple's price is $19.99, £14.00, €18.
    Snow Leopard is not available to download from any legitimate source.
    Once you install Snow Leopard, upgrade iTunes to version 10.7 or the latest, iTunes 11.
    iTunes 10.6.3 is the last version of iTunes to support Mac computers with Mac OS X 10.5.8 with either Intel or PowerPC processors, but since you have an Intel iMac, the best solution is to purchase Snow Leopard. Leopard is no longer available from Apple and prices from aftermarket vendors can be unreasonably high.

  • Is this possible and the best way to approach this?

    hello all, back again with more questions
    What I would like to do is load an external swf (preloader) into a container swf, when the preloader swf is loaded, run code from the preloader's document class that will check to see if the container swf is fully loaded.  Once the container swf is fully loaded, load in another swf and unload the preloader swf.
    I would like to keep all code in external classes and off timelines while creating a situation where I can load this preloader swf into any parent swf and do that check.  is this possible and the best way to approach this?
    any advice/help would be great.

    Why not just do it the more straightforward/normal way and use the preloader to load your other files? The preloader would load the 'container' you have now, and when it's done load the other swf you mentioned.

  • What is the best way to do this? I am stuck!!

    I have a block with this, PLEASE help! I am writing a plsql package that is going to create a custom table everything is going fine EXCEPT that I don’t know what will be the best way to do this. Please point me in the right direction a function or something:
    I have three tables:
    My custom table SZSLIFE
    Two existing tables in my DATABASE:
    SGBSTDN,
    SLRRASG
    For this pidm (primary key). I have the following records in the SLRRASG table:
    SLRRASG_PIDM     SLRRASG_BLDG_CODE     SLRRASG_ROOM_NUMBER     SLRRASG_TERM_CODE     SLRRASG_RRCD_CODE     SLRRASG_BEGIN_DATE
    139203     ADD     103     200490     RCOM     09/02/2004
    139203     ADD     103     200510     RCOM     01/24/2005
    139203     BLA     001     200390     RCOM     09/03/2003
    139203     BLA     001     200410     RCOM     01/25/2004
    139203     HRK     101     200690     RCOM     08/31/2006
    139203     RIV     11     200590     RCOM     09/01/2005
    And I have the following records in the SGBSTDN table.
    SGBSTDN_PIDM     SGBSTDN_TERM_CODE_EFF     SGBSTDN_STST_CODE     SGBSTDN_LEVL_CODE     SGBSTDN_STYP_CODE     SGBSTDN_TERM_CODE_MATRIC
    139203     200390     AS     UG     C     200390
    139203     200410     AS     UG     C     200390
    139203     200590     DW     UG     C     200390
    139203     200610     IS     UG     C     200390
    139203     200660     AS     UG     C     200390
    139203     200690     AS     UG     E     200390
    139203     200710     IS     UG     C     200390
    So far I have been able to insert the following records in my custom table. This data is coming from the sgbstdn table
    SZSLIFE_PIDM     SZSLIFE_SLRRASG_TERM_CODE     SZSLIFE_STUDENT_STATUS_CODE     SZSLIFE_STUDENT_STATUS_DESC     SZSLIFE_STUDENT_TYPE_CODE     SZSLIFE_STUDENT_TYPE_DESC     SZSLIFE_STUDENT_LEVEL_CODE     SZSLIFE_STUDENT_LEVEL_DESC
    139203     200390     AS     Active     C     Continuing     UG     Undergraduate
    139203     200410     AS     Active     C     Continuing     UG     Undergraduate
    139203     200590     DW     Directed to Withdraw     C     Continuing     UG     Undergraduate
    139203     200610     IS     Inactive     C     Continuing     UG     Undergraduate
    139203     200660     AS     Active     C     Continuing     UG     Undergraduate
    139203     200690     AS     Active     E     Readmit/Re-entry     UG     Undergraduate
    139203     200710     IS     Inactive     C     Continuing     UG     Undergraduate
    NOW the question is: I need to insert the rows from the term 200490 and 200510 because there is data in the slrrasg table for those terms BUT the data that I need to insert is coming from the SGBSTDN table and there is not data for those terms in sgbstdn, so my user is telling my that it is okay to insert the previous term from sgbstdn for example: for the term 200490 I need to insert trhe 200490 in the szslife_slrrasg_term_code but I also need to insert the row from the 200390(previous one) from SGBSTDN.
    The same for 200510 insert 200510 in szslife_slrrasg_term_code but the rows from the term 200410 in SGBSTDN.
    Please give some ideas of how to do this. I will highly appreciate.

    Thank you very much for your answer, I have to confess that I am confused, never code this way. It looks very cool, I will like to learn this technique.
    This is what I have using my tables and my columns.
    What is the idea here? create a table 4 on the fly with all the coulmns that I need? This is what I have but I don't thing is going to work.
    2) do you need to have the same number of columns in the select like when you do a UNION?
    WITH tab1 AS
    (SELECT
    sgbstdn_term_code_eff,
    sgbstdn_term_code_eff,
    sgbstdn_stst_code,
    sgbstdn_styp_code,
    sgbstdn_levl_code,
    sgbstdn_resd_code
    FROM sgbstdn
    UNION ALL
    SELECT
    slrrasg_term_code,
    slrrasg_bldg_code ,
    slrrasg_room_number,
    slrrasg_rrcd_code ,
    slrrasg_begin_date ,
    slrrasg_end_date,
    slrrasg_ascd_code
    FROM SLRRASG
    UNION ALL
    SELECT
    szslife_slrrasg_term_code,
    szslife_student_status_code,
    szslife_student_type_code,
    szslife_student_level_code,
    szslife_student_level_desc,
    szslife_residency_code,
    szslife_building_code,
    szslife_room_number,
    szslife_assignment_begin_date,
    szslife_assignment_end_date,
    szslife_assignment_status
    FROM szslife
    UNION ALL
    SELECT NEW_TABLE ---QUESTION what I need to select here all the columns from table 1,2,3?
    tab2 AS
    (SELECT
    sgbstdn_term_code_eff,
    sgbstdn_term_code_eff,
    sgbstdn_stst_code,
    sgbstdn_styp_code,
    sgbstdn_levl_code,
    sgbstdn_resd_code
    FROM sgbstdn
    UNION ALL
    SELECT
    szslife_slrrasg_term_code,
    szslife_student_status_code,
    szslife_student_type_code,
    szslife_student_level_code,
    szslife_student_level_desc,
    szslife_residency_code,
    szslife_building_code,
    szslife_room_number,
    szslife_assignment_begin_date,
    szslife_assignment_end_date,
    szslife_assignment_status
    FROM szslife
    UNION ALL
    SELECT NVL(tab2.a,lag(tab1.a) over(ORDER BY tab1.a))
    FROM tab1, tab2
    WHERE tab1.a = tab2.a(+)
    I will apprecite your help, I did look in my books for a similar example but not luck.
    Rogelio

  • URGENT - Items archiving in Portal - Whats the best way to do this ?

    Gurus,
    My client has following requirement -
    - The client has lots and lots of content.
    - The content must show on site for 6 months.
    - After 6 months, the content goes to archives (meaning - it does not show on site, but that does NOT mean its deleted - its kind of hidden)
    - The archive content must be searchable
    - After 4 years some content expires while some of it remains in archive forever
    Currently, the client stores the content on a file system and there is a process that moves the items after 6 months to an archiving area and after 4 years some content is deleted and some is retained forever.
    What is the best way to approach this requirement ?
    If there is a solution how to move their existing system (content valid for 6 months and archives for last 4 yrs) to portal ?
    Any help would be greatly appreciated.
    Thanx
    Hero

    There are a couple of ways to do this:
    1. If the items are all file items and don't have extended attributes, you can just use WebDAV to move the items to an archive location (can be another page or a file system). Use a WebDAV command line utility like sitecopy, combined with the WWSBR_ALL_ITEMS view to select the content. sitecopy should be able to select items based on their last modified date, so you may not have to use the view.
    2. If you also want to archive the attributes, or if the items include non-file items, you'll need to use the content management APIs to copy the items to an archive page. Currently there is no delete API, so once you've copied the items you'll have to expire the originals and then manually purge them.
    Regards,
    Jerry
    PortalPM

  • Prepopulating PDF with XML best way to do this?

    Hi,
    I'm quite new to LiveCycle Forms and I was wondering if someone can help me with the following.
    First of all, I'm using LiveCycle Forms 7.2 and Designer 7.0. I have a couple of hundred PDFs (all differ from each other) created with the Designer and now I need to merge one XML to every one of these PDFs.
    My biggest wonder right now is the best way to do this. From the documentation I got the understanding that Forms can only merge XML and XDP files. Not XML and PDF. Am I correct?
    So do I need to get those two hundred forms saved in XDP, import the XML scheme to them and apply the scheme to match the fields in the form? This is done in the Designer? After that I could use PDFMerge in the Forms to merge the XML and XDP?
    Is this the best way to do this or are there some alternatives for this?
    I would really appreciate the help from you guys.

    on your bottom layer you should put your background and lock
    it. convert all your bubbles to movie clips. on your first frame in
    the top layer, put your first bubble. if you want to fade in, go to
    properties>color>alpha and set it to 0. then go in 5 or 10
    frames, make a keyframe, and set the alpha to 100. then tween it
    in. after a few frames, depending on how long you want to have the
    bubble visible, make a keyframe. then 5 or 10 frames later make
    another keyframe, set the alpha to 0 and tween it. if you want a
    wait period in between bubbles skip a few frames and make a new
    keyframe, or else just make a keyframe right where you are. then
    repeat the fade processes for the rest of the bubbles. for the last
    bubble, make a new layer on top of everything and lock it. this is
    your actions layer. on the frame in which the last bubble comes in
    to view, make a keyframe in your actions layer and put in a stop
    action: stop(); or just type Esc,S,T . congradulations, you have a
    comic with word bubbles! if you want characters, put them each in
    their own layer.
    i hope this helps.
    SadSpoon

  • I am trying to make a pdf of a file and I need to get the file size to be no bigger than 10MB. What is the best way to do this

    I am trying to make a pdf of a file and I need to get the file size to be no bigger than 10MB. Even when I save it, the image quality at minimum the file size is 10.9 MB. What is the best way to do this

    @Barbara – What purpose is that PDF for? Print? Web?
    If web purpose, you could convert CMYK images to sRGB. That would reduce the file size as well.
    A final resort to bring down file size is:
    1. Print to PostScript
    2. Distill to PDF
    That would bring file size down even more. About 20%, depending on the images and other contents you are using, compared with the Acrobat Pro method. If you like you could send me a personal message, so we could exchange mail addresses. I could test for you. Just provide the highres PDF without any downsampling and transparency intact. Best provide a PDF/X-4.
    I will place the PDF in InDesign, print to PostScript, distill to PDF.
    Uwe

  • HT1451 I need to move my library from my old computer to my new laptop. What's the best way to do this?

    I need to move my library from my old computer to my new laptop (Windows 8). What's the best way to do this?

    These are two possible approaches that will normally work to move an existing library to a new computer.
    Method 1
    Backup the library with this User Tip.
    Deauthorize the old computer if you no longer want to access protected content on it.
    Restore the backup to your new computer using the same tool used to back it up.
    Keep your backup up-to-date in future.
    Method 2
    Connect the two computers to the same network. Share your <User's Music> folder from the old computer and copy the entire iTunes library folder into the <User's Music> folder on the new one. Again, deauthorize the old computer if no longer required.
    Both methods should give the new computer a working clone of the library that was on the old one. As far as iTunes is concerned this is still the "home" library for your devices so you shouldn't have any issues with iTunes wanting to erase and reload.
    I'd recommend method 1 since it establishes an ongoing backup for your library.
    If you have an iOS device that syncs with contact & calendar data on your computer you should migrate this information too. If that isn't possible create a dummy entry of each type in your new profile and iTunes should offer to merge the existing data from the device into the computer, otherwise the danger is that it will wipe the information from the device.
    If your media folder has been split out from the main iTunes folder you may need to do some preparatory work to make it easier to move. See make a split library portable.
    Should you be in the unfortunate position where you are no longer able to access your original library, or a backup of it, then see Recover your iTunes library from your iPod or iOS device for advice on how to set up your devices with a new library with the maximum preservation of data. If you don't have any Apple devices then see HT2519 - Downloading past purchases from the App Store, iBookstore, and iTunes Store.
    tt2

  • I am moving from Southern California to Maui, Hawaii and I need to figure out the best way to get my 24 inch iMac across the ocean. Does anyone know the best way to do this?

    I am moving from Southern California to Maui, Hawaii and I need to figure out the best way to get my 24 inch iMac across the ocean. Does anyone know the best way to do this? I have found GearGrip's LCD harness so that I can do carry-on onto the plane...  Or maybe use a Pelican Case to do it as a "checked bag"? Or any other suggestions??! Please help!
    Thanks so much!!

    I don't recommend you send the iMac in a checked bag. Might get damaged.
    Check the airlines website for carry on guidelines.
    Or, if you have the original box that the iMac came in, if you have someone who can pick up the iMac for you, send it ahead Fed Ex and insure the package.
    Just make sure the display is covered to protect it. A blanket perhaps.
    Aloha ...

Maybe you are looking for

  • Edit_field - is it possible to force text to not wrap?

    Doc excerpts: from View attributes LrView text properties: width_in_chars : (Read-Only) Calculates the minimum width using this as the number of m characters that should fit. Considered together with width_in_digits. If height_in_lines is set to -1,

  • Cant sync from 2 diffrent computers (movies/games)

    I bought 2 games and 2 movies from my other laptop,then sync it to my ipod classic. but now when i try to load all my audio from my main computer it will ask me to either erase and sync or tranfer purchases. also said that this ipod is all ready has

  • A - B Repeat Function?

    Hi all, Is there any way of setting a start and end point in the timeline and have the playhead loop playback between these points? I have tried using in and out markers and selecting Loop Playback to no avail. It just carries on playing right past m

  • Uploading a site

    When uploading a website to the net, is there any way I can see it's progress in iweb '09? It would be a great help if there were a bar as in some other software. Is there a way to check what is happening? pattery

  • New report with Painter/Writer

    Need some reminder, since was using Painter/Writer long time ago... Standard project reports have an hierarchy window for navigation on the left hand side. Instead of that navigation I would like to have a project id listed in the first column with o