in

Paging Sql generates invalid code for Oracle

Last post 03-24-2008 10:49 AM by ej2. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 03-24-2008 10:49 AM

    • ej2
    • Not Ranked
    • Joined on 01-09-2008
    • Posts 1

    Paging Sql generates invalid code for Oracle

    I followed the directions on the Webcast: Using Paging using an Oracle Database and got the following error:

    SQL Error: ORA-00911: invalid character

    00911. 00000 - "invalid character"

    *Cause: identifiers may not start with any ASCII character other than letters and numbers. $#_ are also allowed after the first character. Identifiers enclosed by doublequotes may contain any character other than a doublequote. Alternative quotes (q'#...#') cannot use spaces, tabs, or carriage returns as delimiters. For all other contexts, consult the SQL Language Reference Manual.

     

    So I checked the query it generated, and the problem is the query uses underscores. Here is the source from OracleDataProvider's GetSelectSql for generating the query:

     string cteFormat = "with __PagedTable ({0}, __RowIndex) as (Select {1}, Row_Number() OVER ({2}) as '__RowIndex' FROM [{3}] {4})Select {0}, __RowIndex FROM __PagedTable where __RowIndex >= {5} and __RowIndex < {6} Order by __RowIndex";

    How should I fix this? Thanks.


     

     

    http://devicezero.com
    Filed under: , ,
Page 1 of 1 (1 items)