decode the simple question

I had a table called customer_issue_tab that has a column called 'IS_AUTH '.
If the value of 'IS_AUTH' is true then I should show the line else I need to check the State of the 'CUST_ORDER_TAB' and if the status = 'released' then display the line.

How can I put these in a select stmt using a DECODING function

code example would be ideal

Thank you

Parsh

Published by: [email protected] on July 6, 2009 09:28

Hello

The answer to "" How do I... using DECODE? ". is always "do not DECODE." If you have to ask, then it's too complicated.
CASE is the most common to DECODE alternative.

If you want to use the results in a WHERE clause, why not use the conditions in a WHERE clause, without DECODING?
Something like that, maybe:
{code}
WHERE is_auth = 'TRUE '.
THERE ARE (SELECT 1 OR)
OF cust_order_tab
Situation WHERE = 'product '.
AND order_no = customer_issue_tab.order_no
)
{code}
If you need help, post a small example of data and the results desired from these data.

Tags: Database

Similar Questions

  • The simple question is "where can I find the installer for the HP Quick start?

    The simple question is "where can I find the installer for the HP Quick start?

    BESR regards

    Hello:

    And here's one for W8...

    http://h20565.www2.HP.com/hpsc/SWD/public/detail?swItemId=ob_140915_1#tab1

  • Decode the simple query

    Decode the query
    Simplified version of the query below.

    SELECT
    d.REG,
    d.DP,
    c.CHANNEL
    Of
    CUSTOMER c,.
    ACCOUNT d
    WHERE c.ID = d.ID
    D.REG GROUP, d.DP, c.CHANNEL


    Channel field in the Customer Table contains several store ID (1 Store, tray 2, tray 3, store 4 etc.) - basically, I want to use decode on the channel field so that instead of all the store ID being issued what is fate of the channel are
    Store 1 = "big".
    Store 2 = 'average '.
    Store 3 = "Small".
    All other stores = 'other '.

    Where the decode to insert statement and what should be the format - attempt below
    DECODE (c.CHANNEL, "keep 1, 'Big', ' Store 2', 'Medium', 'Store' 3', small ', 'Other' ') of

    Hello

    This should be what you are looking for:

    SELECT   d.REG,
             d.DP,
             DECODE (c.CHANNEL, 'Store 1','Large', 'Store 2','Medium', 'Store 3','Small', 'Other') Channel
    FROM     CUSTOMER c,
             ACCOUNT d
    WHERE    c.ID = d.ID
    GROUP BY d.REG,
             d.DP,
             c.CHANNEL
    

    City where to move them in decoding...

  • Delete the Simple question table

    OK, so I promise you, I'm not a fool, but I could be lying at the monment.  I have a table, an orgenized good demisional, I need the unique elements.  I wrote an admitted that it is a little messy method to do such a thing, but it works logically for me for the most part.  The table currently has 69 items, and at the present time, there are only two unique values.  I could just listed them but that would mean I have to roll updates whenever a new brand comes out.  So now, when I run my program it will remove about half of the table and decides that he doesn't have to obey logic more and keep the rest.   I compied the segment of code that is the problem and registered as a VI for your pursoual and I wired in a copy the avictive table so that you can see what I mean. The code works wonders for 35 early iterations of the loop, and then something goes wrong terriably.

    Someone at - he a clue

    Mark R

    I would suggest just a much simpler way to do what you're trying to do.  Use of conditional indexation Tunnels.

  • Need help with the Simple Question of coding (substring or charAt())

    Hello

    I have what I believe to be a simple matter of coding I was hoping that someone could help answer. I know how to do a decent amount of things but I'm pretty new to Livecycle and trying to change one of our PDF files so that if a certain field has a number starting with number 6 a certain button will become visible. I already have a set of code which is to control the visibility of this button, but I wanted to add this clause. Can someone help me to do this?

    Here are the existing code:

    If ((QuestionsPage2.COIQuestions.COIYN.rawValue == "1" & &))

    QuestionsPage2.EmailButtons.NSFCheck.rawValue == '1') & &

    (QuestionsPage2.ManagerSignature.ManagerDate.rawValue! = null & &)

    QuestionsPage2.ManagerSignature.ManagerCheckBox.rawValue! = null & &

    QuestionsPage2.ManagerSignature.ManagerSignature.rawValue! (= null))

    {

    QuestionsPage2.PasswordSection.RiskPassword.presence = "visible";

    QuestionsPage2.PasswordSection.PurchUseOnly.presence = "visible";

    QuestionsPage2.PasswordSection.HRPassword.presence = "visible";

    QuestionsPage2.EmailButtons.EmailContractsAndRisk.presence = "visible";

    }

    I would like to add at the top to look at the specific area of the first character to see if it is a 6 or not. Here's what I tried to do, but it did not work.

    If ((QuestionsPage2.COIQuestions.COIYN.rawValue == "1" & &))

    QuestionsPage2.EmailButtons.NSFCheck.rawValue == '1' & &

    ContractInfo.AgreementDetails.Org.substring (0.1)! = '6' )

    The type of field, that I'm looking is a field "Digital field" 4 characters.

    Can someone help me fix my code to make it work?

    Thank you!!

    you don't need to make such a work autour, everything you did not notice, this is NumericField isn't a string is always a numeric (number)

    If you can use substring on a whole or decimal number... unless it's a chain... then use the toString() after the .rawValue like this

    ContractInfo.AgreementDetails.Org. rawValue.toString (). Substring (0.1)! = « 6 »

    It should work.

  • Decode the simple function

    Gurus,

    Please help me with a decoding function.

    doknlbc can be null or different bnuinfc in some occasions.

    Select dokkeyi, (doknlbc, null, 'no emp_id', bnuinfc) decoding as dok emp_id, bnu
    where doknlbc = bnunamc and dokkeyi in (6545,6525);


    Result
    EMP_ID DOKKEYI
    6545 70348

    Result, I want to!
    EMP_ID DOKKEYI
    6545 70348
    6525 no emp_id

    Thanks for the help!

    Try this:

    select dokkeyi, decode(doknlbc,null,'no emp_id',bnuinfc) as emp_id
    from dok, bnu
    where
         ( doknlbc = bnunamc  or
           doknlbc is null
         )
         and dokkeyi in (6545,6525);
    
  • Simple question... How do to add pictures on the body of my MAILS found 1000 results for how can I add photos to my Thunderbird emails

    How can simple question - I add photos to my mail body. But instead of the answer - found 1000 results for how can I add photos to my Thunderbird emails. There are answers that don't apply at all to the question anyway. Why must it be so difficult to get a simple answer to a simple question?

    Thunderbird is a bit like Microsoft, all the reasons as I dumped MS Live Mail.

    First, a lot of help for Thunderbird refers to the menus that may not be visible. It would be useful to you and us if you have your menus and toolbars visible.

    http://chrisramsden.vfast.co.UK/13_Menus_in_Thunderbird.html

    Then, open a window of writing. Activate the menu and operate.

    Now that you see an option "Insert"?

    If this isn't the case, you can assign composing in plain text, which does not support embedded images.

    Tools | Account settings| {Select account} | Composition & addressing and ensure "Compose messages in HTML format" are checked. If it is not already checked, go back to writing a message. No better now?

    Once you have the mode of composition HTML goes, you can use Insert | Image or various permutations of copy - paste and drag - move to the body of your message.

    A manual of sorts: http://en.flossmanuals.net/thunderbird/composing-messages/

  • MacBook Pro (retina, 15 inches, beginning 2013) El Capitan 10.11.3, Simple question here: I can't open FinalCut Express (4, I believe). The wheel turns for hours. How can I install/uninstall and will I lose all my old films (for the most part stored on ex

    MacBook Pro (retina, 15 inches, beginning 2013) El Capitan 10.11.3, Simple question here: I can't open FinalCut Express (4, I believe). The wheel turns for hours. How can I install/uninstall and will I lose all my old films (for the most part stored on external hard drives). Thanks for your suggestions.

    You will not lose anything, but the app if you uninstall. If you decide to uninstall use this app to make sure that all the other files which depends on FCE are also deleted however I can't give you any assurance as to whether you will be able to reinstall so that it works correctly. It is a software that has not been supported for almost 5 years and there are conflicting reports as to its compatibility with OS X 10.11. Can't I test it myself.

    Maybe someone else will chime in with their own experiences.

    Russ

  • Simple question about the signing of the app

    Hello.

    I develop libraries to be used in other apps.

    It will be a cod file, its name will be added to the jad as a dependency.

    My library has access to the secure API (call of the browser), so I have a simple question:

    can I register only my cod library or application that uses my library is expected to be signed in too?

    THX.

    You should be ok just signature cod of the library, if your application uses any API secure. However, I just make a habit to sign everything just in case.

  • simple question: is the f2280 a printer/scanner wireless?

    Simple question: is the f2280 a printer/scanner wireless?

    This widget could not be displayed.
  • Simple question - alternative text of the attribute in the same Word document

    Ok. I am having a brain freeze and cannot find the answer in the help of the OPA. Simple question.

    Is there a simple way to alias an attribute for use in Word?

    For example, the following two conclusions create 2 attributes where I want only 1 attribute.

    annual percentage rate = 6
    APR = annual percentage rate

    Is there a configuration option or something to alias APR as the rate of annual percentage for use in Word? I want to use in the same Word document. Something in my head tells me that I have seen that once before, but all of a sudden, I've got a brain freeze.

    Sorry for such a simple question, but sometimes I get too deep into the weeds.

    Hi Paul,.

    You may think the style of the legend of OPA. In the 2007 OPM Office Ribbon it's called legend of the table, but I think that it works with the rules of non-table in Word as well - it is certainly used to.

    It's a style of OPA rule which can be used when you want to refer to an abridged version of an attribute, for example "APR" rather than "the annual percentage rate. According to me, that it applies only to the immediately lower rule where it has been defined in the doc and the doc not complete.

    I did a quick search in the help of the OPM and found references to the style of legend, but I have not found a description of the functionality (search is not too good if).

    Essentially how it works...

    Above the rule to write the version abridged, then the word "is", then the text of the full attribute, for example

    APR is the annual percentage rate
    

    Side note: I have always "BOLD" the "is" in the callout line. It is not necessary, but I want to do it because it makes it more clear at a glance what part is the shorthand and which part is the text of the full attribute.

    Then apply the style of the legend of the table to the line, then put your Word table or the ordinary rule underneath, for example

    [legend]APR is the annual percentage rate
    
    the result = APR * 10 
    

    I use this feature occasionally. Usually it is when I have calculations in Word tables and I'm trying to make the more readable left column, for example using something "APR" in the formula so that it does not take much space.

    See you soon,.
    Jasmine

  • I have a simple question about the meta-data.

    Hello. It is a simple question about the meta-data. How can I get the video bitrate of a flv or mp4 (video playing via NetStream file) file

    right now I have this:

    Code
    var netClient:Object = new Object();
    netClient.onMetaData = function(meta:Object)
    {
    for (var in meta props) {}
    trace (props + ":" + meta [props]);
    }
    MovieClip (root) .durations = meta.duration;
    trace (MovieClip (root) .durations);
    };
    NS.client = netClient;

    And my output is:

    videocodecid: avc1
    audiocodecid: m4as
    aacaot: 2
    Width: 960
    AudioChannels: 2
    videoframerate: 23.976
    TrackInfo: [object Object], [object Object]
    moovposition: 32
    avcprofile: 77
    audiosamplerate: 48000
    avclevel: 31
    seekpoints: [object Object], [object Object], [object Object], [object Object]
    height: 540
    Duration: 221.312

    As you can see, there is nothing of video bitrate.

    I know that the video bitrate of my videos, but then I have to manually type each number of bitrate into my flash project, and it would be such a fuss when I have a lot of videos. Would be nice if flash can detect the video bitrate.

    It's for my online portfolio.

    Why you divide by 8?  If you want to convert bytes into bits, multiply by 8.

  • Simple question on the passage of ID variables in a url after you add a new record

    Hello;
    I know it's a simple question, I have a brain block. I'm going from a form and insert a new record in the db, but after I insert the new record, I want to pass the ID variable that gets are entrusted to him. How can I do this?

    It's my code to insert:

    < cfset EventDate = "#DateFormat(form.eventDate,"mm/dd/yyyy") #" >
    < datasource = "" #APPLICATION.dataSource # cfquery "dbtype ="ODBC">"
    INSERT INTO events
    (title, eventDate, eventTime, location, contact, telephone, fax, email, URL, sponsor, body)
    VALUES (< cfqueryparam cfsqltype = "cf_sql_varchar" value = "#form.title #" >,)
    < cfqueryparam cfsqltype = 'cf_sql_date' value = "" #EventDate # ">,"
    < cfqueryparam cfsqltype = "cf_sql_time" value = "#form.eventTime #" >.
    < cfqueryparam cfsqltype = "cf_sql_varchar" value = "#form.location #" >.
    < cfqueryparam cfsqltype = "cf_sql_varchar" value = "#form.contact #" >.
    < cfqueryparam cfsqltype = "cf_sql_varchar" value = "#form.phone #" >.
    < cfqueryparam cfsqltype = "cf_sql_varchar" value = "#form.fax #" >.
    < cfqueryparam cfsqltype = "cf_sql_varchar" value = "#form.email #" >.
    < cfqueryparam cfsqltype = "cf_sql_varchar" value = "#form. "URL #" >.
    < cfqueryparam cfsqltype = "cf_sql_varchar" value = "#form.sponsor #" >.
    < cfqueryparam cfsqltype = "cf_sql_longvarchar" value = "#form.body #">) "
    < / cfquery >
    < cflocation url = "events_RecordView.cfm" >

    In the cflocation I want to pass the variable ID, how about a new record?

    Thank you.

    CFmonger

    Try this. This will select in the query exactly what was inserted just enter the id and pass id just to get in the variable. If two people fill out the form at the same exact time, that assure that they are redirected to the appropriate page.

  • Can simple Question - I do the colors change in tabular form

    Can simple Question - I do the colors change in tabular form.
    How can I change the colors, green, white alternating on tables?

    Doug,

    Here's some javascript that I use for tables/reports of Ray...
    Don't forget to replace "t15" with your model references.

    
    
    
    
    Also, if you go edit the report template > Column Templates > Column Template 1 > You can set the condition to even/odd rows and then add in your own html/css..
    
    
    #COLUMN_VALUE#
    
     -Chris
    
  • maybe simple question of string of the variable in the pop up window

    Hello

    I write a name who helped me in the previous question, but now the list is great and sorry, no nicks personal

    Hi all

    We have a chain

    scany_col value {{15677, 5654, 7453}, {37008, 19532 17733}, {32896, 15163 14906}, {15934, 6939, 9509}, {16705, 6682, 9252}, {38293, 39064, 40092}, {19532, 6939, 8224}, {65535, 65535 65535}, {17219, 6425, 8738}, {24158, 9509, 11051}, {14392, 5911, 8481}, {22873, 16448, 16191}, {30840, 14649, 14649}, {29041, 16191, 15934}, {12593, 5397, 8224}}

    -(this is a RGB pixels)

    Choose from the list of the scany_col with the title "what color to the first position.

    the value of result listreturn

    listreturn

    ... one one-and this script returns an error "blah - blah with chain of cant.

    Tell me please, what is the problem?

    The sublists themselves aren't of strings and numbers.

    If you wish to choose from the sublists, replace the choice of the list command with:

    Choose from list (point 1 of scany_col) with the title "what color to the first position.

    If you want to choose a specific sub-list on all of them:

    scany_col value {{15677, 5654, 7453}, {37008, 19532 17733}, {32896, 15163 14906}, {15934, 6939, 9509}, {16705, 6682, 9252}, {38293, 39064, 40092}, {19532, 6939, 8224}, {65535, 65535 65535}, {17219, 6425, 8738}, {24158, 9509, 11051}, {14392, 5911, 8481}, {22873, 16448, 16191}, {30840, 14649, 14649}, {29041, 16191, 15934}, {12593, 5397, 8224}}

    Set scany_strings to {}

    Repeat with this_item in scany_col

    the value scany_strings scany_strings & ((article 1 de la this_item as string) & "," & (article 2 of the this_item as string) & "," & (point 3 of this_item as string))

    end repeat

    Choose from the list of scany_strings with the title "what color to the first position.

    listreturn Set result

    listreturn

    (143331)

Maybe you are looking for