SQL Parameter Order

I'm not sure if this is a CR or BOE question but I'll post here first.
Is there any way to change the parameter order of a SQL Command Parameter?
I know it usually goes by the alphabetical order of the parameter name (i.e.: SQL Parameter name "StartDate" and "EndDate" would actually prompt EndDate first then StartDate).
I guess I can easily try to change the wording of the parameter names and that's what I did (I changed it to "1StartDate" and "2EndDate").  It prompts correctly in CR when I preview it... but when I bring it up to BOE and run the report there, it will prompt me the 2EndDate first instead of 1StartDate.
Any ideas?

James,
I have changed appropriately to match alphabetically (eg. Begin & End)... and like always, Crystal will display the prompt correctly and in correct when refreshing the report.  But once I bring it up on BOE, it will prompt for End first then Begin.
Brian,
Thanks for your suggestion.  However, I am aware of the parameter orders in the parameter viewer.  While the parameter order list applies to parameter used on the actual report, it does not apply to the order SQL Command Parameters are for some reason.  Regardless, it has always been set in the order I'd like it... just that when it comes to the SQL Parameter part, it never follows.
Could this be a BOE issue then?

Similar Messages

  • Sql parameter substitution problems

    Hi,
    I am having problems with the sql parameter substitution. I have a query that
    looks like this:
    select name,value from table where name in ('name1','name2');
    I have tried building a string that equals "'name1','name2'" and passing it as
    a parameter to sql entering the javaDoc comments like:
    select name,value from table where name in ({nameString})
    The problem is that when it is substituted and set to the database it looks like
    this:
    select name,value from table where name in ('\'name1\',\'name2\'');
    This will not work. Does anyone have any suggestions on how to do this using a
    database control. Basically I'm looking for the ability to create dynamic sql
    statements.
    Thanks for your help.
    Regards,
    James

    Anurag,
    Thanks for the reply. I don't think that this solves my problem though. I will
    never know how many strings to pass. It's all based on what the user wants, they
    could ask for 2, 20, or any other number of names. It sounds like using a Database
    control is not really possible for this situation. What do you think? Any chance
    of this making into workshop in the future or in these situations is creating
    an EJB the only way to go?
    Thanks again.
    Regards,
    James Chamberlain
    "Anurag Pareek" <[email protected]> wrote:
    Hi James,
    This result is same as what you will get on executing the following prepared
    statement:
    conn.prepareStatement("select empid from empdemo where name in (?)");
    pstmt.setString(1,"'Person 1','Person 2','Person 3'");
    pstmt3.execute();
    Workshop's DBControl internally uses a PreparedStatement, hence you would
    obtain the same result.
    To get it working, you will need to pass in the 3 strings separately
    as
    below:
    conn.prepareStatement("select empid from empdemo where name in
    pstmt.setString(1,"Person 1");
    pstmt.setString(1,"Person 2");
    pstmt.setString(1,"Person 3");
    Please do let me know if you have further queries regarding the issue.
    Regards,
    Anurag
    Workshop Support
    "James Chamberlain" <[email protected]> wrote in message
    news:[email protected]...
    Hi,
    I am having problems with the sql parameter substitution. I have aquery
    that
    looks like this:
    select name,value from table where name in ('name1','name2');
    I have tried building a string that equals "'name1','name2'" and passingit as
    a parameter to sql entering the javaDoc comments like:
    select name,value from table where name in ({nameString})
    The problem is that when it is substituted and set to the databaseit
    looks like
    this:
    select name,value from table where name in ('\'name1\',\'name2\'');
    This will not work. Does anyone have any suggestions on how to do thisusing a
    database control. Basically I'm looking for the ability to create dynamicsql
    statements.
    Thanks for your help.
    Regards,
    James

  • SQL Parameter

    How do u setup SQL parameter in .NET OLEDataAdapter. I tried to follow .NET sample to use ? but it doesn't work. Any idea? TIA

    If you want to select all items you should use a query without a WHERE clause:
    Select Id from table1
    Please refer to the following page for more information about how to add a new query to your table adapter:
    https://msdn.microsoft.com/en-us/library/kda44dwy.aspx.
    You could call the new method with the new query "FillAll" or something.
    You cannot select all values by passing some magic parameter value to the FillBy_Id query since it takes an id value to filter on.
    Please remember to close your threads by marking helpful posts as answer and then start a new thread if you have a new question. Please don't post several questions in the same thread.

  • Bug in Oracle JDBC thin driver (parameter order)

    [ I'd preferably send this to some Oracle support email but I
    can't find any on both www.oracle.com and www.technet.com. ]
    The following program illustrates bug I found in JDBC Oracle thin
    driver.
    * Synopsis:
    The parameters of prepared statement (I tested SELECT's and
    UPDATE's) are bound in the reverse order.
    If one do:
    PreparedStatement p = connection.prepareStatement(
    "SELECT field FROM table WHERE first = ? and second = ?");
    and then bind parameter 1 to "a" and parameter to "b":
    p.setString(1, "a");
    p.setString(2, "b");
    then executing p yields the same results as executing
    SELECT field FROM table WHERE first = "b" and second = "a"
    although it should be equivalent to
    SELECT field FROM table WHERE first = "a" and second = "b"
    The bug is present only in "thin" Oracle JDBC driver. Changing
    driver to "oci8" solves the problem.
    * Version and platform info:
    I detected the bug using Oracle 8.0.5 server for Linux.
    According to $ORACLE_HOME/jdbc/README.doc that is
    Oracle JDBC Drivers release 8.0.5.0.0 (Production Release)
    * The program below:
    The program below illustrates the bug by creating dummy two
    column table, inserting the row into it and then selecting
    the contents using prepared statement. Those operations
    are performed on both good (oci8) and bad (thin) connections,
    the results can be compared.
    You may need to change SID, listener port and account data
    in getConnecton calls.
    Sample program output:
    $ javac ShowBug.java; java ShowBug
    Output for both connections should be the same
    --------------- thin Driver ---------------
    [ Non parametrized query: ]
    aaa
    [ The same - parametrized (should give one row): ]
    [ The same - with buggy reversed order (should give no answers):
    aaa
    --------------- oci8 driver ---------------
    [ Non parametrized query: ]
    aaa
    [ The same - parametrized (should give one row): ]
    aaa
    [ The same - with buggy reversed order (should give no answers):
    --------------- The end ---------------
    * The program itself
    import java.sql.*;
    class ShowBug
    public static void main (String args [])
    throws SQLException
    // Load the Oracle JDBC driver
    DriverManager.registerDriver(new
    oracle.jdbc.driver.OracleDriver());
    System.out.println("Output for both connections should be the
    same");
    Connection buggyConnection
    = DriverManager.getConnection
    ("jdbc:oracle:thin:@localhost:1521:ORACLE",
    "scott", "tiger");
    process("thin Driver", buggyConnection);
    Connection goodConnection
    = DriverManager.getConnection ("jdbc:oracle:oci8:",
    "scott", "tiger");
    process("oci8 driver", goodConnection);
    System.out.println("--------------- The end ---------------");
    public static void process(String title, Connection conn)
    throws SQLException
    System.out.println("--------------- " + title + "
    Statement stmt = conn.createStatement ();
    stmt.execute(
    "CREATE TABLE bug (id VARCHAR(10), val VARCHAR(10))");
    stmt.executeUpdate(
    "INSERT INTO bug VALUES('aaa', 'bbb')");
    System.out.println("[ Non parametrized query: ]");
    ResultSet rset = stmt.executeQuery(
    "select id from bug where id = 'aaa' and val = 'bbb'");
    while (rset.next ())
    System.out.println (rset.getString (1));
    System.out.println("[ The same - parametrized (should give one
    row): ]");
    PreparedStatement prep = conn.prepareStatement(
    "select id from bug where id = ? and val = ?");
    prep.setString(1, "aaa");
    prep.setString(2, "bbb");
    rset = prep.executeQuery();
    while (rset.next ())
    System.out.println (rset.getString (1));
    System.out.println("[ The same - with buggy reversed order
    (should give no answers): ]");
    prep = conn.prepareStatement(
    "select id from bug where id = ? and val = ?");
    prep.setString(1, "bbb");
    prep.setString(2, "aaa");
    rset = prep.executeQuery();
    while (rset.next ())
    System.out.println (rset.getString (1));
    stmt.execute("DROP TABLE bug");
    null

    Horea
    In the ejb-jar.xml, in the method a cursor is closed, set <trans-attribute>
    to "Never".
    <assembly-descriptor>
    <container-transaction>
    <method>
    <ejb-name></ejb-name>
    <method-name></method-name>
    </method>
    <trans-attribute>Never</trans-attribute>
    </container-transaction>
    </assembly-descriptor>
    Deepak
    Horea Raducan wrote:
    Is there a known bug in Oracle JDBC thin driver version 8.1.6 that would
    prevent it from closing the open cursors ?
    Thank you,
    Horea

  • TestStand Open SQL Statement does not support SQL's ORDER BY clause???

    TestStand 1.0.3
    Windows 2000 SP1
    SQL Server 2000 Personal
    You've got to be kidding me...
    It appears that the built-in TestStand Open SQL Step does NOT support the
    "ORDER BY" clause in the SELECT statement, even though the documentation
    says it does. Is this true?
    I have an Open SQL Statement query:
    "SELECT * FROM [MyTable] WHERE ([Batch ID]=1234)"
    it works fine, returning a correct record count 120 records. If I change
    the Open SQL Statement query simply by adding an ORDER BY clause, such as:
    "SELECT * FROM [MyTable] WHERE ([Batch ID]=1234) ORDER BY [MyField] ASC"
    it returns a record count of zero. I know that "MyField" exists in the
    MyTable table and contains valid data. The
    second query works fine in SQL
    Server Enterprise Manager.
    Am I missing something? Is it true that the TestStand Open SQL Step does
    NOT support the "ORDER BY" clause? If not, what &#$!ing good is it and why
    does the manual state it is supported? Is there any other way using just
    the TestStand steps to order a database recordset on one or more fields?
    Any help would be appreciated.
    Grrrrr....
    Bob Rafuse
    Etec Inc.

    > Bob -
    > The database step types do not do anything special to the SQL command
    > that you give it. The step just passes the command to the ADO
    > provider. I tried a simple query using the step types with the
    > following command,
    >
    > "SELECT UUT_RESULT.* FROM UUT_RESULT WHERE ([UUT_SERIAL_NUMBER] =
    > 12345) ORDER BY [EXECUTION_TIME] ASC"
    >
    > and this return the expected results and the record count parameter
    > was as expected. I tried this on TS 1.0.2 and TS 2.0 with MS Access
    > 2000 and MS SQL Server 7.0. I do not have MS SQL Server 2000 at this
    > time.
    >
    > It would be surprised if the step types are messing something up.
    I've been doing some experimenting over the past couple of days. Simple,
    one-table queries seem to handle the ORDER BY clause fine. Th
    ings seem to
    get messed up when I try multi-table queries with ORDER BY clause with the
    TestStand database steps. I get no errors but the returned record counts
    are always 0 with the ORDER BY and positive without the ORDER BY. The exact
    same queries work fine in Visual Basic/ADO and the SQL Server Query
    Analyzer.
    > Questions:
    > 1. Have you verified whether the data is actually returned even though
    > the record count is zero?
    Hmmm... yes data IS getting returned (at least on the two instances I just
    checked), but the record count is always zero. I was not proceeding with
    processing if the record count was 0.
    Still... I don't know how to loop through the recordset without knowing how
    many records there are an not eventually generate an error by passing EOF.
    Is there another way using the TestStand database steps to determine a) the
    number of records in the recordset or b) when I'm at EOF?
    > 2. Are you using any advanced options on the Opend SQL Statement step
    > type, specifically
    the cursor type set to forward only? Forward only
    > cursors do not allow for record counts.
    Everything on the Advanced tab of the Open SQL Statement step is set to "Use
    Default".
    Bob.

  • Prepared statement parameter order?

    We have prepared statements for insert and update where changing the order of columns in the statement gives different results.
    Problem 1:
    For an update statements setting 8 column values via preparedStatement.executeUpdate, we got the following exception containing an internal error:
    java.sql.SQLException: Interner Fehler: Daten-Array nicht zugewiesen
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:210)
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:273)
    at oracle.jdbc.dbaccess.DBDataSetImpl._setDBItem(DBDataSetImpl.java:365)
    at oracle.jdbc.dbaccess.DBDataSetImpl._bindsRowCompleted(DBDataSetImpl.java:737)
    at oracle.jdbc.dbaccess.DBDataSetImpl.rowCompleted(DBDataSetImpl.java:1619)
    at oracle.jdbc.driver.OraclePreparedStatement.get_data_for_columns(OraclePreparedStatement.java:2343)
    at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:362)
    All statement ? parameters where bound correctly.
    When we changed the order of the update's set-clauses and of the according setString parameters to the same order the table is created in the database, the statement works fine.
    Problem 2:
    An insert statement using a VALUES clause with not more than 10 columns works fine independent of the column order.
    But if we have a table with more than 10 columns, the insert only works if the columns in the insert statement are in the same order as the database table. Otherwise we got an IndexOutOfBoundsException - looks like a array overflow in an internal array used to sort column indexes...
    We are using Oracle 8.1.7 and JDBC 1.2 thin driver.
    Anyone else with similar problems?

    Did you try to define the Parameter name?
    Like these:
    strSQL="XXX(p_1=>?, p_2=>?,p_3=>?)"
    cstmt.setXXX(1,'v1');
    cstmt.setXXX(3,'v3');
    cstmt.setXXX(2,'v2');
    I am suprised, If you have so many parameter, how can you maintain you code if you do not define the parameter names?

  • Parameter Order

    I am testing the Beta Managed Driver and I have ran across a few issues.
    In my current Sql files which use anonymous pl/sql blocks I put the parameters in type order to make it easier to read, not call order. When I use the managed driver and parameters are not in call order I get errors like wrong type (PLS-00382) or my Ref_Cursor parameter is not a cursor (PLS-00456) or creates a "Network Session: End of file" error.
    Is there a plan to allow the parameters to passed in any order instead of call order?
    Example
    Given the following Parameters
    P0 Varchar(25) IN := 100
    P1 ref_Cursor OUT
    P2 Varchar(25) IN := 100
    P3 ref_Cursor OUT
    -- "Works"
    Begin
    :P2 := '112';
    :P0 := '112';
    OPEN :p1 For select :p0 FROM DUAL;
    OPEN :p3 For select :p0, :P2 FROM DUAL;
    END;
    -- "Network Session: End of file"
    Begin
    :P2 := '112';
    :P0 := '112';
    OPEN :p1 For select :p0 FROM DUAL;
    OPEN :p3 For select :p0, :P2 FROM DUAL;
    END;
    /* Error
    ORA-06550: line 4, column 8:
    PLS-00456: item 'P1' is not a cursor
    ORA-06550: line 4, column 3:
    PL/SQL: SQL Statement ignored
    ORA-06550: line 5, column 9:
    PLS-00382: expression is of wrong type
    ORA-06550: line 5, column 2:
    PL/SQL: Statement ignored
    Begin
    OPEN :p1 For select :p0 FROM DUAL;
    :P0 := '112';
    :P2 := '112';
    OPEN :p3 For select :p0, :P2 FROM DUAL;
    END;

    Try setting BindByName = True on your OracleCommand object. The default is false, and that will create the behavior you're seeing here.

  • Pl/sql parameter portlet - need some help/advice - how to create

    I want to create a pl/sql portlet that accepts a parameter and on submit passes the parameter to other portlets (sql reports) these are then automatically run to display the new data.
    E.g.
    parameter portlet = deptno
    On submit
    Sql reports then refreshed using the parameter
    I am aware, and have tried the mycompnay demo, which works exactly as I want but the parameter portlet cannot be amended and is written in Java.
    I need a pl/sql equivalent so I can tailor the code.
    Any advice examples or guidance would be really appreciated.
    Thanks in anticipation.
    SD

    Hi,
    You can use a form portlet to accept parameters and then call a report in the success procedure of the form. In this example it calls a report with the value in the flightno field.
    declare
    flightno number;
    blk varchar2(10) := 'DEFAULT';
    begin
    flightno := p_session.get_value_as_varchar2(
    p_block_name => blk,
    p_attribute_name => 'A_FLIGHT_NO');
    call('SJDEMO30.report1.show?p_arg_names=flightno&p_arg_values='||
    flightno);
    end;
    Thanks,
    Sharmila

  • SQL Query : Order By issue with HUGE Table

    Hello friends,
    I have been through a terrible issue with order by. I would appreciate your help. Please let me know, your input for my case:
    => if i run select query it returns result quick in some milliseconds. (sql dev. fetches 50 rows at a time)
    => if i run select query with where condition and column (say A) in where condition is even indexed and i have order by and that order by column (say B) is also indexed.
    Now, here is the issue:
    1. if no. of rows with that where condition can filter yielding small result set then order by works fine .. 1-5 sec which is good.
    2.*if no. of rows with that where condition can filter yielding Large result set, say more than 50,000 then with order by then the wait time is exponential.... i have even waited 10+ mins to get the result back for 120,000 records.*
    Is order by takes that long for 100K records ... i think something else if wrong... your pointer will really be helpful... i am very new to sql and even newer for large table case.
    I am using SQL Developer Version 2.1.1.64
    and Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    Thank you so much.
    Edited by: 896719 on Jan 11, 2013 8:38 AM

    Yes you are correct, but my concentration was on order by thing, so it will do full scan of table so i was putting that ... and was also wondering if millions of record in table should not be a issue...???
    Any way for the explain plan , when just a value in the where changes there is the huge difference i want to point out too as below:
    SELECT
    FROM
        EES_EVT EES_EVT  where APLC_EVT_CD= 'ABC' ORDER BY  CRE_DTTM DESC
    execution time : 0.047 sec
    Plan hash value: 290548126
    | Id  | Operation                    | Name        | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT             |             |    27 | 14688 |    25   (4)| 00:00:01 |
    |   1 |  SORT ORDER BY               |             |    27 | 14688 |    25   (4)| 00:00:01 |
    |   2 |   TABLE ACCESS BY INDEX ROWID| EES_EVT     |    27 | 14688 |    24   (0)| 00:00:01 |
    |*  3 |    INDEX RANGE SCAN          | XIE1EES_EVT |    27 |       |     4   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       3 - access("APLC_EVT_CD"='ABC')
    Note
       - SQL plan baseline "SYS_SQL_PLAN_6d41e6b91925c463" used for this statement
    =============================================================================================
    SELECT
    FROM
        EES_EVT EES_EVT  where APLC_EVT_CD= 'XYZ' ORDER BY  CRE_DTTM DESC
    execution : 898.672 sec.
    Plan hash value: 290548126
    | Id  | Operation                    | Name        | Rows  | Bytes |TempSpc| Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT             |             |   121K|    62M|       |   102K  (1)| 00:11:02 |
    |   1 |  SORT ORDER BY               |             |   121K|    62M|    72M|   102K  (1)| 00:11:02 |
    |   2 |   TABLE ACCESS BY INDEX ROWID| EES_EVT     |   121K|    62M|       | 88028   (1)| 00:09:27 |
    |*  3 |    INDEX RANGE SCAN          | XIE1EES_EVT |   121K|       |       |   689   (1)| 00:00:05 |
    Predicate Information (identified by operation id):
       3 - access("APLC_EVT_CD"='XYZ')
    Note
       - SQL plan baseline "SYS_SQL_PLAN_ef5709641925c463" used for this statementAlso Note this table contains 74328 MB data in it.
    Thanks

  • SQL Load ORDER BY clause

    Does anyone know how or where to enter the ORDER BY clause when using a SQL data source in a load rule? I would prefer to do the ordering in the load rule rather than creating a view on the DB side to do this if at all possible.
    According to the documentation "The SQL Statement box in the Open SQL Data Sources dialog box provides Select, From, and Where text boxes that help you write SQL queries. You can specify multiple data sources, filter the display of records, and specify how records displayed in Data Prep Editor are ordered and grouped." but I haven't found anywhere where you can order or group data. I don't need to be able group data I just want to be able to order my data to make the load process as efficient as possible.
    I do sort the data when inserting it into the load table but Oracle doesn't necessarily insert the records into the table based on their order when going in.
    We are currently on Essbase 11.1.1.3 and Oracle 11g.
    Any help is greatly apprecied.

    Well DUH! Everyone knows that! :-)
    Not sure why I never tried that, but it works. They need to update the documentation to say this, but we all know that will never happen.
    Thanks again!

  • How to create updateable resultset using sql with "order by"

    Dear all,
    I'm using the Derby database to hold a table of stock prices. After the table is populated, I want to do some calculations and store the result in a column.
    I get the resultset using the following code
    Statement stmt = con.createStatement(ResultSet.TYPE_SCROLL_INSENSITIVE, ResultSet.CONCUR_UPDATABLE); ResultSet rs = stmt.executeQuery(select history_id, value, days from history where ticker = '" + ticker + "' order by value_date"); {code} When I then try to update the "days" field, I get an SQLException telling me that the resultset is not updatable. However, if I remove the "order by" clause, I am able to update the data, but then my algorithm does not work as I need to traverse the data in a specific order. The quesion is: how do I create an updatable resultset using a sql-statement with an order by clause? Kind regards Karl Martin Lund                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    jschell wrote:
    Seems rather obvious to me that the exception specifically tells you that you can't do that.OP: I would guess it's because ORDER BY forces the database to read all the result rows into a temporary area, sort them, and then return them from this temporary area, as opposed to streaming the results. The extra step probably makes updateable result sets more difficult (or maybe not possible), so they opted not to do it.

  • Strange SQL problem (order by fieldname@text)

    Hi all,
    I 'm taking a strange problem in Oracle 9i.
    Why does this query work correctly? (look the order by clause)
    SELECT foo1,
    FROM vw_prat_vend1
    WHERE 1=1
    AND (ce_vcod = '30888.03P34')
    AND (TRIM (ce_piva) = '01931450363')
    AND ( ce_dofl IN ('VAR') )
    ORDER BY cd_prat@text
    It seems that Oracle ignores it.
    In the 11g version the same query goes wrong.
    Thank you.

    Indeed, very strange.
    I cannot come up with an explanation
    SQL> Select distinct object_type from user_objects Order by object_type@foofoo desc
    OBJECT_TYPE       
    VIEW              
    TYPE BODY         
    TYPE              
    TRIGGER           
    TABLE             
    SYNONYM           
    SEQUENCE          
    SCHEDULE          
    RULE SET          
    RULE              
    QUEUE             
    PROCEDURE         
    PACKAGE BODY      
    PACKAGE           
    LOB               
    JOB               
    JAVA SOURCE       
    JAVA CLASS        
    INDEX             
    FUNCTION          
    EVALUATION CONTEXT
    DATABASE LINK     
    22 rows selected.
    BANNER                                                                         
    Oracle Database 11g Enterprise Edition Release 11.2.0.2.0 - 64bit Production   
    1 row selected.

  • SQL Statement order of execution within batch

    Hi all, 
    Can someone please explain the purpose of the GO command in SSMS. MSDN states it is used to signal the end of a batch of statements. I am trying understand the reasons you need this e.g. variable scope?, statement order of execution?
    In particular, I'm concerned with the order of exuction...for example, with the following two statements:
    use AdventureWorks2012;
    select * from [Sales].[SalesOrderHeader];
    Is there any risk that SQL server will attempt to execute the second statement before completing the first?
    Thanks inadvance.

    Sorry Shriven - I somehow initially missed this part of your answer....ignore my original reply. Thanks.
    --It will always execute in order
    SELECT GETDATE() AS CURRENT_DATETIME INTO #TEMP3  
    WAITFOR DELAY '00:00:10';-- 10 Seconds Delay
    SELECT GETDATE()
    WAITFOR DELAY '00:00:15';-- 15 Seconds Delay
    SELECT * FROM #TEMP3 

  • Oracle SQL execution order Issues, i how to fix it in OBIEE. My God.

    i create business model in Admin Tools, the model just like below sql ( viewA and viewB both are view):
    select distinct b.name
    from viewA a, viewB b
    where a.con_id = b.con_id
    and a.b_id = b.id
    and b.b_id=4
    and a.student_id=1234
    but i use this sql only can get one result(incorrect result).
    if i change it to below sql, it can get 2 result(correct result), my questions is i cant control table execute order in answer. so i how to fix this issues .please give me some advices. thanks
    select /*+ ordered */ distinct b.name
    from
    viewA a,
    viewB b
    where a.con_id = b.con_id
    and a.b_id = b.id
    and b.b_id=4
    and a.student_id=1234
    ;

    It seems that you can't choose the order. It use always the dimension before the fact table.
    To resolve your issue, I will ask me why I have to add the ordered hint to have the good result.
    How many record do you have when you performed :
    select a.b_id
    from viewA a
    where a.student_id=1234and
    select b.b_id, b.name
    from viewB b
    where b.b_id=4What means b_id ?

  • ERROR: GENERATE SQL COLUMNS ORDER

    Hi:
    in entities (ERD) i've numbered the sequence of columns ... ie:
    attributes of entities
    name sequence
    cod_client 10
    name 20
    postal_code 30
    etc...
    but when i generate the SQL script to create tables they appear
    to be misplaces... disordered... what's wrong ? there's no order
    at all... neither foreign keys or primary keys have order...
    so my table appears like this
    name
    postal_code
    cod_client
    with columns disordered!!!
    what i need to do ?
    I use designer 6i R2 !
    thankx in advance!!
    Ricardo

    Hi,
    This is indeed a problem.
    What you can do is after you have run the DDT, in the Design
    Editor, change the sequencing again back to the one you had given
    while creating the entity.This is the only workaround as for now.
    Vishal

Maybe you are looking for

  • Find my macbook pro

    My brother can't seem to find his macbook pro. I was wondering maybe there was something like "Find My iPhone" that can help find the macbook pro.

  • Can the desktop menu bar be hidden?

    I would like for the menu bar to be hidden until I want to use it, i.e. mouse over it to make it appear.  Can this be done?

  • HT203180 Cannot transfer movie to iphone

    I keep getting a box that says that this movie cannot be played on your iphone. I have the iphone 4. Anyway to fix this

  • Photoshop cs5 folder inside cs6 installation?

    should there be an adobe photoshop cs5 folder when i've only installed cs6 master colelction? clean installation, no previous installs. when i try to launch the photoshop.exe in the cs5 folder, i receive an error. i'm assuming this is part of a norma

  • Got this error 0x4004f00c with MS OFFICE 2013

    HI, I have downloaded MS OFFICE 2013 with the help of my school which inc the SN I did it in August, yesterday , when  I open ms word, I got this message, need to activate this office, 3 days left ..... I notice underneath thee is this error : got th