How to query the data using control item avoiding special characters

I had a small doubt in d2k.
i created a emp block
in that we r providing a control item for empno
i am using that control item for querying emp details based on that control item value.
if i am giving single quote in that control field it is querying for all the records in the emp block
i am providing the where clause like this
'empno like '||''''||:m_empno||''''
can u pls clear this doubt for me.
thanks in advance.

one thing i forgot to add.
we shouldnt use ascii values for the special characters.
means we shouldnt use ascii values for restricting the sspecial characters.
pls get me the reply as soon as possible
thanq

Similar Messages

  • How to insert the data using matrix

    Hi
      All how to insert the data using matrix feild
      plz help me
       thanks
        Loy

    Hi Loy,
    The best way to fill an entire matrix is to use a DBDatasource, here is some sample code:
    Dim oForm As SAPbouiCOM.Form
    oForm = SBO_App.Forms.Item("YourFormTypeID")
            '1. Add a DBDataSource to the form
            oForm.DataSources.DBDataSources.Add("OUSR")
            Dim oColumnDBS As SAPbouiCOM.Column
            Dim oColumnUDS As SAPbouiCOM.Column
            Dim i As Integer
            Dim GenEdt As SAPbouiCOM.EditText
            Dim oMatrix As SAPbouiCOM.Matrix
            Dim oColumns As SAPbouiCOM.Columns
            Dim oDBDataSource As SAPbouiCOM.DBDataSource
            oMatrix = oForm.Items.Item("7").Specific
            oColumns = oMatrix.Columns
            '2. DBDataSource: Binding a field / alias of the table to a column
            oColumnDBS = oColumns.Item("V_1")
            oColumnDBS.DataBind.SetBound(True, "OUSR", "U_NAME")
            '3. getting the data sources bound to the form
            oDBDataSource = oForm.DataSources.DBDataSources.Item("OUSR")
            oMatrix.Clear()
            ' Querying the DB Data source
            oDBDataSource.Query()
            ' Adding the data to the matrix
            oMatrix.LoadFromDataSource()
    When you want to fill a specific field use :
    GenEdt = oMatrix.Columns.Item("V_2").Cells.Item(1).Specific
                    GenEdt.String = "Hello"

  • How to increment the date using sequence?

    how to increment the date using sequence?
    01-jan-10
    02-jan-10
    30-jan-10

    794244 wrote:
    how to increment the date using sequence?
    01-jan-10
    02-jan-10
    30-jan-10This doesn't look like a task where a sequence is usefull.
    A sequence is a number generator that guarantees that multiple sessions will all get a different number.
    Even if the sequence is fetched for differnent users (=sessions) that the same time.
    This in turn means that the value returned by the sequence will depend on actions done in other sessions.
    Typical task: create a new unique primary key number. The number MUST be different in all sessions.
    In your case I guess that the same logic should work regardless of the session that executes it. So you need a "number generator" that works indepented from other session values. There are several ways to create such a numbered list.
    The basic idea is to create a select statement that simply returns as many rows as you need. And then use ROWNUM as the number generator. Examples how to do this have already been given. LEVEL works also in hierarchical queries.
    if my interpretation of your requirement is right, then all answers that really used a sequence seem to be wrong. Even if the output looks ok. At best they are just slow. To create new sequence values is a complex task and the database needs a little time for all the synchonization issues that come with it. At worst it will have gaps in the sequence because other sessions used the same value while the numbers were created.
    Edited by: Sven W. on Sep 20, 2010 2:08 PM

  • How to query the data for required service calls

    Hi Experts,
    I have one requirement in oracle
    I have one table with columns actvy_code, actvy_seq_id, date.
    Data is as follows                    400008    1234431     12/01/2013
                                                 400010    1234431     12/02/2013
                                                 400020    1234431     12/03/2013
                                                 400008    1234431     12/01/2013
                                                 400005    1234431     12/02/2013 etc...!!!
    actvy_id is also containing 5M7, 5M8, 6M6, 4M4, 4M5 some are existed in same date and other codes present with different date.
    Here I want to extract data based on the actvy_code column, say for example in scope I have some actvy_codes like 4M8, 4M5, 5M8 etc..
    when you do select * from table where actvy_code in (4M8, 4M5, 5M8) gives the out put as needed.
    But I want to know whether these codes are present with same date or not. How to do this.
    Please do me this favor..
    regards,
    Sahadeva.

    one thing i forgot to add.
    we shouldnt use ascii values for the special characters.
    means we shouldnt use ascii values for restricting the sspecial characters.
    pls get me the reply as soon as possible
    thanq

  • How to query the Date/Time Dataype

    Hi,
    I am trying to query the database with Data/Time Datatype.
    String date=request.getParameter("date");
    String month=request.getParameter("month");
    String year=request.getParameter("year");
    String tosearch=month+"/"+date+"/"+year;
    String getTable="select * from tableRes where dmy='"+tosearch+"'";I would like to know why it is not working?
    I ran through tomcat and it appeared this error:
    Data type mismatch in criteria expression.
    Thanks!

    pramudya81 wrote:
    Rock,
    May I know more detail on your specs?
    What is your DB? Or how is exactly you execute the sql.
    to_date is anyway an Oracle syntax.
    So I guess your DB might be an SQL Server.
    to_date for oracle is equivalent as Convert in SQL Server
    example Select Convert(datetime ,'2002/01/01')
    Hope it works nowBad idea. See reply 1.

  • How to insert the data using  SyncoBo Object

    Hi ,
        please provide the code for inserting the data such tat my meRepMeta.xml
    contains
                  one Top Row
                  4 Child Row
    i done the coding for inserting top row

    Hi Saravana,
        I am not sure about the query based on sync_key value but i am suggesting  the code snippet that you can use to get the SyncBo by the SyncBoName and SyncKey.
      public SyncBo getSyncBoInstance(String syncBoName, String syncKey) {
              SyncBoDescriptor sbd = descriptorFacade.getSyncBoDescriptor(syncBoName);
              try {
                   SyncBo sb = dataFacade.getSyncBo(sbd, syncKey);
                   return sb;
              } catch (PersistenceException pex) {
                   System.out.println(pex.getMessage());
                   return null;
              Based on the SyncBo value from the previous code snippet , you can obtain the rowCollection thru this method. 
    public RowCollection[] getRows()
                            throws PersistenceException
    Ex:
    sb.getRows()
    Once you obtain the RowCollection for the particular syncBo,you can iterate thru rowCollection to get the row entities.
    //To get the iterator of the Row entities in this RowCollection.
    MeIterator it = rowList.iterator();
    From each row entity you can get  the field values by this method
    public MeIterator getFieldValues()
    I would suggest you to go through the API Doc which is clearly explained about all the methods which would be useful for you to do all sort of operation.
    Regards,
    Rajan

  • How to pull the data using READ_TEXT

    Hi,
        I was trying to use the READ_TEXT function module to pull the data from the sales order, but i am not sure what are the values exactly i need to pass.
    ID
    LANGUAGE
    NAME
    OBJECT
    Since the above parameters are mandatory to get the text from sales order ... can you please suggest me. We are using customized screen ... if user enteres the data in the long text field in the customized screen - it should be updated in the sales order... how can i achieve... can any one suggest me
    regards
    jaya

    Hi,
    In that text TC --> come to change mode >menu goto->header.
    There you find all info.
    aRs

  • How to load the data using a plsql table in ODI.

    Hi All ,
    Can anyone help me on this ?
    We have a PLSQL procedure which returns a plsql table as out parameter.
    We are supposed to load the data in to a file using this plsql table (Table type) in ODI.
    Can this be done using ODI?
    Regards,
    Karthik+

    Hi,
    We have one process with a ref cursor (Oracle) as a source and remote Oracle DB as a target. I ended up writing my own KM that populates a global temporary table from the cursor first and then transfers the data to target. If temporary table is an option for you, the rest is pretty easy.
    Regards.

  • Need help in knowing how to debug the data using the data monitor

    Hi All,
      I am working on the BW3.X system,
    In my system instead of directly mapping the currency field in the update rule between DSO and the INFOCUBE, they have done it indirectly(I am unable to see that field getting mapped to any field), I want to know from which keyfigure it is fetching the currency unit.
    How can I know from which keyfigure this currency unit field is fetching the unit type.
    Please give me your valuable suggestion.
    Thanks with regards,
    vinay.
    Edited by: vinaykumarhs on Apr 7, 2010 12:31 PM
    Edited by: vinaykumarhs on Apr 7, 2010 12:32 PM

    yes, there are few fields for which unit calculations are being done through the routines, but there are still many for which it is directly mapped.
    UP to dso, we have changed from its loclal currency to group currency, but for my infocubes, few records are taking group currency and still many are taking local currency type only.

  • How to query XML data stored in a CLOB column

    I don't know XMLDB, so I have a dumb question about querying XML data which is saved as CLOB in a table.
    I have a table (OLAP_AW_PRC), with a CLOB column - AW_XML_TMPL_VAL
    This column contains this xml data - [click here|http://www.nasar.net/aw.xml]
    Now I want to query the data using the xml tags - like returning the name of AW. This is where I am having trouble, how to query the data from AW_XML_TMPL_VAL clob column.
    The following query generates error:
    ORA-31011: XML parsing failed.
    ORA-19202: Error occurred in XML processing
    LPX-00229: input source is empty
    SELECT
    extractValue(value(x), '/AW/LongName') as "AWNAME"
    from
    OLAP_AW_PRC,
    table(xmlsequence(extract (xmltype(AW_XML_TMPL_VAL), '/AWXML/AWXML.content/Create/ActiveObject/AW'))) x
    where
    extractValue(value(x) , '/AW/Name') = 'OMCR4'
    - Nasar

    Mark,
    Thanks. This is exactly what I was looking for.
    After doing @Name in both places (SELECT and WHERE clause) it worked.
    Now I have one more question.
    There are multiple DIMENSION tags in my xml, and I want to see the NAME attribute values for all of those DIMENSIONs. The following query returns
    ORA-19025: EXTRACTVALUE returns value of only one node.
    Cause: Given XPath points to more than one node.
    Action: Rewrite the query so that exactly one node is returned.
    SELECT
    extractValue(value(x), '/AW/@Name') as "AW",
    extractValue(value(x), '/AW/Dimension/@Name') as "DIMENSIONS"
    from
    OLAP_AW_PRC,
    table(xmlsequence(extract (xmltype(AW_XML_TMPL_VAL), '/AWXML/AWXML.content/Create/ActiveObject/AW'))) x
    where
    extractValue(value(x) , '/AW/@Name') = 'OMCR4'

  • How to load the data from informatica into bw & how to report the data

    Hi friends,
    how to load the data from informatica into bw & how to report the data
    using cognos.(i.e how to access the data in sap bw using cognos 8 BI suite).
    Thanks,
    madhu.

    Inorder to report BW data into Cognos you can extract data from using Open Hub to the DB table from which Cognos reads.
    For BW informatic integration refer following docs:
    http://www.aman.co.il/aman/pfd/DataInteg_BR.q103cd.pdf.pdf
    http://h71028.www7.hp.com/enterprise/cache/3889-0-0-225-121.html
    http://devnet.informatica.com/learning/ePresentations.asp
    http://72.14.203.104/search?q=cache:C741L86Q19oJ:devnet.informatica.com/showcase/resources/Essbase_DataSheet.pdfinformaticapowerconnect(BI)&hl=en&gl=in&ct=clnk&cd=3
    http://www.informatica.com/customers/utilities_energy/fpl_group.htm
    http://www.informatica.com/solutions/resource_center/technote_sapbw_65241004.pdf#search=%22Informatica%20to%20Bw%22

  • How to enter the data into data block text item which has an LOV associated

    Hi,
    I have a data block, one of the data block text item has an LOV assigned. when I populate this text item using the LOV and do "execute_query", it is taking the value in the text item and adding it to the search criteria, but when I enter a value manually in that text item and do "execute_query" it is showing me an alert(which I created) "Please enter a value".
    My question is, why is not taking the value that I enter manually? Looks like before executing the query, this field is getting empty
    How to avoid this problem and make sure that the value entered in the text item is added in the where clause of the query?
    Any advice?
    Thanks in advance
    R.G

    Problem solved!
    Before doing execute-query, all the text items are being cleared,so I used a global variable to store that value
    Thanks anyway
    R.G

  • How to read the data in spectrum analyzer (Anritsu MS2661C) and put it in Excel using Labview

    Hi all, I'm new to using the labview, and I have some trouble doing my project using the labview software.
    I have been trying to use the spectrum analyzer (Anritsu MS2661C) which connect to computer using the GPIB connection.
    I have got the instrument driver which can write and control the instrument using Labview 2010.
    and my Question is how do read the data or result from the spectrum analyzer and send it to the microsoft excel?
    Do I need to use other software or programming to do this step?
    If anyone know how is this done, please let me know.
    Regards,
    Ery

    Hi ery,
    In order to send data that you have read in from an instrument to Excel, the most convenient way to do this would be to use our Report Generation Toolkit.  The Report Generation Toolkit is a very useful tool that allows you to interface to Microsoft Office software from LabVIEW, including Word and Excel.  I am not sure if you are familiar with this, but I have attached a link that explains more about the Report Generation Toolkit below.  
    Another way would be to use the Write To Spreadsheet File VI.  While this will store your data to a spreadsheet data file, it will not allow you to programmatically perform any Excel formatting like the Report Generation Toolkit offers.  I have also attached a link to some information on the Write To Spreadsheet VI below.  
    Also, be sure to check out the Example Finder in LabVIEW for a number of examples on how to write data to a spreadsheet file.  From LabVIEW, you can go to Help»Find Examples to launch the Example Finder.  From there, you can search for "spreadsheet," which should populate examples for use in different applications.  I hope this helps, ery.  Please let me know if you have any further questions about these!
    NI LabVIEW Report Generation Toolkit for Microsoft Office
    Write To Spreadsheet File VI 
    Taylor G.
    Product Support Engineer
    National Instruments
    www.ni.com/support

  • How do i deduct dates using formatted search with a query

    Hi Experts,
    I would like to know how to get the date difference using query and formatted search. Below are the details:
    1. I have created 3 Header UDF's composed of 2  Date type fields and 1 Quantity field.
    2. The first one is for the Original Date, the next one is for the Payment Date and the Last one is for the No. of Days Lapsed.
    What I would like to do is automatically compute for the number of days from the original date to the payment date. What query syntax should i use to achieve this?
    Thanks,
    Yvette

    Hi Yvette,
    It should be something like;
    DATEDIFF (day, T0.[createDate], T0.[closeDate] ) as 'Aging'  This is just an example. You may add your udf's instead of dates.
    Thanks,
    Joseph
    Edited by: Joseph Antony on Jul 2, 2010 1:53 PM

  • Custom SharePoint 2010 designer page throws "The data source control failed to execute the insert command" exception while adding the new item after the August 13, 2013 CU has installed

    We have the SharePoint Server 2010 with SP1 environment on which the custom SP2010 designer pages were working as expected before the
    August 13, 2013 CU has installed. But, getting the below exception while trying to add the new item after the CU has installed.
    Error while executing web part: System.NullReferenceException: Object reference not set to an instance of an object.     at Microsoft.SharePoint.WebControls.SPDataSourceView.ExecuteInsert(IDictionary values)     at
    System.Web.UI.DataSourceView.Insert(IDictionary values, DataSourceViewOperationCallback callback) 3b64c3a0-48f3-4d4a-af54-d0a2fc4553cc
    06/19/2014 16:49:37.65  w3wp.exe (0x1240)                        0x1300 SharePoint Foundation        
     Runtime                        tkau Unexpected Microsoft.SharePoint.WebPartPages.DataFormWebPartException: The data source control
    failed to execute the insert command. 3b64c3a0-48f3-4d4a-af54-d0a2fc4553cc    at Microsoft.SharePoint.WebPartPages.DataFormWebPart.InsertCallback(Int32 affectedRecords, Exception ex)     at System.Web.UI.DataSourceView.Insert(IDictionary
    values, DataSourceViewOperationCallback callback)     at Microsoft.SharePoint.WebPartPages.DataFormWebPart.FlatCommit()     at Microsoft.SharePoint.WebPartPages.DataFormWebPart.HandleOnSave(Object sender, EventArgs e)    
    at Microsoft.SharePoint.WebPartPages.DataFormWebPart.RaisePostBackEvent(String eventArgument)     at System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument)     at System.Web.UI.Page.ProcessRequestMain(Boolean
    inclu... 3b64c3a0-48f3-4d4a-af54-d0a2fc4553cc
    06/19/2014 16:49:37.65* w3wp.exe (0x1240)                        0x1300 SharePoint Foundation        
     Runtime                        tkau Unexpected ...deStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 3b64c3a0-48f3-4d4a-af54-d0a2fc4553cc
    I have tried changing the "DataSourceMode" as below, now the insert command is working, but update command is not working.
    <SharePoint:SPDataSource runat="server" DataSourceMode="ListItem" />
    Also, the lookup dropdown fields are displaying the value as "<a href="Daughterhttp://cpsp10/sites/Employees/_layouts/listform.aspx?PageType=4&ListId={8F62F444-FB6A-4F03-9522-C4696B45DCD1}&ID=10&RootFolder=*">Daughter</a>"
    instead of only "Daughter".
    Please provide the solution to get rid of this issue.
    Thanks
    Ramasubbu

    Try below:
    http://social.technet.microsoft.com/Forums/en-US/ae910269-3a0c-4506-844b-e8bc89d95b71/data-source-control-failed-to-execute-the-insert-command
    http://blog.jussipalo.com/2012/01/sharepoint-2010-data-source-control.html
    While there can be many causes for this generic error message, in my case the first parameter or ddwrt:DataBind function inside the SharePoint:FormFields element was
    'i' and I was working with an Edit Form. Changing it to
    'u' as it was with every other FormField fixed the issue.
    <SharePoint:FormField runat="server" id="ff1{$Pos}" ControlMode="Edit" FieldName="Esittaja" __designer:bind="{ddwrt:DataBind('u',concat('ff1',$Pos),'Value','ValueChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@Esittaja')}"
    />
    Explanation:
    DataBind operation type parameters (the first parameter) are listed below:
    'i' stands for INSERT,
    'u' stands for UPDATE,
    'd' stands for DELETE.
    http://webcache.googleusercontent.com/search?q=cache:d9HHY4I7omgJ:thearkfloats.blogspot.com/2014/03/sharepoint-2010-data-source-control.html+&cd=4&hl=en&ct=clnk&gl=in
    If this helped you resolve your issue, please mark it Answered

Maybe you are looking for

  • How can i include a vi to help me save all the measurement from 10 to 100000

    hi, how can i include a vi that will store my data or save  them for each of the step increament , from the starting measurment 10hz to 10000000hz to the last. pls help good Attachments: saving vi.vi ‏53 KB

  • Problem in Edit  Locally

    Hi,      I can't able to work with "Edit Locally" in my text file in the Public document. Can any body tell me,If i want to do any setting or adding any role ?...for enabling the  "Edit Locally" option in my public document. Regards, Ravi.

  • Anyway of connecting a PCMCIA module to a NB100 netbook?

    Hi! I have a few PCMCIA expensive modules that I would like to use with my new netbook. For example, a TV decoder + video input that costed me about 100 Euro. The NB100 has no PCMCIA slot, of course. I wonder if I could get some type of adaptor from

  • Can't access tools in c4d lite

    Hi there, I am in c4d lite. After making an object and selecting polygon mode, I am tryingt o right click in the work area to access my tools (ie dissolve, brush, mirror, iron, knife etc.) The contextual menu that apprears is very bare. It has  four

  • Get all JNDI names - EJBLocalHome

    Hello, I've tried to get all JNDI names that are deployed on the J2EE Server RI Version 1.3.1. It worked fine with the JNDI names of the EJBs with Remote Client view (EJBHome), but did not work with EJBs with local Client View (EJBLocalHome). Does an