DB Link fetches garbage column data

Dear All,
Following query run fine:
select * from table_name@linkname;
However, if I mention column names then returned data is corrupted, for ex:
select column_name1, column_name1 from table_name@linkname;
On top of this, if I add sysdate as a column then query runs fine, for ex:
select column_name1, column_name1, sysdate from table_name@linkname;
Thanks in advance, an urgent reply will be appreciated.
Hashir Ahmed

Thanks Satish for taking interest.
A boolean column value is returned as :
-40001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
A second boolean column is returned as:
-0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001208925768814547771495799
But both columns in fact contain 0 in original table and not all boolean value columns are corrupted. Furthermore, an Arabic data is returned as Chinese.
I know it sound foolish but this is the most weird problem I ever encountered with Oracle.
Both master & slave DBs are 10g 10.1.0.2.0.
Hashir Ahmed

Similar Messages

  • View Objects Fetch depth with View Links while creating Service Data Object

    Hi ,
    I am trying to create SDO's for my Business components.
    Here are my Entities & relations :
    Entity Objects : 1) EmployeeEo 2) DepartmentEO 3) PropertyEO
    And corresponding View Objects 1) EmployeeVO 2) DepartmentVO 3) PropertyVO.
    Associations : Employee -> Dept (m:1) , Employee -> Property (1:M) , And corresponding View Links as well.
    When i expose the VO's in AM like :
    DepartmentVO, with EmployeeVO from dept_emp_view link => This fetches all the data from Dept-> Employees -> Property
    However i don't want the tree fetch to be like that , i want to have my fetch restricted to only one level ie Dept-> Employees
    and a different fetch for Employees -> Property .
    Please suggest.
    Thanks !!

    Was able to do it by extending VO

  • How to get document library column data through Programmatically

    HI,
    I have one scenario..here i have to get the particular document library column data...Like fetching List data.
    In LIST We will do LIke this:
    using (SPSite site = new SPSite(SPContext.Current.Site.Url))
                using (SPWeb web = site.OpenWeb())
                    SPList list = web.Lists["ListName"];
                    SPListItem item = list.Items.Add();              
                    item["Title"] = txtTitle.Text;
    item.update()
       But here we want to fetch  data from document library column data....
    I did following way....can any one suggest me....
    using (SPSite site = new SPSite(SPContext.Current.Site.Url))
                using (SPWeb web = site.OpenWeb())
                    SPDocumentLibrary documentLib = web.Lists["DocumentName"] as SPDocumentLibrary;
                    SPListItem items = documentLib.Items.Add();
    Thanks.....

    Hi,
    The code that you have posted is adding data to the list or document library. Do you want to add or fetch data from or to document library?
    You can refer following link for Inserting/Updating documents in document library:
    http://blogs.perficient.com/microsoft/2009/04/working-with-documents-stored-in-sharepoint-document-library-programmatically/
    For fetching data from document library, you can use following code:
    using (SPSite site = new SPSite(SPContext.Current.Site.Url))
    using (SPWeb web = site.OpenWeb())
    string documentLibName = "Doc_Lib_Name";
    SPFolder docLibrary = web.GetFolder(documentLibName);
    foreach (SPFile file in docLibrary.Files)
    var customColValue = file.Item["Custom_Column_Name"];
    Hope this helps!
    Regards, Shruti

  • Dashboard Prompt that does not link to any column

    Hi,
    This might be a basic question but I am missing something here.
    How can we create a dashboard Prompt that is not linked to any columns? This prompt has to be a drop down with two values to choose from.
    1. Accounting
    2. Operational
    The value chosen in this prompt will be used for calculations in my reports. The calculation for Accounting and Operational is different.
    I do NOT have these two values in any of the columns.
    Please suggest on how can I do this.
    This is OBIEE 10.1.3
    Your help is very appreciated

    SELECT 'Accounting' FROM "Subject area"
    where Time."Date"=current_date
    union all
    SELECT 'Operational' FROM "Subject area"
    where Time."Date"=current_date
    Pls mark as correct/helpful

  • Query Question - Linking in Time Span Data to Point-in-Time References

    I am trying to pull historical data from a time-span table of records, using another point-in-time reference. I have been unsuccessful.
    I've thrown some sample tables and data together to illustrate what I am seeking:
    Create Table EmployeeInfo (
           id Number(10,0),               -- Employee ID Number
           Name VarChar2(32 Byte),        -- Employee Name
           CurrentShift VarChar2(2 Byte)  -- Current Employee Shift
    Create Table ShiftChanges (
           id Number(10,0),               -- Employee ID that this shift change record is for
           ChangeDate Date,               -- Date that this Change Took Place
           OldShift VarChar2(2 Byte),
           NewShift VarChar2(2 Byte)
    Create Table TimeCard(
           id Number(10,0),               -- Employee ID Number for this Timecard
           WorkDay Date,                  -- What Day is this Timecard for?
           Hours Float(63)                -- Number of Hours worked.
    COMMIT;
    INSERT INTO EmployeeInfo VALUES (100,'John Doe','Days')
    INSERT INTO EmployeeInfo VALUES (101,'Jane Doe','Days');
    INSERT INTO TimeCard VALUES (100, to_date('01012010','ddmmyyyy'), 10.5);
    INSERT INTO TimeCard VALUES (101, to_date('01012010','ddmmyyyy'), 10);
    INSERT INTO TimeCard VALUES (100, to_date('02012010','ddmmyyyy'), 9);
    INSERT INTO TimeCard VALUES (101, to_date('02012010','ddmmyyyy'), 10.5);
    INSERT INTO TimeCard VALUES (100, to_date('03012010','ddmmyyyy'), 8);
    INSERT INTO TimeCard VALUES (101, to_date('03012010','ddmmyyyy'), 7);
    INSERT INTO ShiftChanges VALUES (100, to_date('02012010','ddmmyyyy'), 'Nights', 'Days');
    COMMIT;I could do a query such as:
    SELECT TC.id,
           EM.Name,
           TC.Workday,
           EM.CurrentShift AS Shift
    FROM   TimeCard TC,
           EmployeeInfo EM
    WHERE  (TC.ID=EM.ID(+));But it will not give me the historical shift, only the current. Since John Doe changed shifts on Jan 2 from Nights to Days, the above query would not reflect it.
    I have attempted to join the historical table using a less-than operator. This doesn't work since more than one row can be returned.
    SELECT TC.id,
           EM.Name,
           TC.Workday,
           SC.NewShift AS Shift
    FROM   TimeCard TC,
           EmployeeInfo EM,
           ShiftChanges SC
    WHERE  (TC.ID=EM.ID(+)) AND
           (TC.ID=SC.ID(+) AND TC.WORKDAY<=SC.WORKDAY(+));The problem stems from the fact that you need to examine multiple records in one table in order to obtain the correct historical data for the other.
    The following SQL script {color:green}does work{color} - if the values are defined ahead of time.
    DEFINE EMPID=101;
    DEFINE CHGDATE=to_date('01/01/2010','dd/mm/yyyy');
    SELECT SQ.Shift
    FROM   (SELECT  ShiftChanges.NewShift AS Shift,
                    RANK() OVER (ORDER BY ShiftChanges.ChangeDate DESC) R
            FROM    ShiftChanges
            WHERE   ShiftChanges.id = &EMPID AND
                    ShiftChanges.ChangeDate <= &CHGDATE
            ) SQ
    WHERE R = 1However, I have been unsuccessful in adapting it to the example tables I provided. If I insert the query as an inline subquery* in the select statement, it won't work, since the criteria is nested two levels down, and I can only get parent values within the first level.
    I haven't thought of a way I can do this using a nested subquery - I keep running into that problem - how do you link in Time-Span data with a point-in-time reference.
    Any ideas / enlightening thoughts?
    Thank You
    {size:8}_SELECT * FROM V$VERSION information:_
    Oracle9i Enterprise Edition Release 9.2.0.8.0 - Production
    PL/SQL Release 9.2.0.8.0 - Production
    "CORE     9.2.0.8.0     Production"
    TNS for 32-bit Windows: Version 9.2.0.8.0 - Production
    NLSRTL Version 9.2.0.8.0 - Production
    {size}
    user10879184 re-wrote the original post on 29-Mar-2010 1:21 PM to reflect suggestions made by poster.

    I changed the tables to hold VARCHAR2(6) shift information and your query to reference the ChangeDate column.
    I also assume you meant to link a TimeCard entry with the most previous ShiftChange entry rather than one that occurs after the time worked (TC.WORKDAY>=SC.CHANGEDATE(+) rather than TC.WORKDAY<=SC.CHANGEDATE(+)):
    Another issue you don't take into account the case where there has been no shift change. In that event you need the current shift from the EmployeeInfo table which is taken care of with the NVL function.
    You correctly note that multiple shift change records will result in duplicate TimeCard records though your test data fails to check for that condition. I added this row:
    SQL> INSERT INTO ShiftChanges VALUES (100, to_date('03012010','ddmmyyyy'), 'Days', 'Nights'); Now it is apparent
    SQL> SELECT TC.id,
      2         EM.Name,
      3         TC.Workday,
      4         NVL(SC.NewShift,EM.CurrentShift) AS Shift
      5  FROM   TimeCard TC,
      6         EmployeeInfo EM,
      7         ShiftChanges SC
      8  WHERE  TC.ID=EM.ID(+) AND
      9         TC.ID=SC.ID(+) AND TC.WORKDAY>=SC.CHANGEDATE(+);
            ID NAME                             WORKDAY   SHIFT
           100 John Doe                         01-JAN-10 Days
           100 John Doe                         02-JAN-10 Days
           100 John Doe                         03-JAN-10 Days
           100 John Doe                         03-JAN-10 Nights
           101 Jane Doe                         01-JAN-10 Days
           101 Jane Doe                         02-JAN-10 Days
           101 Jane Doe                         03-JAN-10 Days
    7 rows selected.The reason for the duplicate Jan3 time is the two shift change records. We are matching both ShiftChange records that occured before the 3rd.
    We also see that your test data has John starting out on Days and then shifting from Nights to Days on the 2nd for no real change. Fixing that:
    SQL> DELETE from ShiftChanges where ID = 100;
    2 rows deleted.
    SQL> INSERT INTO ShiftChanges VALUES (100, to_date('02012010','ddmmyyyy'), 'Days', 'Nights');
    1 row created.
    SQL> INSERT INTO ShiftChanges VALUES (100, to_date('03012010','ddmmyyyy'), 'Nights', 'Days');
    1 row created.Then:
    SQL> SELECT TC.id,
      2         EM.Name,
      3         TC.Workday,
      4         NVL(SC.NewShift,EM.CurrentShift) AS Shift
      5  FROM   TimeCard TC,
      6         EmployeeInfo EM,
      7         (SELECT ID, Workday, ChangeDate, NewShift
      8          FROM
      9                 (SELECT TC2.ID, TC2.Workday, SC2.ChangeDate, SC2.Newshift,
    10                         MAX (SC2.ChangeDate) KEEP (DENSE_RANK LAST ORDER BY SC2.ChangeDate)
    11                                              OVER (PARTITION BY SC2.ID, TC2.Workday) AS Max_ChangeDate
    12                  FROM   ShiftChanges SC2,
    13                         TimeCard TC2
    14                  WHERE  TC2.Workday >= SC2.ChangeDate
    15                  AND    TC2.ID = SC2.ID
    16                  )
    17          WHERE   ChangeDate = Max_ChangeDate
    18          ) SC
    19  WHERE  TC.ID=EM.ID(+) AND
    20         TC.ID=SC.ID(+) AND
    21         TC.Workday=SC.ChangeDate(+) AND
    22         TC.Workday = SC.Workday(+);
            ID NAME                             WORKDAY   SHIFT
           100 John Doe                         01-JAN-10 Days
           100 John Doe                         02-JAN-10 Nights
           100 John Doe                         03-JAN-10 Days
           101 Jane Doe                         01-JAN-10 Days
           101 Jane Doe                         02-JAN-10 Days
           101 Jane Doe                         03-JAN-10 Days
    6 rows selected.The inline view finds the greatest ChangeDate less than the TimeCard Workday for each Workday.

  • Trying to fetch previous month data

    hi ...
    i have to develope a report in which cutomer on selecting month from the prompt , i have to show transactions for that selected month,transactions for previous month and growth %.
    for fetching previous month data i am using the below formula in column
    FILTER(etxnmistopbr.tot_txns USING (etxnmistopb(TIMESTAMPADD(SQL_TSI_MONTH, -1,etxnmistopbr.month_year)))
    but it doesnt fetch any result.
    i have tried
    FILTER(etxnmistopbr.tot_txns USING (etxnmistopbr.month_year= TIMESTAMPADD(SQL_TSI_MONTH,-1,timestamp '@{current_year}{2012}-@{current_month}{07}-31 00:00:00')))
    where current_year and current_month are presentation variable
    but it throws error as "
    HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 46046] Datetime value 2012-8-31 00:00:00 does not match the specified format. (HY000) "
    can anyone please help how to retrieve previous month data and current month data
    Edited by: 8826 on Sep 27, 2012 4:31 AM

    I would recommend using Time Series Functions, specifically the Ago function in the RPD. This is precisely what they have been designed for and is a very powerful feature of OBIEE. This removes the need for complex formulae embedded within result columns (which you will have to replicate each time you create a new analysis).
    The syntax of the Ago function is as simple as:-
    AGO(Measure, Time Dimension Level, Number of Periods Ago) e.g.
    AGO(Core."Fact - Project Cost".Cost, Core."Date - Fiscal Calendar"."Fiscal Period", 1)
    Please mark if helpful/answered.
    Andy.

  • Copying Long Raw Column Data to another table

    hi everyone,
    i am trying to Copy Long Raw Column Data to another table in the same schema. this is the situation
    Table A (col1 number,col2 long raw) with 100 records
    Table B (col1 number,col2 long raw) with 0 records
    now i want to copy col2 of the table A into the column 2 of the table B. but long raw data cant be retrieved in a select statement so is there any specific procedure that will copy long raw data or there is any simple way.
    i will be really grateful for anybody's help.
    thanx
    shakeel

    Dust off that old SQL*PLUS command "COPY" ...
    create table tablea (col1 number,col2 long raw)
    insert into tablea values (1, testrawio.chartoraw('this is line one'));
    insert into tablea values (2, testrawio.chartoraw('this is line two'));
    insert into tablea values (3, testrawio.chartoraw('this is line three'));
    create table tableb (col1 number,col2 long raw)
    copy from scott/tiger@larry insert tableb (col1, col2) using select col1, col2 from tablea
    Array fetch/bind size is 15. (arraysize is 15)
    Will commit when done. (copycommit is 0)
    Maximum long size is 80. (long is 80)
       3 rows selected from scott@tiger.
       3 rows inserted into TABLEB.
       3 rows committed into TABLEB at DEFAULT HOST connection.
    SQL>Now to prove it has worked :
    begin
       for lr in (select col1, col2 from tableb)
       loop
          dbms_output.put_line('col1 = '||lr.col1||
                               ' and col2 contains long raw equivalent of '||testrawio.rawtochar(lr.col2));
       end loop;
    end;
    col1 = 1 and col2 contains long raw equivalent of this is line one
    col1 = 2 and col2 contains long raw equivalent of this is line two
    col1 = 3 and col2 contains long raw equivalent of this is line three
    PL/SQL procedure successfully completed.
    SQL> Note : In order to load some test data and prove the method works I made use of a package called "testrawio" located at http://www.classicity.com/oracle/htdocs/forums/ClsyForumID125/7.html
    AMM

  • Splitting Column Data in a Ticker View

    Hi All,
    How to split the column data into Rows rather in a Single Row in a Ticker View?
    I have created a Request with 3 columns viz., Emp ID, EName and Salary. In Ticker View, diplaying the data in 3 rows. But, I would like to display the data as we see in a Table Format i.e.,
    1 John 10000
    2 Allen 15000
    Instead of
    1 2
    John Allen
    10000 15000
    Thanks,
    -Vency

    Hi,
    Thanks for giving Reply.
    I knew that we can use HTML tags. I have done with Creating Table and used @{Column_Number} in Row Format.
    <Table><tr><td>@2</td></tr><tr><td>@3</td></tr></Table>
    Here, @2 is a Second Column Data is occupying only one row i.e., displaying John Allen. But I need to display Allen in the next line as I gave the example in the previous post. I am not getting the way How can I Split that @2 into multiple rows.
    Is you are expecting me to do in other way? please suggest..
    Thank You,
    -Vency

  • Show Column Data In One Row

    Hello,
    Tell Me how i can show a single column data in one row.
    10
    20
    30
    To
    10,20,30

    If you are OK with displaying comma separated list or column data you could:
    SQL> select  ltrim(sys_connect_by_path(ename,','),',') ename_list
      2    from  (
      3           select  ename,
      4                   row_number() over(order by 1) rn,
      5                   count(*) over() cnt
      6             from  emp
      7          )
      8    where rn = cnt
      9    start with rn = 1
    10    connect by rn = prior rn + 1
    11  /
    ENAME_LIST
    SMITH,ALLEN,WARD,JONES,MARTIN,BLAKE,MILLER,SCOTT,KING,TURNER,ADAMS,JAMES,FORD,CLARK
    SQL> To display as separate columns you would need to either know number of rows:
    SQL> select  min(case rn when 1 then ename else null end) ename1,
      2          min(case rn when 2 then ename else null end) ename2,
      3          min(case rn when 3 then ename else null end) ename3,
      4          min(case rn when 4 then ename else null end) ename4,
      5          min(case rn when 5 then ename else null end) ename5,
      6          min(case rn when 6 then ename else null end) ename6,
      7          min(case rn when 7 then ename else null end) ename7,
      8          min(case rn when 8 then ename else null end) ename8,
      9          min(case rn when 9 then ename else null end) ename9,
    10          min(case rn when 10 then ename else null end) ename10,
    11          min(case rn when 11 then ename else null end) ename11,
    12          min(case rn when 12 then ename else null end) ename12
    13    from  (
    14           select  ename,
    15                   rownum rn
    16             from  emp
    17          )
    18  /
    ENAME1  ENAME2  ENAME3  ENAME4  ENAME5  ENAME6  ENAME7  ENAME8  ENAME9  ENAME10  ENAME11  ENAME12
    SMITH   ALLEN   WARD    JONES   MARTIN  BLAKE   CLARK   SCOTT   KING    TURNER   ADAMS    JAMES
    SQL> or use dynamic SQL.
    SY.

  • Can i see the column DATA(BLOB type) in PM_OBJECTS of DCM schema

    we installed DCM managed clustering .it is Database repository type.
    i am trying to see the column DATA(BLOB type) in PM_OBJECTS of DCM schema .
    I wrote a program in java to read blob data type and write it into a temporary file.
    when i open temporary files all the data in junk format.
    can i see the real data of thatcolumn.Is it possible?
    first of all for what purpose DCM shema will be used?

    Hi,
    There is no option to show the comments on the diagram.
    We plan to add such feature in the next version.
    Ivan

  • Creating a Link on the Column Heading

    Good afternoon,
    I know with reports, you can create a link for each cell in the report attributes section. My question is it there's any way to create a link for the column header without hard coding it into the query that generating the results.
    Thanks in advance,
    Ivan

    Ivan,
    If you are using the classical reports, you have the option of creating column header using pl-sql block which will be dynamic. Thanks
    Regards,
    Manish

  • How to fetch year till date value for earning for current ,last and year

    hi,
    how to fetch year till date value for earning for current ,last and year before that from payroll result
    plz reply soon,
    pratyush

    Dear Pratyush,
    Pick this from CRT.
    Use LDB PNPCE & Fire event GET PAYROLL &
    then you can pick from CRT.
    Hope this helps.
    Kindly reward in case useful.
    Regards & Thanks,
    Darshan Mulmule

  • How to set up a column link to the column attribute in a report

    Hi All
    I have 6 column in a sql report in a page, column names are (Devicename devicerole,from etc).
    Now i need to set a link to this column and this need to link to the another page
    Thanks & Regards
    Srikkanth.M
    Edited by: Srikkanth.M on Apr 6, 2011 6:17 PM

    Hi
    Read this and follow it...
    >
    Go to the report attributes, then click on the edit link button by the side of the column you want to be a link to get to the column attributes.
    >
    So...
    1. Go to edit the page that contains your report.
    2. Click on the report region as if you were going to edit the report query.
    3. Click the Report Attributes tab.
    4. Click the button at the side of the column in question.
    5. Scroll down to the Column Link section and fill in the details.
    I really can't put it much more simply than that...
    Cheers
    Ben

  • Store the value  in BLOB column data type

    Hi All,
    I have a file of about 5MB. I want to store this in BLOB column data type of a table.
    Can we compress this file to store and when we take uncompress the same...or how do we do it.
    and what is the procedure to store this....
    pls. help me
    Thanks,
    Naresh

    Hi skud
    i juast want to store the agent code to variable.if i did get ur point...
    Why don't u just use a simple assign statment for example...
    DECLARE
    V_VALUE  NUMBER;
    BEGIN
    V_VALUE := LC354 ; -- IF it was a value as LC354 static i mean
    -- or u could use any value
    V_VALUE := :ur_form_item_name; --- if it was dynamic
    END;That's it .
    Hope this helps...
    Regards,
    Ammatu Allah.

  • How to create multiple links in one column

    Hi,
    Could someone please help me with creating 2 different links in one column as below.
    I enclosed is the screen shot of my current application view... I would like to put the link one below the other in one column instead in two different columns.
    Table Name - SR_PROCESS
    Functions - get_open_project , get_open_be
    Columns - ''Initiate New Project'' , ''Initiate New Bug or Enhancement''
    Below is my coding.
    select
    ''Initiate New Project'' AS "Initiate New Project" ,
    get_open_project("SR_PROCESS"."PROCESS_ID") "Open Projects",
    ''Initiate New Bug or Enhancement'' AS "Initiate New Bug" ,
    get_open_be("SR_PROCESS"."PROCESS_ID") "Open Bugs"
    from SR_PROCESS
    Thanks, Sheetal

    976745 wrote:
    Hi,Welcome to the forum: please read the FAQ and forum sticky threads (if you haven't done so already), and update your profile with a real handle instead of "976745".
    When you have a problem you'll get a faster, more effective response by including as much relevant information as possible upfront. This should include:
    <li>Full APEX version
    <li>Full DB/version/edition/host OS
    <li>Web server architecture (EPG, OHS or APEX listener/host OS)
    <li>Browser(s) and version(s) used
    <li>Theme
    <li>Template(s)
    <li>Region/item type(s) (making particular distinction as to whether a "report" is a standard report, an interactive report, or in fact an "updateable report" (i.e. a tabular form)
    With APEX we're also fortunate to have a great resource in apex.oracle.com where we can reproduce and share problems. Reproducing things there is the best way to troubleshoot most issues, especially those relating to layout and visual formatting. If you expect a detailed answer then it's appropriate for you to take on a significant part of the effort by getting as far as possible with an example of the problem on apex.oracle.com before asking for assistance with specific issues, which we can then see at first hand.
    Could someone please help me with creating 2 different links in one column as below.
    I enclosed is the screen shot of my current application view...Where is the screenshot? Providing an example on apex.oracle.com is a much better way to share details of your application.
    I would like to put the link one below the other in one column instead in two different columns.
    Table Name - SR_PROCESS
    Functions - get_open_project , get_open_be
    Columns - ''Initiate New Project'' , ''Initiate New Bug or Enhancement''
    Below is my coding.
    select
    ''Initiate New Project'' AS "Initiate New Project" ,
    get_open_project("SR_PROCESS"."PROCESS_ID") "Open Projects",
    ''Initiate New Bug or Enhancement'' AS "Initiate New Bug" ,
    get_open_be("SR_PROCESS"."PROCESS_ID") "Open Bugs"
    from SR_PROCESSDepends on your APEX version and the type of report. Please provide the information detailed above.

Maybe you are looking for