Using rowid in a query

We are using a function that takes the rowid of a table as an input parameter. Is there a way to access the rowid element of a table in OWB. I cannot see a way to do it within the tool.
Thanks you,
Matt

We are using OWB 10.1.xxx and I **still** don't see
ROWID! ROWID is the most efficient way of doing
updates if it is available Ummm. ROWID is a physical way of doing things, and star schema dessign and implementation is a pretty logical approach. Could I ask why you are using ROWID, please? After all, the star schema depends on synthetic keys between the Facts and the Dimensions. I am at a loss to understand where ROWID fits into this. I personally have never seen a situation where ROWID could even have been used.
Could you help me, please?
Regards,
Donna

Similar Messages

  • How to split the query using rowid

    can anybody pls tell me logic to spliting the sql query by using rowid through dba_extent...

    Using Parallel Execution will help if it is the DB that is the bottleneck, but if on the other hand it is your client program that is the bottleneck (and the DB is supplying the data as fast as it can) then splitting the query into rowid ranges and having multiple extract clients will have benefit.
    1) Each extract process should read DBA_EXTENTS for the given object and select the extents it should process (Ideally 1 extract process per Data File).
    2) Use the DBMS_ROWID.ROWID_CREATE to build low and high rowid ranges based on the BLOCK_ID and BLOCKS from DBA_EXTENTS. Note you will also have to look up the DATA_OBJECT_ID for the Table in question.
    Note. Because we won't know the Row Number of the last row in the last block, use the first row in the first block after the last block and then use <.
    3) Add the ROWID hint to your query.
    4) Use >= "Low Rowid" < "High Rowid" (Note. use of < rather than <=)
    This method is only safe when the table in question is not being updated, as each extract process will be running its own read consistent view, and so there is a danger that transaction updating 2 rows could have only half of the update extracted (if 1 row was in 1 extent after it had been extracted and another row was in another extent before it was extracted).
    Only 1 rowid range can be passed to the query at a time (you can supply more, but a ROWID access will no longer be performed, it will simply to a FTS).

  • Using ROWID returns less rows than if use distinct in query

    Hi,
    I am writting  the following query to get distinct purchase order number from a specific received date. this returns me total 620 rows.:
    select  distinct pha.segment1 from apps.po_headers_all pha, apps.RCV_TRANSACTIONS rcv
    where 1=1
    and trunc(rcv.transaction_date) between to_date(:P_FROM_DATE,'YYYY/MM/DD HH24:MI:SS') and to_date(:P_TO_DATE,'YYYY/MM/DD HH24:MI:SS')
    and pha.po_header_id=rcv.po_header_id
    and pha.type_lookup_code='STANDARD'
    and pha.authorization_status ='APPROVED'
    and pha.cancel_flag='N'
    if i write the query using ROWID to get the distinct Purchase order number its giving me 580 rows:
    select  pha.segment1 from apps.po_headers_all pha, apps.RCV_TRANSACTIONS rcv
    where 1=1
    and trunc(rcv.transaction_date) between to_date(:P_FROM_DATE,'YYYY/MM/DD HH24:MI:SS') and to_date(:P_TO_DATE,'YYYY/MM/DD HH24:MI:SS')
    and pha.po_header_id=rcv.po_header_id
    and rcv.rowid=(select max(rowid) from apps.RCV_TRANSACTIONS rcv where rcv.po_header_id=pha.po_header_id)
    and pha.type_lookup_code='STANDARD'
    and pha.authorization_status ='APPROVED'
    and pha.cancel_flag='N';
    Can anyone tell me why? I want to use this ROWID query in a valueset in oracle apps.

    That's probably because some purchase orders have rcv transactions out of the range (p_from_date, p_to_date). You should include the condition on the dates in the (select max(rowid)...) subquery as well. And more generally, the first query seems like a better/simpler choice than the second one.
    Hope it helps.

  • Using ROWID in the WHERE clause of a SELECT statement

    hi all,
    my team is trying to select a value from a table using the rowid as the selection criterion
    e.g. select column_name from table_name where rowid > 'AAA112BBBCCC12A'
    this query does not appear to return accurate results e.g. it return rows instead of two. my questions are:
    1. is this a legitimate approach?
    2. should we convert the row id to varchar2? if so how should this be done?
    thanks!

    SQL> select rowid,ename
      2  from emp;
    ROWID              ENAME
    AAAs8KAA+AAAVXCAAA KING
    AAAs8KAA+AAAVXCAAB BLAKE
    AAAs8KAA+AAAVXCAAC CLARK
    AAAs8KAA+AAAVXCAAD JONES
    AAAs8KAA+AAAVXCAAE SCOTT
    AAAs8KAA+AAAVXCAAF FORD
    AAAs8KAA+AAAVXCAAG SMITH
    AAAs8KAA+AAAVXCAAH ALLEN
    AAAs8KAA+AAAVXCAAI WARD
    AAAs8KAA+AAAVXCAAJ MARTIN
    AAAs8KAA+AAAVXCAAK TURNER
    AAAs8KAA+AAAVXCAAL ADAMS
    AAAs8KAA+AAAVXCAAM JAMES
    AAAs8KAA+AAAVXCAAN MILLER
    AAAs8KAA+AAAVXCAAO erwer
    15 rows selected.
    SQL> select ename from emp where rowid = 'AAAs8KAA+AAAVXCAAH';
    ENAME
    ALLEN
    SQL> select ename from emp where rowid > 'AAAs8KAA+AAAVXCAAH';
    ENAME
    WARD
    MARTIN
    TURNER
    ADAMS
    JAMES
    MILLER
    erwer
    7 rows selected.1) using rowid to access a record is the quickest way so it is legitimate
    however using > has no real purpose as you point out you cannot get any meaningful results returned.
    2) No real need to convert however beware storing values in tables as Oracle does not guarantee to preserve the format in different versions so upgrading from 9i to 10g would invalidate your data.

  • Error while deleting Records using ROWID

    Hi all
    I have a small PL/SQL Block which accepts the Table Name as the User Input and
    deletes duplicate records from that table using ROWID.
    SET SERVEROUTPUT ON
    SET VERIFY OFF
    PROMPT Script to Delete Duplicate Records from a Table using ROWID
    ACCEPT TAB_NAME PROMPT 'Enter the Table Name : '
    DECLARE
    v_tab_name VARCHAR2(50):='&TAB_NAME';
    BEGIN
    EXECUTE IMMEDIATE 'DELETE FROM v_tab_name AA WHERE AA.ROWID <> (SELECT MIN(B.ROWID) FROM v_tab_name B WHERE AA.ID=B.ID)';
    DBMS_OUTPUT.PUT_LINE('Duplicate Records Deleted');
    END;
    When i execute this query it errors out saying table or view does not exist.
    Anybody's help is kindly appreciated.
    Regards
    Nakul.V

    Dear Nakul.V!
    Please change your execute immediate statement as follows:
    EXECUTE IMMEDIATE 'DELETE FROM ' || v_tab_name || ' AA
                       WHERE AA.ROWID IN (SELECT MIN(B.ROWID)
                                          FROM' || v_tab_name || ' B
                                          WHERE AA.ID=B.ID)';Yours sincerely
    Florian W.

  • How to get rid of ROWID in Join query -- ORA-00918: column ambiguously defined

    Hi, All
    the source of my data block is from two tables Emp and Title. My select statements is:
    select a.name, b.title, b.start_date, b.end_date from Emp a, Title b where a.id = b.emp_id
    But at run time, I got "ORA-00918: column ambiguously defined"
    the wrapped statement becomes:
    SELECT ROWID,a.name, b.title, b.start_date, b.end_date from Emp a, Title b where a.id = b.emp_id
    I run the query in SQL*PLUS, found out it was ROWID caused problem.
    Can anybody tell me how to get rid of ROWID? or I missed something in datablock defination?
    Thanks in adance.
    Deborah

    I guess you are using oracle 7.x. In Oracle 8 and onwards, database lets you select ROWID from the views based on multiple views as long as view definition does not contain any aggregated functions or DISTINCT in it. Now coming back to forms ..Forms runtime engine uses ROWID to identify rows uniquely unless specified otherwise. If you are using forms 4.5/5.0 against Oracle 7.x , then change these properties and you should be able to run the form.
    BLOCK PROPERTY
    Key Mode : can be either updateable OR Non-updateable
    ( Certainly not 'Unique' .. That forces forms runtime engine to use ROWID to identify unique rows. )
    ITEM PROPERTY
    Identify one of the block items as unique. And then set the following property
    Primary Key : True.
    This should take care of rowid problem.
    Regards,
    Murali.
    Hi, All
    the source of my data block is from two tables Emp and Title. My select statements is:
    select a.name, b.title, b.start_date, b.end_date from Emp a, Title b where a.id = b.emp_id
    But at run time, I got "ORA-00918: column ambiguously defined"
    the wrapped statement becomes:
    SELECT ROWID,a.name, b.title, b.start_date, b.end_date from Emp a, Title b where a.id = b.emp_id
    I run the query in SQL*PLUS, found out it was ROWID caused problem.
    Can anybody tell me how to get rid of ROWID? or I missed something in datablock defination?
    Thanks in adance.
    Deborah

  • Using rowid in ref cursor

    Hi,
    I want to use rowid for updating the rows in the ref cursor. My code looks like below:
    DECLARE
    emp_refcursor SYS_REFCURSOR;
    emp_rec employee%ROWTYPE;
    l_run_id NUMBER;
    lv_sql_stmt VARCHAR2(4000) := 'SELECT a.* FROM employee a where a.run_id = :l_run_id ';
    OPEN emp_refcursor FOR lv_sql_stmt
    USING l_run_id;
    LOOP
    FETCH emp_refcursor
    INTO emp_rec;
    EXIT WHEN emp_refcursor%NOTFOUND;
    Here in lv_sql_stmt I want to include the rowid also so that I can use the update statement with the rowid. I cant directly add the rowid in the query as I am fetching the records in emp_rec which is of the rowtype of table EMPLOYEE.
    I want to use rowid for making the fetching of records faster.
    Please suggest e some ways to implement it.
    Thanks.
    Edited by: user12841217 on Mar 23, 2010 12:12 AM

    user12841217 wrote:
    Hi,
    I want to use rowid for updating the rows in the ref cursor.There are no rows in a ref cursor. Read the following:
    PL/SQL 101 : Understanding Ref Cursors :-
    PL/SQL 101 : Understanding Ref Cursors
    My code looks like below:
    DECLARE
    emp_refcursor SYS_REFCURSOR;
    emp_rec employee%ROWTYPE;
    l_run_id NUMBER;
    lv_sql_stmt VARCHAR2(4000) := 'SELECT a.* FROM employee a where a.run_id = :l_run_id ';
    OPEN emp_refcursor FOR lv_sql_stmt
    USING l_run_id;
    LOOP
    FETCH emp_refcursor
    INTO emp_rec;
    EXIT WHEN emp_refcursor%NOTFOUND;
    Here in lv_sql_stmt I want to include the rowid also so that I can use the update statement with the rowid. I cant directly add the rowid in the query as I am fetching the records in emp_rec which is of the rowtype of table EMPLOYEE.
    I want to use rowid for making the fetching of records faster.
    Please suggest e some ways to implement it. This sounds like half of the requirement. If you're already fetching the rows using your ref cursor, then why would you need the rowid to fetch them again?
    If you really need to include rowid in your query then you're going to have to fetch into a known defined structure rather than employee%ROWTYPE. This is what we call in the business... "design", which is usually based on "requirements". Know your requirements and implement a suitable design accordingly. A good design would seldom be selecting "*" within any query, as a good design would actually know what data is expected to be fetched.

  • Deletion of duplicates in the table with out using rowid

    How can I delete duplicates in the table with out using ROWID .

    hi
    sleect count(coulmnname),columnname from table
    group by columnname
    having count(columnname) > 1;
    find the primary key of the table
    apply the below query
    delete from table
    where (primary key,repeated column name )
    not in
    ( select min(primary key), repeated column
    from employee group by repeated column );
    use this in the primary key column use empid ,,,the repated column is ename
    empid ename
    1 sankar
    2 sankar
    try this one

  • How can i know which index will be used when executing the query ?

    1 ) I have query in which i have 3-4 tables but there multiple index on one column .
    so how can i know which index will be used when executing the query ?
    2) I have a query which ia taking too much time . how can i know which table is taking too much time ?
    3) Please Provide me some document of EXplain plan ?

    Hi Jimmy,
    Consider the below example
    /* Formatted on 2011/02/04 21:59 (Formatter Plus v4.8.8) */
    CREATE TABLE FIRST AS
    SELECT * FROM all_objects;
    UPDATE FIRST
    SET object_name = 'TEST'
    WHERE owner != 'SCOTT';
    CREATE INDEX idx_first ON FIRST(object_name);
    SELECT *
    FROM FIRST
    WHERE object_name = 'TEST';
    It has not used index
    Execution Plan
    Plan hash value: 2265626682
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 58678 | 7334K| 163 (4)| 00:00:02 |
    |* 1 | TABLE ACCESS FULL| FIRST | 58678 | 7334K| 163 (4)| 00:00:02 |
    /* Formatted on 2011/02/04 21:59 (Formatter Plus v4.8.8) */
    SELECT *
    FROM FIRST
    WHERE object_name = 'emp';
    This has used the index
    Execution Plan
    Plan hash value: 1184810458
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 1 | 128 | 1 (0)| 00:00:01 |
    | 1 | TABLE ACCESS BY INDEX ROWID| FIRST | 1 | 128 | 1 (0)| 00:00:01 |
    |* 2 | INDEX RANGE SCAN | IDX_FIRST | 1 | | 1 (0)| 00:00:01 |
    From this we can come to the conclusion that, whether to use one index or not by oracle
    would also depend on the data which is present in the table. This has to be this way as
    we see in the bind peeking, if oracle sticks to only one plan, say only use the full table
    scan, it would be a performance hit when it searches for the second query ie where object_name
    ='emp';
    2.
    If we have a query like below.
    select * from emp
    where upper(ename) = upper(:p_ename);
    Evenif we have the index on ename column, oracle wouldn't be able to use the index, as there is a function in the predicate column. If you need oracle to use the index, we need to create a function based index as below.
    Create index idx_ename on emp(upper(ename));
    Regards,
    Cool

  • How to use the same POWL query for multiple users

    Hello,
    I have defined a POWL query which executes properly. But if I map the same POWL query to 2 portal users and the 2 portal users try to access the same page simultaneously then it gives an error message to one of the users that
    "Query 'ABC' is already open in another session."
    where 'ABC' is the query name.
    Can you please tell me how to use the same POWL query for multiple users ?
    A fast reply would be highly appreciated.
    Thanks and Regards,
    Sandhya

    Batch processing usually involves using actions you have recorded.  In Action you can insert Path that can be used during processing documents.  Path have some size so you may want to only process document that have the same size.  Look in the Actions Palette fly-out menu for insert path.  It inserts|records the current document work path into the action being worked on and when the action is played it inserts the path into the document as the current work path..

  • Powershell use Connection String to query Database and write to Excel

    Right now I have a powershell script that uses ODBC to query SQL Server 2008 / 2012 database and write to EXCEL
    $excel = New-Object -Com Excel.Application
    $excel.Visible = $True
    $wb = $Excel.Workbooks.Add()
    $ws = $wb.Worksheets.Item(1)
    $ws.name = "GUP Download Activity"
    $qt = $ws.QueryTables.Add("ODBC;DSN=$DSN;UID=$username;PWD=$password", $ws.Range("A1"), $SQL_Statement)
    if ($qt.Refresh()){
    $ws.Activate()
    $ws.Select()
    $excel.Rows.Item(1).HorizontalAlignment = $xlCenter
    $excel.Rows.Item(1).VerticalAlignment = $xlTop
    $excel.Rows.Item("1:1").Font.Name = "Calibri"
    $excel.Rows.Item("1:1").Font.Size = 11
    $excel.Rows.Item("1:1").Font.Bold = $true
    $filename = "D:\Script\Reports\Status_$a.xlsx"
    if (test-path $filename ) { rm $filename }
    $wb.SaveAs($filename, $xlOpenXMLWorkbook) #save as an XML Workbook (xslx)
    $wb.Saved = $True #flag it as being saved
    $wb.Close() #close the document
    $Excel.Quit() #and the instance of Excel
    $wb = $Null #set all variables that point to Excel objects to null
    $ws = $Null #makes sure Excel deflates
    $Excel=$Null #let the air out
    I would like to use connection string to query the database and write results to EXCEL, i.e.
    $SQL_Statement = "SELECT ..."
    $conn = New-Object System.Data.SqlClient.SqlConnection
    $conn.ConnectionString = "Server=10.10.10.10;Initial Catalog=mydatabase;User Id=$username;Password=$password;"
    $conn.Open()
    $cmd = New-Object System.Data.SqlClient.SqlCommand($SQL_Statement,$conn)
    do{
    try{
    $rdr = $cmd.ExecuteReader()
    while ($rdr.read()){
    $sql_output += ,@($rdr.GetValue(0), $rdr.GetValue(1))
    $transactionComplete = $true
    catch{
    $transactionComplete = $false
    }until ($transactionComplete)
    $conn.Close()
    How would I read the columns and data for $sql_output into an EXCEL worksheet. Where do I find these tutorials?

    Hi Q.P.Waverly,
    If you mean to export the data in $sql_output to excel document, please try to format the output with psobject:
    $sql_output=@()
    do{
    try{
    $rdr = $cmd.ExecuteReader()
    while ($rdr.read()){
    $sql_output+=New-Object PSObject -Property @{data1 = $rdr.GetValue(0);data2 =$rdr.GetValue(1)}
    $transactionComplete = $true
    catch{
    $transactionComplete = $false
    }until ($transactionComplete)
    $conn.Close()
    Then please try to use the cmdlet "Export-Csv" to export the data to excel like:
    $sql_output | Export-Csv d:\data.csv
    Or you can export to worksheet like:
    $excel = New-Object -ComObject Excel.Application
    $excel.Visible = $true
    $workbook = $excel.Workbooks.Add()
    $sheet = $workbook.ActiveSheet
    $counter = 0
    $sql_output | ForEach-Object {
    $counter++
    $sheet.cells.Item($counter,1) = $_.data1$sheet.cells.Item($counter,2) = $_.data2}
    Refer to:
    PowerShell and Excel: Fast, Safe, and Reliable
    If there is anything else regarding this issue, please feel free to post back.
    Best Regards,
    Anna Wang

  • How to use Results from Another Query for SAP BW universes

    Hi Everyone,
    I have two SAP BI universes.In my First universe I have Sales Doc no (dimension) and Orderqty (Measure) and in my second universe I have Sales Doc no(Dimension) and BillQty (Measure).
    Here in my first dataprovider I have 1200 rows of data and in second dataprovider I have 75,000 rows. The report should fetch only the BillQty details that matches to corresponding  Sales doc no in first data provider.
    I want to place all these fileds into a single report like as shown.
    (Datarpovider1)                (Datarpovider1)                    (Datarpovider2)
    *Sales Doc No*               Orderqty                           BillQty
    Here I am able to generate single report using merge dimension but it is leading to performance issues. I want to restrict the values at query level by passing the First dataprovider Sales doc no to second Data provider Sales doc number using Results from Anothery Query feature so that It can fetch only the matching records.
    I tried it but it was giving the follwing error:
    A filter contains a wrong value. You cannot run this query. (Error: WIS 00007)
    How Can I get rid of this error. Can we use Results from Anothery Query option for OLAP universe. Are there any limitation on it.
    All this I am doing in Webi Rich Client.
    Appreciate your help
    Thanks &in Advance
    Kiran Saka

    Hi Kiran,
    I think the filter has a wrong operand. For example, a filter with an empty constant, or a filter that deals with numeric values is defined with an alphanumeric value.Check out for this.
    Regards,
    Neeraj

  • ORA-12032: cannot use rowid column

    Hi,
    on 8.1.7 I have the following error :
    ORA-12032: cannot use rowid column from materialized view log on "string"."string"
    The solution is :
    Action: A complete refresh is required before the next fast refresh. Add ROWID columns to the materialized view log, if required.
    How can I do a complete refresh before the next fast refresh or Add ROWID columns ? How to know if Add ROWID columns is required ?
    Thank you.
    PS :
    my script is :
    START WITH TO_DATE('06-jul-2010 17:57:48','dd-mon-yyyy hh24:mi:ss')
    NEXT SYSDATE+1/24

    user522961 wrote:
    Hi,
    on 8.1.7 I have the following error :
    ORA-12032: cannot use rowid column from materialized view log on "string"."string"
    The solution is :
    Action: A complete refresh is required before the next fast refresh. Add ROWID columns to the materialized view log, if required.
    How can I do a complete refresh before the next fast refresh or Add ROWID columns ? How to know if Add ROWID columns is required ?
    Thank you.run above
    EXECUTE DBMS_MVIEW.REFRESH('MV_NAME','C');

  • When using TODATE function MDX query is not correctly generated

    Essbase 9.3.1.2 and OBIEE 10.1.3.4.1.
    When using TODATE function MDX query is not correctly generated.
    This leads to unexpected values not only on cumulative columns in report (generated with TODATE), but also other columns (calculated with AGO function or directly read from cube) have incorrect values.
    The problem occurs when you filter on a column that is not in the select list. If you filter on just one level of dimension, results are fine. You can filter on multiple dimensions as long as you filter on just one level of each dimension.
    If you filter on two or more levels of one dimension, than results are not correct. In some cases results for TODATE column are all zeros, in some cases it is a random value returned by Essbase (same random value for all rows of that column), and in some cases BI Server returns an error:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. Essbase Error: Network error [10054]: Cannot Send Data (HY000).
    Here is generated MDX code:
    With
    set [Grupe proizvoda2] as '{[Grupe proizvoda].[N4]}'
    set [Grupe proizvoda4] as 'Generate([Grupe proizvoda2], Descendants([Grupe proizvoda].currentmember, [Grupe proizvoda].Generations(4), leaves))'
    set [Segmentacija2] as '{[Segmentacija].[RETAIL]}'
    set [Segmentacija4] as 'Filter(Generate({[Segmentacija2]}, Descendants([Segmentacija].currentmember, [Segmentacija].Generations(4),SELF), ALL), ([Segmentacija].CurrentMember IS [Segmentacija].[AFFLUENT]))'
    set [Vrijeme3] as '{[Vrijeme].[MJESEC_4_2009]}'
    member [Segmentacija].[SegmentacijaCustomGroup]as 'Sum([Segmentacija4])', SOLVE_ORDER = AGGREGATION_SOLVEORDER
    member [Accounts].[MS1] as '(ParallelPeriod([Vrijeme].[Gen3,Vrijeme],2,[Vrijeme].currentmember), [Accounts].[Trosak kapitala])'
    member [Accounts].[MS2] as '(ParallelPeriod([Vrijeme].[Gen3,Vrijeme],1,[Vrijeme].currentmember), [Accounts].[Trosak kapitala])'
    member [Accounts].[MS3] as 'AGGREGATE({PeriodsToDate([Vrijeme].[Gen2,Vrijeme],[Vrijeme].currentmember)}, [Accounts].[Trosak kapitala])'
    select
    { [Accounts].[Trosak kapitala],
    [Accounts].[MS1],
    [Accounts].[MS2],
    [Accounts].[MS3]
    } on columns,
    NON EMPTY {crossjoin ({[Grupe proizvoda4]},{[Vrijeme3]})} properties ANCESTOR_NAMES, GEN_NUMBER on rows
    from [NISE.NISE]
    where ([Segmentacija].[SegmentacijaCustomGroup])
    If you remove part with TODATE function, the results are fine. If you leave TODATE function, OBIEE returns an error mentioned above. If you manually modify variable SOLVE_ORDER and set value to, for example, 100 instead of AGGREGATION_SOLVEORDER, results are OK.
    In all cases when this variable was modified in generated MDX, and query manually executed on Essabse, results were OK. This variable seems to be the possible problem.

    Hi,
    Version is
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bi
    PL/SQL Release 10.2.0.5.0 - Production
    CORE    10.2.0.5.0      Production
    TNS for 64-bit Windows: Version 10.2.0.5.0 - Production
    NLSRTL Version 10.2.0.5.0 - Production
    Sorry, in my last post i forgot to mention that i already created a function based index but still it is not using because, there is a UNIQUE constraint on that column.
    Thanks

  • How can I remove ASCII text from a field when I use it in a query

    How can I remove ASCII text from a field when I use it in a query?
    I am running a select statement on a table that appears to have ASCII text in some of the fields. If I use these fields in the where statement like the code below nothing returns:
    SELECT FIELD1 FROM TABLE1 WHERE FIELD1 IS NULL
    But the field looks empty if I do a straight select without the where clause. Additionally, one of the fields has text but appears to be padded out with ASCII text, which I need to strip out before I can use this field in a where or join statement. I have tried using a trim, ltrim, rtrim, to_char, nvl, decode and nothing works. When I use excel to run the same query it looks as if these ASCII fields are boxes.
    I have asked our DBA team to see what they can do to prevent these from going into the table, but in the mean time I still need to run this report.
    Do you have any suggestions?

    Can you provide an example? I've been trying (for
    example) "select translate(' test one', ascii(' '),
    'X') from dual" with no luck.
    Thank you.To replace space, you should query like this:
    select translate(' test one', chr(32), 'X') from dual instead of select translate(' test one', ascii(' '), 'X') from dual Thanks,
    Dharmesh Patel

Maybe you are looking for

  • Import of XML file failed in portal using XML Content and Action

    Hi Friends, I am trying to import the simple XML file which is just creating the folder in the PORTAL_CONTENT using XML CONTENT AND ACTIONS  which is one way of creating the portal content. GO TO SYSTEM ADMINISTRATION > TRANSPORT > XML CONTENT AND AC

  • Cannot download my purchased Adobe Acrobat 9 Pro?

    In 2008 I purchased Adobe Acrobat 9 Pro.  Now I cannot bring up my order or download the program.  What should I do?

  • Windows 7 64bit & Sony Clie SJ22

    Hi, I've been scouring the forum and am looking for a way to sync my wife's Clie to Windows 7 64bit.  I followed advice here and purchased a USB infrared adapter.  I was able to sync with it prior to the upgrade.  I do have Professional but my machin

  • TMP in filenames

    My Aperture Library is organized by year, month, and Project. Somehow working with the files has created a great number of files with names that end in _edTMP. These all appear to be duplicates of other files. What creates the _edTMP suffix and how c

  • 10g forms URL Portal

    Please help............................ We are going to 10g using the following URL through portal http://apphost1.univ-wea.com:7777/forms/frmservlet?form=jat_test&seperateframe=no The issue is when you click on uRL twice and call forms it locks up e