Add the parameter to hardcoded string to decode function

I have a query something like this:

Select...
..............
decode ((select bill_sequence_id
of bom_structures_b one
where a.assembly_item_id = POL. ITEM_ID
and a.organization_id = FSP.INVENTORY_ORGANIZATION_ID
and a.alternate_bom_designator is null
and msi.bom_enabled_flag = 'Y'
), null, null, 'test_url | a.bill_sequence_id) "Destination".
Of...
where the...

I want to add the value of the column that I looked at the end of "test_url.
If I decode (..., null, null, 'test_url' | 222222222) it worked, but when I give bill_sequence_id or a.bill_sequence_id, he cries for invalid identifier.

Please help.
Thank you

Hello

Let me make sure I understand the problem.
You want to return a value like

'Today is = ' || x

where x is a complex expression. But if x is NULL, you don't want to not return 'is now', you want to return null.
What is the problem?

Here's how you can do this without repeating x:

NULLIF ( 'Today is = ' || x
       , 'Today is = '
       )

A more general solution is to calculate the value in a subquery. In the Super request, you can see him as often you simply by using the alias that you gave in the subquery, like this:

WITH    got_inner_select     AS
(
     select a.dummy,
            (  select  b.dummy
                   from       dual       b
            where       a.dummy = b.dummy
            )  AS inner_select
     from   dual  a
)
SELECT     dummy
     DECODE ( inner_select
            , null     , null
                       , 'Today is = ' || inner_select
           )
FROM     got_inner_select
;

Tags: Database

Similar Questions

  • Why ColdFusion adds the backslashes to my string concatenated?

    Well, serializeJSON isn't enough create JSON for me to use with jQuery.

    So I decided to build it myself.

    Here is my code:

    <cffunction name="getActions" output="false" access="remote" returnformat="JSON">
        <cfquery name="Actions">
          SELECT * FROM Actions
        </cfquery>
        <cfset ActionsList = '{"success" : "true"}, {"Actions" : ['>
        <cfloop query="Actions">
          <cfset ActionsList = ActionsList & '{ "ID" : "' & ID & '", "Name" : "' & Name & '"},'>
        </cfloop>
        <cfset ActionsList = ActionsList & ']}'>
        <cfreturn ActionsList>
      </cffunction>
    

    So basically I send an asynchronous call AJAX with jQuery to the cfc that contains this code.

    jQuery told me that the JSON was bad.

    So I pulled out what Coldfusion has been sending to the browser.

    "{\"success\":\"true\"},{\"Actions\":[{\"ID\":\"1\",\"Name\":\"View Public\"},{\"ID\":\"2\",\"Name\":\"View Full\"},{\"ID\":\"3\",\"Name\":\"Create Page\"},
    {\"ID\":\"4\",\"Name\":\"Create Part\"},{\"ID\":\"5\",\"Name\":\"Create Section\"},{\"ID\":\"6\",\"Name\":\"Create Question\"},{\"ID\":\"7\",\"Name\":\"Create Table\"},
    {\"ID\":\"8\",\"Name\":\"Assign Pages to Location\"},{\"ID\":\"9\",\"Name\":\"Input Data\"},{\"ID\":\"10\",\"Name\":\"Edit Page\"},{\"ID\":\"11\",\"Name\":\"Edit Part\"},
    {\"ID\":\"12\",\"Name\":\"Edit Section\"},{\"ID\":\"13\",\"Name\":\"Edit Question\"},{\"ID\":\"14\",\"Name\":\"Edit Table\"},
    {\"ID\":\"15\",\"Name\":\"Assign Pages to Location Type\"},{\"ID\":\"16\",\"Name\":\"Add Location\"},{\"ID\":\"17\",\"Name\":\"Add Location Type\"},
    {\"ID\":\"18\",\"Name\":\"Change Location\"},{\"ID\":\"19\",\"Name\":\"Assign Location Designee\"},{\"ID\":\"20\",\"Name\":\"Assign District Designee\"},
    {\"ID\":\"21\",\"Name\":\"Update User Information\"},{\"ID\":\"22\",\"Name\":\"Add User Type\"},{\"ID\":\"23\",\"Name\":\"Manage Permissions\"},]}\""
    

    Why coldfusion adds a bar backslash before each quotation mark?

    I built the exact way of sam JSON in another function, and it worked fine.

    The only difference between this function and this one is that it has a loop.

    I've been at this for hours... what Miss me?

    and replace(ActionsList,"\","","ALL")

    does not help...

    You're not perform a JSStringFormat() on that anywhere, are you?  (maybe in the code not released).  JSStringFormat() assumes that the text passed to it is a literal string, and then he escaped values in quotes (as we see here)

    In addition, on either said by the way, your JSON data is not valid, no?

    Your loop will update the list of actions with a table, but it always takes into account there is another index of values, so it did precede the comma.  {[{You can even see in the final version of your data table ends with a '...},]}' you may need to make a conditional test to see if the loop is at its max index and if not, then add the comma.

  • BPM Studio 11.1.1.7.0, I only then add the parameter of human task in the dialog box create a human task?

    The data object dialog box that is displayed when I select a plus sign (+) for the parameter indicates the title to browse the data instead of the data object object. Therefore, I'm unable to drag and drop the data for the parameter object. -What did I do wrong?

    Thanks for your help.

    Sam

    Ramesh,

    I don't have a solution to this problem. All the documentation I've read sugggest that describes the steps that should work; but it does not work for me. I am very frustrated at this topic.

    I think the Oracle BMP is a good thing. So if you find a solution, please let me know.

    Thank you.

    Sam

  • How to add the parameter/event on a portletized app and how to access?

    Hello

    I have a simple JSF page that retrieves data by using data control. Here are the steps I did

    1 create a WebCenter application
    2 set the control data for the service URL
    3. slide DC page as a parameter
    4 create the entry Portlet to convert page Portlet
    5. manually change oracle - portlet.xml to set the parameters of navigation under the tag < portlet-extension >

    What I want to do is the value of the control of the parameter of navigation data entry, so I can remove the button from the form. Is this possible? What I need to change anything else?

    All opinions are appreciated.

    I use Jdev 11 g

    Thank you!
    Rian

    Rian,

    I did a portlet from the sample of producers that shows these techniques: http://www.yonaweb.be/DCParameters.zip
    When you want to build portlets and not an ADF application, you must use the request of the Portlet producer instead of a Webcenter application or a web application from merger and turn your JSPX page in a portlet.
    The reason why you can't find the PortletRequest is because by default portlet libraries are not added to your application. When you use the Portlet producing, these libraries are properly added.
    The application project, I downloaded, is the production of portlet application. You should be able to deploy in your internal weblogic server and register the producer of your application.

    Some information on what I did:

    (1) create the portlet. You can find information about the portlet in the portlet.xml in the WEB - INF folder
    (2) create the user class in the package model. It's just a class that I created to have some data.
    (3) create the UserDC class. This class will have a method that takes 2 parameters. This class will be transformed into a datacontrol by right-click on it and click 'Create DataControl'
    (4) create the bean managed by opening the faces-config in the WEB folder - INF. press the plus sign in the section bean managed and enter data.
    My managed bean is the UserBean in beans package
    (5) write the code for the managed bean. You'll see that 2 methods in the bean. One to get the name and the other for the lastname parameter
    (6) in the data section press controls refresh so the data controls are updated and you should see "UserDC".
    (7) open view.jspx DCPortlet/html
    (8) slide collection user to the datacontrol to the page and select the Table-table ADF online read-only
    9) press ok
    (10) in the context menu for the DC method parameters enter #{UserBean.lastnameParameter} and #{UserBean.firstnameParameter}.

    That's what I did to create the portlet.
    If you have any questions or something is not clear, just ask.

  • Add the parameter value total page

    Hello
    I want to add a parameter of total pages value, possible? Thanks in advance.

    You can't do that.

  • Add the description of an xml file to the loaded image to full size

    Hi all

    I need a little help with the Gallery picture below please.

    I have a photo gallery that loads some thumbnail in via xml and AS3 support. When you click on the thumbnail, it loads the image full size in a charger.

    How can I add a description of the xml to the image full size.

    Thank you in advance for your time and effort to help me with this.

    I'm still learning a lot about AS3 and xml so your help is most appreciated people.

    It's my xml

    <?xml version="1.0" encoding="UTF-8"?>
    
    <menu>
    
        <items>
    
            <item>
    
                <url>thumb/1.jpg</url>
    
                <linkTo>fullsize\1.jpg</linkTo>
    
                <des>text I would like to appear in full image 1</des>
    
            </item>
    
            <item>
    
                <url>thumb/2.jpg</url>
    
                <linkTo>fullsize\2.jpg</linkTo>
    
                des>text I would like to appear in full image 2</des>
    
            </item>
    
            <item>
    
                <url>thumb/3.jpg</url>
    
                <linkTo>fullsize\3.jpg</linkTo>
    
                des>text I would like to appear in full image 3</des>
    
            </item>
    
            <item>
    
                <url>thumbs\4.jpg</url>
    
                <linkTo>fullsize\4.jpg</linkTo>
    
                des>text I would like to appear in full image 4</des>
    
            </item>
    
            <item>
    
                <url>thumbs\5.jpg</url>
    
                <linkTo>fullsize\5.jpg</linkTo>
    
                des>text I would like to appear in full image 5</des>
    
            </item>
    
        </items>
    
    </menu>
    

    It's my as3, I tried to take as much code that is not required in this example.

    var xmlPath:String = "pictures.xml";
    var xml:XML;
    
    var loader = new URLLoader();
    loader.load(new URLRequest(xmlPath));
    loader.addEventListener(Event.COMPLETE, xmlLoaded);
    
    function xmlLoaded(e:Event):void
    {
    
         
         if ((e.target as URLLoader) != null )
         {
              xml = new XML(loader.data);
              createMenu();
         }
    }
    
    var numberOfItems:uint = 0;
    var menuItems:Array = new Array();
    
    function createMenu():void
    {
              numberOfItems = xml.items.item.length();
    
         var count:uint = 0;
    
              for each (var item:XML in xml.items.item)
         {
    
              var imageLoader=new Loader();
              var menuItem:MenuItem = new MenuItem();
    
              menuItem.addChild(imageLoader);
              
              imageLoader.load(new URLRequest(item.url));
              
              menuItem.linkTo = item.linkTo;
              menuItem.mouseChildren = false;
              menuItem.addEventListener(MouseEvent.CLICK, itemClicked);
              menuItems.push(menuItem);
              
              addChild(menuItem);
              
              count++;
         }
         ***();
    }
    
    function ***():void
    {
         //menuItems.sortOn("zpos3D", Array.NUMERIC | Array.DESCENDING);
         for (var i:uint = 0; i < menuItems.length; i++)
         {
              setChildIndex(menuItems[i], i);
         }
    }
    
    //**************************************loader for large images*************************************
    
    var loader_mc : Loader = new Loader();//loader_mc var for below itemClicked function
    
    //This function is called when a thumb is clicked
    function itemClicked(e:Event):void
    {
         var urlRequest:URLRequest = new URLRequest(e.target.linkTo);//Navigate to the URL that's assigned to the menuItem
         loader_mc.load(urlRequest);//adds the urlRequest to our loader_mc ;
    }
    
    //calling "contentLoaded" function if loading is over;
    loader_mc.contentLoaderInfo.addEventListener(Event.COMPLETE, contentLoaded);
    
    function contentLoaded(e:Event):void
    {
         addChild(loader_mc);//adds loader_mc to the stage     
    }
    

    No, you have some already loaded in your menuItem objects with the "menuItem.des = item.des;" line of code... which means this object contains the text of actual description right here.  If you just need to assign to the textfield object that you want to use to display the description.  In my example I named it 'someTextField', but you can name but you want.  Read my other answer about which you assign this value to the TextField.

  • How to jump 3 characters when use "scanf chain" by the parameter "format string"?

    Hi, I want to read a number 123 in the chain like that 'sfg123' 'fgd123' 'ghj123 '.

    I know that I can use 3 '%s' to jump 3 characters, but it will add an output to 'scanf string.

    So, how use "format parameter string ' not only to jump 3 characters, but also add no output to"string scanf.

    Hi Chenyin,

    Try this VI...

    I think so... That's what you expect...

    >

  • flatten channel adds the length of the string

    Hi all

    I flatten a cluster chain help to flatten to string.vi. The cluster contains strings and arrays. The flattened string contains the length of the string that is appended to the string.

    So if I have a cluster with only 1 string and a value = "LabVIEW". the flattened string would be "0007LabVIEW". Flatten channel vi has a Boolean entry "add string or array of size? even if I set the Boolean value false, it always adds the length of the string. Is this a bug?

    I think that if you read the detailed help to flatten it to string function you will see this is not a bug.  That boolean applies only to top-level data, once put you something in a cluster or array, the Paris are open.

  • How to add the phase parameter to array of waveform in the DaQmx continuous output example?

    Hi all

    I'm quite beginning to Labview. I just wanted to know how can I add stage information for the module of waveform existing as shown in the example of output Voltage-Continuous DaQmx.

    SEEE attached, I thought that the "output" is actually a built-in control, is there anyway I can add the phase as an additional parameter which?

    Thanks in advance for any help.

    Eric

    If you press ctrl + H, the context help window opens, and you can hover over the generating function VI to see its inputs/outputs, but also to navigate to the detailed help. As you can see from this screenshot, there is an exit for the phase which is separated from the output waveform.

  • Change the parameter [] strings in a sub - bound dynamically VI

    I'm in a situation where I need to use the sub-panels to dynamically bind subVIs for data entry. I also like having the calling VI to change the [] parameter strings several enumerations in the Subvi, but this doesn't seem to be possible, as the Subvi is not in edit mode. Does anyone know of a way around this?

    I read data from a file to initialize the enums, so that I can have the Sub - VI read the file instead, but I was hoping to do it once in the main VI and send strings to the subVIs to speed up execution.

    Thank you!

    derekemuff wrote:

    I read data from a file to initialize the enums, so that I can have the Sub - VI read the file instead, but I was hoping to do it once in the main VI and send strings to the subVIs to speed up execution.

    It's impossible.  Enums are set in stone at run time.  Oh wait, you try to use the script running.  Sorry, it does not work.  Note that the property for the [Strings] node for the enum is blue?  That tells you it is a script node and is useful for mounting screws over time edit.

    As RavensFan said, you use a ring.  Their data type is a real number.

  • Cannot add the vmkernel nic: a specified parameter was not correct. vSphere CLI + ESXi 4

    Hello. I try to add vmknic with frames in my distributed virtual switch.

    I read the vSphere command-line Interface Installation and reference Guideguide:

    "vicfg-vmknic - a-i DHCP"vmk5"

    I see the error message:

    Cannot add the vmkernel nic: a specified parameter was not correct.

    Vim.Host.VirtualNic.Specification.Ip

    What's wrong?

    I tried all the combinations of parameters with the same result.

    Ok! I've found a workaround.

    Since adding a vmkernel remote interface doesn't seem to work with DVS, I simply created one on a standard vSwitch and it then migrated to the DVS. And voila: the value 9000 MTU migrated intact with her! Here are the steps I followed:

    1. put the ESX host into maintenance mode - evacuate VMs manually if necessary

    2 remove the VMKernel iSCSI/NFS to the DVS interface

    3. create a standard virtual switch with no physical cards. He has no need to be a VMKernel VM Networking switch is fine. Make a note of the name you gave to the PortGroup created on the new vSwitch.

    4 using the remote control line, add the new interface vkernel specifying an appropriate jumbo MTU (9000) and the PortGroup on the standard new vSwitch. For example:

    esxcfg - vmknic.pl - Server

    If you get 3 answers, everything works. If you get failures, something has gone wrong. Go back and check that the interface is configured correctly using the command list esxcfg - vmknic.pl-.

    Enjoy!

    M

  • error when the type of the parameter is the string

    I want to create a task, and the procedure has a parameter type is string. It get the error ORA-06550 and PLS-00103.


    BEGIN
    DBMS_SCHEDULER. () CREATE_JOB

    job_name = > 'JOB_TEST ',.

    job_type = > 'procedure_stockee ',.

    job_action = > ' SH. PKG_TEST. SP_TEST (seq_batchid.nextval, 'SYSTEM', extract (year sysdate), extract (month of sysdate))'.

    = start_date > to_date (18 February 2012 04:00 ',' dd-mm-yyyy hh24:mi:ss'),
    activated = > false,

    "repeat_interval = > ' FREQ = daily"


    );

    END;
    /

    Hello

    You use the type of work badly, your job type should be plsql_block, that is

    job_type-online "PLSQL_BLOCK."

    If you are using a type of employment procedure_stockee the job_action may contain the name of the stored procedure without arguments.

    -Nice

  • Add the string '&amp; lang = en '.

    I would like to add the string '& lang = en' to the path variable.

    < cfset newpath = path & "& lang = en" > ".

    < cfoutput > #newpath # < / cfoutput >

    The output is

    index.cfm < = en

    but not the desired output

    index.cfm & lang = en

    Help, please.

    There is a good chance that the exit IS 'index.cfm & lang = en', but your browser is to choose of does not display it like that.

    View the page source to confirm this.

    Short strings like the one that begins with an ampersand symbol (and) are often considered a character encoding on browsers.

    Alternatively, you can force the browser to display the string in the way desired with functions htmlCodeFormat() or htmlEditFormat().  Which, oddly enough, must be able to encode special characters such as the ampersand.

    I.E.

    #htmlEditFormat (newPath) #.

  • Add the new procedure parameter

    Hi friends I have a procedure that have 3 in parameter and I use this procedure in the lots of the procedure. but I need to add additional properties to this procedure, so I have to add new parameter to this procedure. My problem when I add this many procedure parameter gives an error because of this new setting. We can do smthg to do this?
    Thank you

    Hello

    Name your new parameter a default value:

    create or replace procedure some_proc
    (p1 in numbers
    p2 number
    p3 number
    p4 to default number 0
    )
    as
    Start
    -etc.

  • How to add new Controlfile to the parameter CONTROL_FILES

    Hello

    I do exercise 14 in the workshop of Admintsrators 1. The job is to create a new controlfile copy an existing one and rename it to CONTROL04. CTL. Parameter CONTROL_FILES comes to be edited. The script says I close the instance and starts it in nomount mode - I did. But I'm not able to add a new path to the parameter. I may need a few drinks? Thanks for help.
    Ciao
    Torsten

    1. check the location of the controlfile to Db, to help see the parameter control_files

    2. create pfile from spfile. -default location will be ORACLE_HOME/database

    3. shutdown the database.

    4. move/copy the controlfile existing to a new location, and then edit the newly created file pfile with the new location of the controlfile. Change the location of control_files to the new.

    5 startup pfile = 'pfile_location;

Maybe you are looking for

  • Satellite A300-15B - 300 SATA-Compatible?

    Hi allI only run Kubuntu (64 bit) for the moment on my machine, but I would add an extra internal hard drive, so to reinstall Vista. My questions are:1. If there is no problem with the extra hard drive, (the beach is empty then why not add a few outs

  • I want to erase all content on the computer I have dell with windows xp

    Bought a new computer, to reset my LDP to give to a family, but I want to clear all of my content. Thank you

  • Unable to download Dell Systems Build and Update Utility

    power edge r710 and I have legacy systems build 6.4 no support of the victory of 2012 Since yesterday I try to upload one of these 2 and I always have internet error please try again later How can I download and what is best for my server. http://www

  • Fill in the expiry date field when a digital signature.

    I try to get a text field to automatically populate when the form is digitally signed. The field is an expiration date which must show the date of 10 years less one day from the time of the signature. For example, if the form has been signed today th

  • Logical query help

    Oracle 11g Release 2Frank Kulash was able to help on this issue yesterday. But I got additional requirements. Details below.CASE 1: create table t(key primary id number,)supplier_id number,number of supplier_desc_idbatch number,date of dt_recv)/Inser