Sequence.nextval doubles the returned value with Execute Statement (F9)

There appears to be a quirk with sequences in Raptor.
Has anyone noticed that depending on how you execute this sql (SELECT MYSEQ.NEXTVAL FROM DUAL;) the value returned is either the correct nextval or double what you expected?
For example, MYSEQ is a simple sequence which increments by 1. If you Execute Statement (F9) then the value returned jumps by 2 instead of 1. If you Run Script (F5) then the value returns jumps by 1, as expected.
If MYSEQ is changed to increment by 2. The when you Execute Statement (F9) then the value returned jumps by 4 instead of 2. If you Run Script (F5) then the value returns jumps by 2, as expected. No matter what you put for the increment by Execute Statement (F9) always doubles it.
It always seems to be double. Executing the same scenario in TOAD always returns the correct value (i.e. properly increments).
Is the query being executed multiple times with Execute Statement? Why is this happening?

While there is no guarantee from Oracle that sequences produce sequential numbers, this is obviously a case where SQL Developer is running the select statement twice.
The issue is that queries can actually change information, rather than just retrieve data from the database.
The following package is a test case:
create or replace package test_query is
function get_next_count return number;
end;
create or replace package body test_query is
cnt number := 0;
function get_next_count return number is
begin
cnt := cnt + 1;
return cnt;
end;
end;
select test_query.get_next_count from dual;
This query, which should return 1, 2, 3, 4, etc actually returns 2, 4, 6, 8, etc, because SQL Developer is running the select twice.

Similar Messages

  • Problem with the return value from a tablemodel after filtering

    I have a form (consult that return a value) with a jtextfield and a jtable. when the user types in the textfield, the textfield call a method to filter the tablemodel.
    everything works fine, but after filtering the model, the references are lost and the return value does not match with the selected row.
    I read that convertColumnIndexToView, convertRowIndexToView, vertColumnIndexToModel and convertRowIndexToModel, solve the problem, but I used all and nothing.
    **** This is the code to fill the jtable
    DefaultTableModel modelo=(DefaultTableModel)this.jTable1.getModel();
    while(rs.next()){
    Object[] fila= new Object[2];
    fila[0]=rs.getObject("id_categoria");
    fila[1]=rs.getObject("nombre");
    modelo.addRow(fila);
    this.jTable1.getColumnModel().removeColumn(this.jTable1.getColumnModel().getColumn(0));
    // I delete the first column because is a ID, I dont want that the user see it. the value is only for me**** this is the method to filter from the jtextfield
    private void FiltrarJtable1() {
    TableRowSorter sorter = new TableRowSorter(this.jTable1.getModel());
    sorter.setRowFilter(RowFilter.regexFilter("^"+this.jTextField1.getText().toUpperCase(), 1));
    this.jTable1.setRowSorter(sorter);
    this.jTable1.convertRowIndexToModel(0);
    }*** this is the method that return the ID (id_categoria) from the tablemodel
    private void SeleccionarRegistro(){
    if(this.jTable1.getSelectedRow()>-1){
    String str_id =this.jTable1.getModel().getValueAt(this.jTable1.getSelectedRow(),0).toString();
    int_idtoreturn=Integer.parseInt(str_id);
    this.dispose();
    }else{
    JOptionPane.showMessageDialog(this,"there are no records selected","Warning!",1);
    }Who I can solve this problem?

    m_ilio wrote:
    I have a form (consult that return a value) with a jtextfield and a jtable. when the user types in the textfield, the textfield call a method to filter the tablemodel.
    everything works fine, but after filtering the model, the references are lost and the return value does not match with the selected row.
    I read that convertColumnIndexToView, convertRowIndexToView, vertColumnIndexToModel and convertRowIndexToModel, solve the problem, but I used all and nothing.
    You're right in that you have to use convertRowIndexToModel(), but you are using it wrong. That method takes as input the index of a row in the view, i.e. the table, and returns the corresponding row in the underlying TableModel. No data is changed by the call, so this:
    this.jTable1.convertRowIndexToModel(0);is meaningless by itself.
    What you need to do is the following:
    int selectedRow = this.jTable1.getSelectedRow(); // This is the selected row in the view
    if (selectedRow >= 0) {
        int modelRow = this.jTable1.convertRowIndexToModel(selectedRow); // This is the corresponding row in the model
        String str_id =this.jTable1.getModel().getValueAt(modelRow, 0).toString();
    }Hope this helps.

  • Sequence nextval reset at every month with 1

    I want to change Sequence Nextval = 1 at every month
    I m using this sequence
    create sequence VoucherNo
    minvalue 1
    maxvalue 9999999
    start with 1
    increment by 1
    Order;i want then when start next month sequence nextval should be 1 .
    reset with 1.

    Dont't recreate the sequence! You would invalidate all independent objects and lose all privileges granted for the sequences.
    Instead try this:SQL>CREATE SEQUENCE SEQ_TEST
      2   START WITH  1
      3   INCREMENT BY  1
      4   MINVALUE  1
      5   MAXVALUE  9999999;
    Sequence created.
    SQL>
    SQL>SELECT SEQ_TEST.NEXTVAL
      2    FROM all_objects WHERE ROWNUM < =10;
       NEXTVAL
             1
             2
             3
             4
             5
             6
             7
             8
             9
            10
    10 rows selected.
    SQL>
    SQL>DECLARE
      2     Val   NUMBER;
      3  BEGIN
      4     SELECT SEQ_TEST.CURRVAL
      5       INTO Val
      6       FROM DUAL;
      7
      8     EXECUTE IMMEDIATE 'ALTER SEQUENCE SEQ_TEST INCREMENT BY ' || TO_CHAR(1 - Val);
      9
    10     SELECT SEQ_TEST.NEXTVAL
    11       INTO Val
    12       FROM DUAL;
    13
    14     EXECUTE IMMEDIATE 'ALTER SEQUENCE SEQ_TEST INCREMENT BY 1';
    15
    16     DBMS_OUTPUT.put_line('New value of SEQ_TEST is ' || TO_CHAR(Val));
    17  END;
    18  /
    New value of SEQ_TEST is 1hth, Urs

  • How can I use comma in the return values of a static list of values

    Hi all,
    I want to create a select list (static LOV) like the following:
    Display Value / Return Value
    both are "Y" / 'YY'
    one is "Y" / 'YN','NY'
    I write the List of values definition is like this:
    STATIC:both are "Y"; 'YY',one is "Y";'YN', 'NY'
    However, it is explain by htmldb like this:
    Display Value / Return Value
    both are "Y" / 'YY'
    one is "Y" / 'YN'
    / 'NY'
    I tried using "\" before the ",", or using single or double quote, but all these do not work:(
    How can I use a comma in the return values?
    Thanks very much!

    "Better still, why not process the code of both Y with 2Y and one is Y with 1Y? "
    Could you please explain in detail? thanks! I am quite new to htmldb
    In fact I have a table which has too columns "a1" and "a2", both the values of these two columns are "Y" or "N". AndI want to choose the records that both a1 and a2 are "Y", or just one of a1, a2 is "Y".
    So I write the report sql like this:
    "select * from t1 where a1 || a2 in(:MYSELECTLIST) "
    Thus, I need to use "," in the LOV, since expression list in IN(,,,) using ",".
    Any other way to implement this?

  • Getter/setter methods -- how do I use the return values

    I'm just learning Java, and I haven't been to this site since the end of July, I think. I have a question regarding getter and setter methods. I switched to the book Head First Java after a poster here recommended it. I'm only about a hundred pages into the book, so the code I'm submitting here reflects that. It's the beginnings of a program I'd eventually like to complete that will take the entered information of my CD's and alphabetize them according to whatever criteria I (or any user for that matter) choose. I realize that this is just the very beginning, and I don't expect to have the complete program completed any time soon -- it's my long term goal, but I thought I could take what I'm learning in the book and put it to practical use as I go along (or at lest try to).
    Yes I could have this already done it Excel, but where's the fun and challenge in that? :) Here's the code:
    // This program allows the user to enter CD information - Artist name, album title, and year of release -- and then organizes it according the the user's choice according to the user's criteria -- either by artist name, then title, then year of release, or by any other order according to the user's choice.
    //First, the class CDList is created, along with the necessary variables.
    class CDList{
         private String artistName;//only one string for the artist name -- including spaces.
         private String albumTitle;//only one string the title name -- including spaces.
         private int yearOfRelease;
         private String recordLabel;
         public void setArtistName(String artist){
         artistName = artist;
         public void setAlbumTitle(String album){
         albumTitle = album;
         public void setYearOfRelease(int yor){
         yearOfRelease = yor;
         public void setLabel(String label){
         recordLabel = label;
         public String getArtistName(){
         return artistName;
         public String getAlbumTitle(){
         return albumTitle;
         public int getYearOfRelease(){
         return yearOfRelease;
        public String getLabel(){
        return recordLabel;
    void printout () {
           System.out.println ("Artist Name: " + getArtistName());
           System.out.println ("Album Title: " + getAlbumTitle());
           System.out.println ("Year of Release: " + getYearOfRelease());
           System.out.println ("Record Label: " + getLabel());
           System.out.println ();
    import static java.lang.System.out;
    import java.util.Scanner;
    class CDListTestDrive {
         public static void main( String[] args ) {
              Scanner s=new Scanner(System.in);
              CDList[] Record = new CDList[4];
              int x=0;     
              while (x<4) {
              Record[x]=new CDList();
              out.println ("Artist Name: ");
              String artist = s.nextLine();
              Record[x].setArtistName(artist);
              out.println ("Album Title: ");
              String album = s.nextLine();
              Record[x].setAlbumTitle(album);
              out.println ("Year of Release: ");
              int yor= s.nextInt();
                    s.nextLine();
              Record[x].setYearOfRelease(yor);
              out.println ("Record Label: ");
              String label = s.nextLine();
              Record[x].setLabel(label);
              System.out.println();
              x=x+1;//moves to next CDList object;
              x=0;
              while (x<4) {
              Record[x].getArtistName();
              Record[x].getAlbumTitle();
              Record[x].getYearOfRelease();
              Record[x].getLabel();
              Record[x].printout();
              x=x+1;
                   out.println("Enter a Record Number: ");
                   x=s.nextInt();
                   x=x-1;
                   Record[x].getArtistName();
                Record[x].getAlbumTitle();
                Record[x].getYearOfRelease();
                Record[x].getLabel();
                Record[x].printout();
         }//end main
    }//end class          First, I'd like to ask anyone out there to see if I could have written this any more efficiently, with the understanding that I'm only one hundred pages into the book, and I've only gotten as far as getter and setter methods, instance variables, objects and methods. The scanner feature I got from another book, but I abandoned it in favor of HFJ.
    Secondly --
    I'm confused about getter and setter methods -- I'd like someone to explain to me what they are used for exactly and the difference between the two. I have a general idea, that getters get a result from the method and setters set or maybe assign a value to variable. I submitted this code on another site, and one of the responders told me I wasn't using the returned values from the getter methods (he also told me about using a constructor method, but I haven't got that far in the book yet.). The program compiles and runs fine, but I can't seem to figure out how I'm not using the returned values from the getter methods. Please help and if you can explain in 'beginners terms,' with any code examples you think are appropriate. It will be greatly appreciated.
    By the way, I'm not a professional programmer -- I'm learning Java because of the intellectual exercise and the fun of it. So please keep that in mind as well.
    Edited by: Straitsfan on Sep 29, 2009 2:03 PM

    Straitsfan wrote:
    First, I'd like to ask anyone out there to see if I could have written this any more efficiently, with the understanding that I'm only one hundred pages into the book, and I've only gotten as far as getter and setter methods, instance variables, objects and methods. The scanner feature I got from another book, but I abandoned it in favor of HFJ.Yes, there is tons you could have done more efficiently. But this is something every new programmer goes through, and I will not spoil the fun. You see, in 3 to 6 months when you have learned much more Java, assuming you stick with it, you will look back at this and be like "what the hell was I thinking" and then realize just haw far you have come. So enjoy that moment and don't spoil it now by asking for what could have been better/ more efficient. If it works it works, just be happy it works.
    Straitsfan wrote:
    Secondly --
    I'm confused about getter and setter methods -- I'd like someone to explain to me what they are used for exactly and the difference between the two. I have a general idea, that getters get a result from the method and setters set or maybe assign a value to variable. I submitted this code on another site, and one of the responders told me I wasn't using the returned values from the getter methods (he also told me about using a constructor method, but I haven't got that far in the book yet.). The program compiles and runs fine, but I can't seem to figure out how I'm not using the returned values from the getter methods. Please help and if you can explain in 'beginners terms,' with any code examples you think are appropriate. It will be greatly appreciated.
    By the way, I'm not a professional programmer -- I'm learning Java because of the intellectual exercise and the fun of it. So please keep that in mind as well.First, if you posted this somewhere else you should link to that post, it is good you at least said you did, but doubleposting is considered very rude because what inevitably happens in many cases is the responses are weighed against each other. So you are basically setting anyone up who responds to the post for a trap that could make them look bad when you double post.
    You are setting you getters and setters up right as far as I can tell. Which tells me that I think you grasp that a getter lets another class get the variables data, and a setter lets another class set the data. One thing, be sure to use the full variable name so you should have setRecordLabel() and getRecodLabel() as opposed to setLabel() and getLabel(). Think about what happens if you go back and add a label field to the CDList class, bad things the way you have it currently. Sometimes shortcuts are not your friend.
    And yes, you are using the getters all wrong since you are not saving off what they return, frankly I am suprised it compiles. It works because you don't really need to use the getters where you have them since the CDList Record (should be lowercase R by the way) object already knows the data and uses it in the printout() method. Basically what you are doing in lines like:
    Record[x].getArtistName();is asking for the ArtistName in Record[x] and then getting the name and just dropping it on the floor. You need to store it in something if you want to keep it, like:
    String artistName = Record[x].getArtistName();See how that works?
    Hope this helped, keep up the good learning and good luck.
    JSG

  • Call C# method from javascript in WebView and retrieve the return value

    The issue I am facing is the following :
    I want to call a C# method from the javascript in my WebView and get the result of this call in my javascript.
    In an WPF Desktop application, it would not be an issue because a WebBrowser
    (the equivalent of a webView) has a property ObjectForScripting to which we can assign a C# object containg the methods we want to call from the javascript.
    In an Windows Store Application, it is slightly different because the WebView
    only contains an event ScriptNotify to which we can subscribe like in the example below :
    void MainPage_Loaded(object sender, RoutedEventArgs e)
    this.webView.ScriptNotify += webView_ScriptNotify;
    When the event ScriptNotify is raised by calling window.external.notify(parameter), the method webView_ScriptNotify is called with the parameter sent by the javascript :
    function CallCSharp() {
    var returnValue;
    window.external.notify(parameter);
    return returnValue;
    private async void webView_ScriptNotify(object sender, NotifyEventArgs e)
    var parameter = e.Value;
    var result = DoSomerthing(parameter);
    The issue is that the javascript only raise the event and doesn't wait for a return value or even for the end of the execution of webView_ScriptNotify().
    A solution to this issue would be call a javascript function from the webView_ScriptNotify() to store the return value in a variable in the javascript and retrieve it after.
    private async void webView_ScriptNotify(object sender, NotifyEventArgs e)
    var parameter = e.Value;
    var result = ReturnResult();
    await this.webView.InvokeScriptAsync("CSharpCallResult", new string[] { result });
    var result;
    function CallCSharp() {
    window.external.notify(parameter);
    return result;
    function CSharpCallResult(parameter){
    result = parameter;
    However this does not work correctly because the call to the CSharpResult function from the C# happens after the javascript has finished to execute the CallCSharp function. Indeed the
    window.external.notify does not wait for the C# to finish to execute.
    Do you have any solution to solve this issue ? It is quite strange that in a Window Store App it is not possible to get the return value of a call to a C# method from the javascript whereas it is not an issue in a WPF application.

    I am not very familiar with the completion pattern and I could not find many things about it on Google, what is the principle? Unfortunately your solution of splitting my JS function does not work in my case. In my example my  CallCSharp
    function is called by another function which provides the parameter and needs the return value to directly use it. This function which called
    CallCSharp will always execute before an InvokeScriptAsync call a second function. Furthermore, the content of my WebView is used in a cross platforms context so actually my
    CallCSharp function more look like the code below.
    function CallCSharp() {
    if (isAndroid()) {
    //mechanism to call C# method from js in Android
    //return the result of call to C# method
    } else if (isWindowsStoreApp()) {
    window.external.notify(parameter);
    // should return the result of call to C# method
    } else {
    In android, the mechanism in the webView allows to return the value of the call to a C# method, in a WPF application also. But I can't figure why for a Windows Store App we don't have this possibility.

  • The return value of "which"

    Dear OS Xers,
    Subject: Script writing. The "which" command that that returns the location of a program.
    I'm writing a script that, at the beginning and before the main body of the script, checks that the commnds it uses are installed on the system. I was hoping to use "which" to do this, specifically checking the return value thus:
    which ls bash gaga >/dev/null # list of needed functions
    if [ $? != 0 ] # cause a rumpus.
    However I find that the return value is 0=OK even if which can't find some of the programs.
    Now, I can get around this for apple by writing a grep script that checks for "^no " in the std output. However I suspect that apple's implementation is non-standard, and that correctly "which" is meant to return an error value in this case. If this is the case then correctly the thing to do is not to script for apple (I'm only writing for my own, hopefully up-to-date systems!) but to correct the apple implementation.
    I want to check two things with you. First, I have no real basis for saying that apple's implementation is non-standard. I only know that I've checked other systems and man pages and all that I've come across so far indicate that an error is returned. Is there some more authoratitive method of checking what the behaviour should be? Some standards body? Secondly, I realise that this is small fry but I'd be more than happy to update apple's code if they are likely to approve the change. If that's the case can someone please show me where I can find the relevant source code?
    Regards, Max
    http://unixhelp.ed.ac.uk/CGI/man-cgi?which
    RETURN VALUE
    Which returns the number of failed arguments, or -1 when no `program-
    name' was given.
    Debian implementation:
    EXIT STATUS
    0 if all specified commands are found and executable
    1 if one or more specified commands is nonexistent or not executable
    2 if an invalid option is specified
    I'll have a chance to check the implementation on some solaris machines next week.
    As you can see, they're not consistent in terms of what error they return, but they do all return a non-zero value.
      Mac OS X (10.4.4)  

    The fink version ( /sw/bin/which ) does what you're looking as well--it doesn't recognize aliases though. tcsh and OS X's csh (which happens to be a duplicate of the tcsh executable) do recognize aliases.
    I guess the script (/usr/bin/which) is there to either echo one's path when a command's not found or give a different response to aliases. Otherwise one could change the script to:
    #! /bin/csh -f
    which $arg
    exit($?)
    Note the added -f...this prevents aliases from being set by csh when they don't exist in the bash shell. But neither script will recognize aliases set in a bash shell.
    TiBook G4   Mac OS X (10.3.9)  

  • How to get the return values from a web page

    Hi all :
       how to get the return values from a web page ?  I mean how pass values betwen webflow and web page ?
    thank you very much
    Edited by: jingying Sony on Apr 15, 2010 6:15 AM
    Edited by: jingying Sony on Apr 15, 2010 6:18 AM

    Hi,
    What kind of web page do you have? Do you have possibility to for example make RFCs? Then you could trigger events (with parameters that could "return" the values) and the workflow could react to those events. For example your task can have terminating events.
    Regards,
    Karri

  • How to Change the return value for the parameters

    Hi, Can anyone help me with my problem?
    I have a parameter called "P1_Projects" defined in the HTMLDB page, on the report region, there are 2 buttons, one is "Go" button to submit the report on the screen, so user can preview the report, then another button "Export to PDF" can be clicked to generate the report using Oracle Report Services. The "Export to PDF" button will use the same set of parameters submitted for the "Go" button.
    So, the parameter "P1_Projects" is being used by these 2 buttons. and I have to pass a "%" wild card for "All Projects". To make the "Export to PDF" button work, I have to safe encode the return value for "%" to "%25" in order to pass the URL formula, but now my "Go" button doesn't work with "%25", it only recognize the "%" wild card.
    Is there a way to conditionally change the value depends which button is clicked?
    Any hint or help is highly appreciated!
    Hong

    try creating a plsql process which sets the P1_Projects item as required.
    in the plsql you can do:
    if :REQUEST = 'GO' then
    xxx
    else
    xxxx
    end if;
    set the condition to plsql expression:
    :REQUEST in ('GO', 'EXPORT')
    NB. the request value is usually set to the button name when a page is submitted from a button

  • How to store the return value from a select list in page item ?

    I'm sorry, I'm sure you will all flame me for this (and its long too :-(. I'm still trying to pick this up and havn't had time to read manual and this forum and up against the clock (as usual), but this must be something thats simple to do, otherwise why have 2 cols on LOV (display text and return value.
    normal kind of thing - master /detail, a master table and a detail table, master.id is PK in master, master.name is the name of the master item. detail.id is pk in detail, detail.mid is foreign key to master.id. I have a tabular report that displays a join of cols from master and detail, with 2 cols being links, one is a link on master.name, that passes master.id to page P1 and it displays a row from master. The other col displays detail.name and passes detail.id to page P3, P3 displays a row of the detail table.
    I want to populate a LOV with possible master.name values, but display the name of the current P3_MID value (from detail.mid). Then a user can pick a different master and it needs to update P3_MID so on submit it updates the row.
    I just can't seem to see in the manual how you can specify where the return value on a LOV goes?
    As I said, sorry for long post and not having had time to read docs correctly - someone just point me at the subject matter somewhere, please.

    Sorry, I was trying to be to complex and obviously APEX is just too damn cleaver - I figured out how this works - basically APEX pulls the LOV and then matchs the mid to it to display the correct name - simple and easy - just me making it difficult

  • How to set the returned value of CFL in a matrix

    dear all,
    I got a matrix binded to a DataSource and two CFLs are in this matrix. The codes for handling AfterChooseFromList is as following.  It works almost fine. But when a docoment containing more than two
    rows in the matrix and I reselect the CFL cell values more than two times, an error occured sometimes, not everytime. The error message is "This entry already exists in the following tables @CYW_PRROW [Message 131-183]"
    I have tried to find out what kind of situation to cause this error, but still in the mud.
    Can anybody give me some suggestion? Thanks.
    Public Sub OnAfterChooseFromList_Matrix(ByVal pVal As SAPbouiCOM.ItemEvent)
            Dim ActionSuccess As Boolean = pVal.ActionSuccess
            Dim oform As SAPbouiCOM.Form = SBO_Application.Forms.Item(pVal.FormUID)
            Dim oitem As SAPbouiCOM.Item = oform.Items.Item("mtx_0")
            Dim omatrix As SAPbouiCOM.Matrix = CType(oitem.Specific, SAPbouiCOM.Matrix)
            Dim oDataTable As SAPbouiCOM.DataTable
            oDataTable = pVal.SelectedObjects
            Dim val As String
            Try
                val = oDataTable.GetValue(0, 0)
            Catch ex As Exception
            End Try
            omatrix.GetLineData(pVal.Row)
            oform.DataSources.DBDataSources.Item("@CYW_PRROW").Offset = pVal.Row - 1
            If pVal.ColUID = "col_0" Then
                Try
                    oform.DataSources.DBDataSources.Item("@CYW_PRROW").SetValue("U_PRItemCode", pVal.Row - 1, CStr(val))
                Catch ex As Exception
                    SBO_Application.MessageBox(ex.Message)
                End Try
            Else
                Try
                    oform.DataSources.DBDataSources.Item("@CYW_PRROW").SetValue("U_PRSupp", pVal.Row - 1, CStr(val))
                Catch ex As Exception
                    SBO_Application.MessageBox(ex.Message)
                End Try
            End If
            omatrix.SetLineData(pVal.Row)
            If pVal.FormMode = "1" Then
                oform.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE
            End If
        End Sub
    Another quesion, can I assign the returned value of CLF directly to the cell?

    Hello  Chao-Yi Wu,
    I don't have a real solution for you - just a few comments:
    1. At
            Try
                val = oDataTable.GetValue(0, 0)
            Catch ex As Exception
            End Try
    I would add
            Try
                if oDataTable Is Nothing Then Exit Sub ' If the User cancels the CFL
                val = oDataTable.GetValue(0, 0)
            Catch ex As Exception
            End Try
    2. At
       If pVal.ColUID = "col_0" Then
    I would make the branch by the pVal.ChooseFromListUID instead of the ColUID
    and the 2nd not with "Else" but with "Else If ....."
    3. It may work with EditText.String/Value of a cell but I never do that because of performance-reasons.
    I always do it the same way as you in principle - I don't really know what the problem is.
    4. Maybe some unique indexes on your table (although this should give an error at the update and not at CFL when "the unique-law is broken"...)?
    Sorry - that's all for the moment.
    Cheers,
    Roland

  • List Manager based on LOV returning values with missing spaces

    I am using a list manager based on a pop up lov, in this case it is a list of supplier names. When the pop-up list is shown the values are displayed as expected, with all spaces intact. When I click the supplier name, and then click Add to add to the list manager, all spaces in the supplier name are lost.
    The field I'm pulling is a varchar2 in the db. Here's the sql behind the lov:
    select '(All Suppliers)' d, '(All Suppliers)' r from rep_gy_spend
    union
    select distinct supplier_name d, supplier_name r
    from rep_gy_spend
    order by 1
    Any ideas on why the spaces are lost?

    DJ - There is a javascript function on the page that does that. View page source and you'll see it. You could override it with your own and change that behavior and you could prevent it from upper-casing the returned values as well by using different onclick javascript on the add button.
    Scott

  • SQL 2012 - SSIS Error -The step did not generate any output. The return value was unknown. The process exit code was -1073741819. The step failed.

    Hi guys 
     Trying to run this package on SQL 2012 agent  and getting below error . No more details I could find so far.
    The step did not generate any output.  The return value was unknown.  The process exit code was -1073741819.  The step failed.
    About Package - Its connecting to different version (2000,2005,2008,2008R2,2012) servers and putting Jobs information into one Database table.  
    Any workaround or fix ?
    Thanks
    Please Mark As Answer if it is helpful. \\Aim To Inspire Rather to Teach

    New package or one that used to work? Connecting how? How does it poll?
    On the surface it is an error from a memory space of the binary/non-managed code, so nothing can be really concluded based on what you decided to share with us.
    Arthur My Blog
    So Same package is working fine from my local machine which has SQL 2008 R2 and SQL 2012 installed. I am trying to push the package on server which has sql server 2012 Installed . 
    I don't see any error .
    I ran package manually from server using SQL Data tools and ran successfully...
    Please Mark As Answer if it is helpful. \\Aim To Inspire Rather to Teach

  • LiveCycle DS , can't get the return value of fill( arg) from Assembler class

    Hi all!
    I'm a have small problem , can any one help me? Please
    I make a project which very similar to Product project(in
    example).
    1) Have Assembler class: I work correctly
    package flex.samples.stock;
    import java.util.List;
    import java.util.Collection;
    import java.util.Map;
    import flex.data.DataSyncException;
    import flex.data.assemblers.AbstractAssembler;
    public class StockAssembler extends AbstractAssembler {
    public Collection fill(List fillArgs) {
    StockService service = new StockService();
    System.out.print(fillArgs.size());
    return service.getStocks();
    public Object getItem(Map identity) {
    StockService service = new StockService();
    return service.getStock(((Integer)
    identity.get("StockId")).intValue());
    public void createItem(Object item) {
    StockService service = new StockService();
    service.create((Stock) item);
    public void updateItem(Object newVersion, Object
    prevVersion, List changes) {
    StockService service = new StockService();
    boolean success = service.update((Stock) newVersion);
    if (!success) {
    int stockId = ((Stock) newVersion).getStockId();
    throw new DataSyncException(service.getStock(stockId),
    changes);
    public void deleteItem(Object item) {
    StockService service = new StockService();
    boolean success = service.delete((Stock) item);
    if (!success) {
    int stockId = ((Stock) item).getStockId();
    throw new DataSyncException(service.getStock(stockId),
    null);
    some require class is ok.
    2) I configure in data-management-config.xml
    <destination id="stockinventory">
    <adapter ref="java-dao" />
    <properties>
    <source>flex.samples.stock.StockAssembler</source>
    <scope>application</scope>
    <metadata>
    <identity property="StockId"/>
    </metadata>
    <network>
    <session-timeout>20</session-timeout>
    <paging enabled="false" pageSize="10" />
    <throttle-inbound policy="ERROR" max-frequency="500"/>
    <throttle-outbound policy="REPLACE"
    max-frequency="500"/>
    </network>
    </properties>
    </destination>
    3) My client app:
    I use :
    <mx:ArrayCollection id="stocks"/>
    <mx:DataService id="ds" destination="stockinventory"/>
    ds.fill(stocks); --> Problem here
    When I run this app, The StockAssembler on the server work
    correctly (i use printout to debug) . But variable stocks can't get
    the return value,it is a empty list.
    Please help me!

    Hi,                                                             
    The executeQueryAsync method is “asynchronous, which means that the code will continue to be executed without waiting for the server to
    respond”.
    From the error message “The collection has not been initialized”, which suggests that the object in use hadn’t been initialized after the execution of the executeQueryAsync method.
    I suggest you debug the code in browser to see which line of code will throw this error, then you can reorganize the logic of the code to avoid using the uninitialized object.
    A documentation from MSDN about Using the F12 Developer Tools to Debug JavaScript Errors
    for your reference:
    http://msdn.microsoft.com/en-us/library/ie/gg699336(v=vs.85).aspx
    Best regards
    Patrick Liang
    TechNet Community Support

  • How to Sort by the length of the returned value from a query.

    Hi,
    I was wondering if it is possible to sort by the length of the returned value from a query?
    For example if I want to get a list of people with the name 'Samuel', I would like to short by how short the length of the whole name is.
    Sort by length of the name in SQL
    Samuel Syda
    Samuel Indranaka
    Samuel Johnsons
    Samuel Longhenderson
    Thank you.

    Hi,
    Sorting is done by an ORDER BY clause at the end of the main query.
    In most cases, you can ORDER BY any expression, even f it is not in the SELECT clause.  In this case, it sounds like you just need:
    ORDER BY  LENGTH (name_column)
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) for all the tables involved, and the results you want from that data.
    Post your query, using an ORDER BY clause like the one above, and point out where that query is producing the wrong results, and explain, using specific examples, how you get the right results from the given data in those places.
    Always say what version of Oracle you're using (e.g. 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

Maybe you are looking for