Query not returing the Data

All / Experts,
Can we use a.invoices in the IN clause of the below query:
select a.user_id, count(*) Download
from (
select '''' || to_char(replace ( substr(details, 26 , instr( details , '<' , 1,3)-26 ) , ',', ''',''' ) || '''') as invoices , actinguserid as user_id
from bchistevent where bucket = 201301
and upper(type) = 'COM.AVOLENT.PRESENTATION.EVENT.INVOICEDOWNLOADEVENT'
--and    bchistevent.bucket = to_char (add_months (sysdate, -1),'YYYYMM')
) a,
bcbillsumm b
where b.stmtnum in (a.invoices)
group by a.user_id;
I am not getting the result.
However, by placing the values such as '395452997-000-20130103' in the IN clause is working fine.
Any help here will be appreciated.
Regards
Oracle User

oracle user wrote:
This is working for the a.invoices where value is coming as 395453127-000-20130103 or 300000590-000-20090723, but the query is not working where the a.invoices vale is coming as 300084670-000-20120906, 300084671-000-20120906 or 300084670-000-20120906, 300084671-000-20120906, 300084679-000-20120906.XML was supposed to kill off the CSV file. XML allows us to specify data structures on the fly, like this:
<invoices>
  <invoice_no>300084670-000-20120906</invoice_no>
  <invoice_no>300084671-000-20120906</invoice_no>
</invoices>So why oh why do you have comma separated values in an XML data structure? It's just insane. In fact, it's almost a Daily WTF CodeSOD. It's definitely a sidebar.
Anyway, as you were. You will need to write a string tokenizer to split the {font:courier new}DETAILS{font} string into a nested table of invoice tokens.
Cheers, APC

Similar Messages

  • View the .rtf file not display the data in BI Publisher Enterprise.

    Hi,
    Platform: OBIEE 10g in NT XPsp2
    View the .rtf file not display the data in BI Publisher Enterprise.
    Step 1, I created Answer-request, create .rtf file with Word and add the request name, Add bar chart and table, preview PDF is working fine with data, Upload this template to Answers, View Template from Answer is working fine with data.
    Step 2, Answers – More Products > BI Publisher > My Folders > Create a new report > Edit > Data Model > New > Type: SQL Query > Data Source: Oracle BI EE > Query Builder > from SupplierSales assign Customer, Periods, Sales Facts (select Region, state, Year, Units Shipped) > Results > Save > Save
    Click Layouts > New > enter Name ….. > Click Layouts > borrows .rtf file in Manage T file > Upload > Save > Click View
    It is showing only the .rtf file without data. Why there is no data?
    Please guide me to solve this issue.
    Thanks,
    Jo

    Thanks for you reply,
    Our scenario is this report is basically a dissconnected mode report... we are developing these reports for mobile clients.
    We dint face this kind of issue while developing other reports.
    So please let us know if you have any idea on why we are facing this issue.
    Regards,
    Maneesh

  • Strange scenario,Oracle can not display the data in mysql correctly

    I use Heterogeneous Service+ODBC to achieve "oracle access mysql"(any other method?),and now i find Oracle can not display the data in mysql correctly:
    -------mysql------------
    mysql> create table tst(id int,name varchar(10));
    Query OK, 0 rows affected (0.00 sec)
    mysql> insert into tst values(1,'a');
    Query OK, 1 row affected (0.00 sec)
    mysql> select * from tst;
    ------------+
    | id | name |
    ------------+
    | 1 | a |
    ------------+
    1 row in set (0.00 sec)
    mysql> show create table tst\G
    *************************** 1. row ***************************
    Table: tst
    Create Table: CREATE TABLE `tst` (
    `id` int(11) DEFAULT NULL,
    `name` varchar(10) DEFAULT NULL
    ) ENGINE=MyISAM DEFAULT CHARSET=utf8
    1 row in set (0.00 sec)
    -------------oracle ------------------
    SQL> select count(*) from "tst"@mysql;
    COUNT(*)
    49
    SQL> select * from "tst"@mysql;
    id
    1
    SQL> desc "tst"@mysql;
    Name Null? Type
    id NUMBER(10)

    You can make the following query on the result page:
    "select * from the_table where movietitle = ? and cinema = ?"
    then you set movietitle and cinema to those which the user selected. If the resultset contains more than 0 rows, that means the movie is available.
    Below is the sample code, it assumes you have a connection to the database:
    PreparedStatement stat = myConnection.prepareStatement("select * from the_table where movietitle = ? and cinema = ?");
    stat.setString(1, usersMovieTitleSelection);
    stat.setString(2, usersCinemaSelection);
    ResultSet res = stat.executeQuery();
    if (res.next()) {
    out.print("The movie is available");
    } else {
    out.print("The movie is not available");
    }Now just add that to your JSP page. Enjoy ! =)

  • Any idea what this errorr means? the data type of the reference does not match the data type of the variable

    I am using Veristand 2014, Scan Engine and EtherCat Custom Device.  I have not had this error before, but I was trying to deploy my System Definition File (run) to the Target (cRio 9024 with 6 modules) and it failed. It wouldn't even try to communicate with the target. I get the 'connection refused' error.  
    I created a new Veristand project
    I added the Scan Engine and EtherCat custom device.
    I changed the IP address and auto-detected my modules
    i noticed tat Veristand didn't find one of my modules that was there earlier. (this week)
     So, i went to NiMax to make sure software was installed and even reinstalled Scan Engine and Veristand just to make sure.
    Now, it finds the module, but when i go to deploy it getsto the last step of deploying the code to the target, and then it fails.
    Any thoughts?
    Start Date: 4/10/2015 11:48 AM
    • Loading System Definition file: C:\Users\Public\Documents\National Instruments\NI VeriStand 2014\Projects\testChassis\testChassis.nivssdf
    • Initializing TCP subsystem...
    • Starting TCP Loops...
    • Connection established with target Controller.
    • Preparing to synchronize with targets...
    • Querying the active System Definition file from the targets...
    • Stopping TCP loops.
    Waiting for TCP loops to shut down...
    • TCP loops shut down successfully.
    • Unloading System Definition file...
    • Connection with target Controller has been lost.
    • Start Date: 4/10/2015 11:48 AM
    • Loading System Definition file: C:\Users\Public\Documents\National Instruments\NI VeriStand 2014\Projects\testChassis\testChassis.nivssdf
    • Preparing to deploy the System Definition to the targets...
    • Compiling the System Definition file...
    • Initializing TCP subsystem...
    • Starting TCP Loops...
    • Connection established with target Controller.
    • Sending reset command to all targets...
    • Preparing to deploy files to the targets...
    • Starting download for target Controller...
    • Opening FTP session to IP 10.12.0.48...
    • Processing Action on Deploy VIs...
    • Setting target scan rate to 10000 (uSec)... Done.
    • Gathering target dependency files...
    • Downloading testChassis.nivssdf [92 kB] (file 1 of 4)
    • Downloading testChassis_Controller.nivsdat [204 kB] (file 2 of 4)
    • Downloading CalibrationData.nivscal [0 kB] (file 3 of 4)
    • Downloading testChassis_Controller.nivsparam [0 kB] (file 4 of 4)
    • Closing FTP session...
    • Files successfully deployed to the targets.
    • Starting deployment group 1...
    The VeriStand Gateway encountered an error while deploying the System Definition file.
    Details:
    Error -66212 occurred at Project Window.lvlibroject Window.vi >> Project Window.lvlib:Command Loop.vi >> NI_VS Workspace ExecutionAPI.lvlib:NI VeriStand - Connect to System.vi
    Possible reason(s):
    LabVIEW: The data type of the reference does not match the data type of the variable.
    =========================
    NI VeriStand: NI VeriStand Engine.lvlib:VeriStand Engine Wrapper (RT).vi >> NI VeriStand Engine.lvlib:VeriStand Engine.vi >> NI VeriStand Engine.lvlib:VeriStand Engine State Machine.vi >> NI VeriStand Engine.lvlib:Initialize Inline Custom Devices.vi >> Custom Devices Storage.lvlib:Initialize Device (HW Interface).vi
    • Sending reset command to all targets...
    • Stopping TCP loops.
    Waiting for TCP loops to shut down...
    • TCP loops shut down successfully.
    • Unloading System Definition file...
    • Connection with target Controller has been lost.

    Can you deploy if you only have the two 9401 modules in the chassis (no other modules) and in the sysdef?  I meant to ask if you could attach your system definition file to the forum post so we can see it as well (sorry for the confusion).  
    Are you using any of the specialty configurations for the 9401 modules? (ex: counter, PWM, quadrature, etc)
    You will probably want to post this on the support page for the Scan Engine/EtherCAT Custom Device: https://decibel.ni.com/content/thread/8671  
    Custom devices aren't officially supported by NI, so technical questions and issues are handled on the above page.
    Kevin W.
    Applications Engineer
    National Instruments

  • Final user's can not see the data due to limited authorization.

    We have created a InfoSet with three info Objects, 0Account, 0Costcenter and 0COMP_CODE. 0Costcenter have an attribute retail location  0RT_LOCATIO.
    0RT_LOCATIO is an authorization relevant object. We as consultants can execute the infoset properly, but final user's with limited authorizations can not see the data because of authorization failier
    We hae several options to solve the issue, deleselect the auth. flag in the infoobject; delete the infoobject from the attributes of the cost center or create an authorization object and assign it to the final user's profile. But we don't want to go that way.
    My question is, is there any way to avoid including this attribute in the infoset definition? We are not using it in the query and we don't need it, so if we could delete it from the infoset (in the same way you add or delete infoobjects from an Infocube) without changing the cost center aster data, we will have our problem solved.
    Does anyone how to do this (if possible)?
    Thanks in advance!

    Just do two things to find the authorization check failed for that user.
    1. Execute SU53 output and find out the authoirzation check failed. If yes, please send that to BASIS Team.
    2. Next one, switch on the authorization trace in ST01 and ask that user to see that data. if the user is failed with authorization issue. switch off the trace in ST01 and find out the issue.
    Do this way, if it is not successful you can go for any other alternate way.
    Hope this would help you.

  • Query to get the data of all the columns in a table except any one column

    Can anyone please tell how to write a query to get the data of all the columns in a table except one particular column..
    For Example:
    Let us consider the EMP table.,
    From this table except the column comm all the remaining columns of the table should be listed
    For this we can write a query like this..
    Select empno, ename, job, mgr, sal, hiredate, deptno from emp;
    Just to avoid only one column, I mentioned all the remaining ( 7 ) columns of the table in the query..
    As the EMP table consists only 8 columns, it doesn't seem much difficult to mention all the columns in the query,
    but if a table have 100 columns in the table, then do we have to mention all the columns in the query..?
    Is there any other way of writing the query to get the required result..?
    Thanks..

    Your best best it to just list all the columns. Any other method will just cause more headaches and complicated code.
    If you really need to list all the columns for a table because you don't want to type them, just use something like...
    SQL> ed
    Wrote file afiedt.buf
      1  select trim(',' from sys_connect_by_path(column_name,',')) as columns
      2  from (select column_name, row_number() over (order by column_id) as column_id
      3        from user_tab_cols
      4        where column_name not in ('COMM')
      5        and   table_name = 'EMP'
      6       )
      7  where connect_by_isleaf = 1
      8  connect by column_id = prior column_id + 1
      9* start with column_id = 1
    SQL> /
    COLUMNS
    EMPNO,ENAME,JOB,MGR,HIREDATE,SAL,DEPTNO
    SQL>

  • Report is not fetching the data from Aggregate..

    Hi All,
    I am  facing the problem  in aggregates..
    For example when i  am running the report using Tcode RSRT2, the BW report is not fetching the data from Aggregates.. instead going into the aggregate it is scanning whole cube Data....
    FYI.. Checked the characteristcis is exactely matching with aggregates..
    and also it is giving the  message as:
    <b>Characteristic 0G_CWWPTY is compressed but is not in the aggregate/query</b>
    Can some body explain me about this error message.. pls let me know solution asap..
    Thankyou in advance.
    With regards,
    Hari

    Hi
    Deactivate the aggregates and then rebuild the indexes and then activate the aggregates again.
    GTR

  • BizTalk Tracking Profile Editor not tracking the data and how to implement the Orchestration as wcf service over SSL

    Hi Ashwinprabhu,
    thank you very much for your answer.
    i have one more query, I have orchestration published as wcf service in IIS and internally orchestration calling one more service , it means orchestration sending a request and getting response back from the service.
    actually we are implementing the copy of that called service through biztalk orchestration for system automatic and tracking failed messages and n/w failures.
    But tracking profiler not tracking the Data.
    And we need to develop the http service as https(Over SSL), we implemented in iis using self 
    signed certificate, it is working just browser for wsdl(in browser), we are not able to test the service in wcf test client, it is giving wsdl error, in wsdl schema reference showing with HTTP only,
    please help me how to resolve the issue.
    Teegala

    First things first, I think it's best to publish only schemas as WCF service for dependency management reasons. That said - WSDL availability is covered in the WCF adapter under the behaviors. If you're using HTTPBasic this may be hard to modify, but using
    WCFCustom allows you to add the WSDL behavior and specify that it should be available via HTTPS.
    As to the BAM, are you using TPE within the orchestration or at the port level?  I'd imagine your TPE tracks the start and end events of your orchestration using the Orchestration Schedule.  If you're fairly confident that the TPE is correct and
    yet don't see BAM data 1) make sure your SQL Agent is running healthy and all jobs look OK and 2) check the TDDS tables in both the message box and the BAMPrimaryImport databases.  These will show you if there has been some sort of sync issue. There's
    even a TDDS errors tables - so check that out.
    Kind Regards,
    -Dan
    If this answers your question, please Mark as Answer

  • Could not convert the data value due to reasons other than sign mismatch or overflow. ADSI Provider

    I'm trying to run the following query against Active Directory using the ADSI Provider using SSMS 2012 SP1:
    SELECT
    TOP901
    *FROMOpenQuery
      ADSI
    'SELECT description
      FROM  ''LDAP://OU=MMICorporate,DC=mmis,DC=mi,DC=com''
      WHERE objectClass =  ''User''
    and objectcategory = ''Person''
    and ''userAccountControl:1.2.840.113556.1.4.803:''<>2
    )AStblADSI
    Msg 7346, Level 16, State 2, Line 2
    Cannot get the data of the row from the OLE DB provider "ADsDSOObject" for linked server "ADSI". Could not convert the data value due to reasons other than sign mismatch or overflow.
    I only have this issue querying the Description Field. 
    I also found a hotfix KB: 887474 for this but it is for Windows 2003.  SQL Server OS I have is Server 2008 R2.  Is there a fix for 2008 R2?
    Thanks

    Thanks for the quick response.
    I checked out the link and I can only convert to Ul8 and when I try I get the same error:
    SELECT
    TOP901
    *FROMOpenQuery
      ADSI
    'SELECT name, convert(UI8, description)
      FROM  ''LDAP://OU=MMICorporate,DC=mmis,DC=mi,DC=com''
      WHERE objectClass =  ''User''
    and objectcategory = ''Person''
    and ''userAccountControl:1.2.840.113556.1.4.803:''<>2
    )AStblADSI
    Am I missing something?
    Thanks

  • MDX Query not retuern any data on my production server when i check service it is running

    Hi All,
    MDX Query not return any data  on my production server when i check service it is running. when i restart my service  i can able to run MDX Query and get data in my production server.

    Hi Mnishcal,
    According to your description, there is no data returned before restart Analysis Services, right?
    We haven't experiencing such issue before. And we cannot reproduce this issue. In your scenario, can you reproduce this issue? Here is a post which explains why you might not see the data you expect when browsing a SQL Server Analysis Services cube that
    processed successfully. Please refer to the link below.
    http://social.technet.microsoft.com/wiki/contents/articles/19744.ssas-troubleshooting-data-is-not-visible-when-browsing-a-cube.aspx
    Besides, are there any error on the log file? The msmdsrv.log file for the SSAS instance that can be found in \log folder of the instance. (C:\Program Files\Microsoft SQL Server\MSAS10.MSSQLSERVER\OLAP\Log)
    Regards,
    Charlie Liao
    TechNet Community Support

  • " Can not interpret the data in file " error while uploading the data in DB

    Dear All ,
    After running the below report I am getting the " Can not interpret the data in file " error.
    Need to upload the data in DB through excel or .txt file.
    Kindly advise to resolve the issue.
    REPORT  ZTEST_4.
    data : it like ZPRINT_LOC occurs 0 with header line,
    FILETABLE type table of FILE_TABLE,
    wa_filetable like line of filetable,
    wa_filename type string,
    rc type i.
    CALL METHOD CL_GUI_FRONTEND_SERVICES=>FILE_OPEN_DIALOG
    CHANGING
    FILE_TABLE = filetable
    RC = rc.
    IF SY-SUBRC = 0.
    read table filetable into wa_filetable index 1.
    move wa_filetable-FILENAME to wa_filename.
    Else.
    Write: / 'HI'.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    start-of-selection.
    CALL FUNCTION 'GUI_UPLOAD'
    EXPORTING
    FILENAME = wa_filename
    FILETYPE = 'ASC'
    HAS_FIELD_SEPARATOR = 'X'
    TABLES
    DATA_TAB = it.
    IF SY-SUBRC = 0.
    Write: / 'HI'.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    insert ZPRINT_LOC from table it.
    if sy-subrc = 0.
    commit work.
    else.
    rollback work.
    endif.
    Regards
    Machindra Patade
    Edited by: Machindra Patade on Apr 9, 2010 1:34 PM

    Dear dedeepya reddy,
    Not able to upload the excel but have sucess to upload the .csv file to db through the below code. Thanks for your advise.
    REPORT  ZTEST_3.
             internal table declaration
    DATA: itab TYPE STANDARD TABLE OF ZPRINT_LOC,
          wa LIKE LINE OF itab,
          wa1 like line of itab.
                       variable  declaration
    DATA: v_excel_string(2000) TYPE c,
           v_file LIKE v_excel_string VALUE    'C:\Documents and Settings\devadm\Desktop\test.csv',  " name of the file
            delimiter TYPE c VALUE ' '.         " delimiter with default value space
         read the file from the application server
      OPEN DATASET v_file FOR INPUT IN TEXT MODE ENCODING DEFAULT.
    IF sy-subrc NE 0.
    write:/ 'error opening file'.
      ELSE.
        WHILE ( sy-subrc EQ 0 ).
          READ DATASET v_file INTO wa.
          IF NOT wa IS INITIAL.
            append wa TO itab.
          ENDIF.
          CLEAR wa.
        ENDWHILE.
      ENDIF.
    CLOSE DATASET v_file.
    EXEC SQL.
         TRUNCATE TABLE "ZPRINT_LOC"
    ENDEXEC.
    *------display the data from the internal table
    LOOP AT itab into wa1.
    WRITE:/ wa1-mandt,wa1-zloc_code,wa1-zloc_desc,wa1-zloc,wa1-zstate.
    ENDLOOP.
    insert ZPRINT_LOC from table itab.

  • Refernce Nav igational Attribute is not getting the data in Infoprovider

    Hi,
    I am facing the issue with Reference Characteristic which is  a navigational attribute for which data  is not getting populated in the cube.Please find the below scenario.
    We have three characteristics 0RECV_WBS_E , 0WBS_ELEMT, ZPSBUSA .Char 0RECV_WBS_E is reference of 0WBS_ELEMT.
    0RECV_WBS_E__ZPSBUSA,0WBS_ELEMT__ZPSBUSA are the Navigational attributes of ZPSBUSA, these two are maintained as Navigational attributes in the cube and at info object level. The Nav Attribute  0RECV_WBS_E__ZPSBUSA is not getting the data in infocube where as 0WBS_ELEMT__ZPSBUSA is getting the data .The data is available for the two Nav attributes in the info object ZPSBUSA .Can you please suggest why this reference Nav attribute  0RECV_WBS_E__ZPSBUSA is not getting data in the infocube.
    Thanks,
    SUbhash

    Hi,
    I am facing the issue with Reference Characteristic which is a navigational attribute for which data is not getting populated in the cube.Please find the below scenario.
    We have three characteristics 0RECV_WBS_E , 0WBS_ELEMT, ZPSBUSA .Char 0RECV_WBS_E is reference of 0WBS_ELEMT.
    0RECV_WBS_E__ZPSBUSA,0WBS_ELEMT__ZPSBUSA are the Navigational attributes of 0WBS_ELEMT, these two are maintained as Navigational attributes in the cube and at info object level. The Nav Attribute 0RECV_WBS_E__ZPSBUSA is not getting the data in infocube where as 0WBS_ELEMT__ZPSBUSA is getting the data .The data is available for the two Nav attributes in the info object 0WBS_ELEMT .Can you please suggest why this reference Nav attribute 0RECV_WBS_E__ZPSBUSA is not getting data in the infocube.
    Thanks,
    SUbhash
    Edited by: MarkSubhash on Dec 9, 2011 11:11 AM

  • "BP Category 1 does not fit the data in category 2"  "Replies Appreciated"

    Hi Gurus,
    When i am trying to create an "Individual Account" in UI, I am getting the error "BP Category 1 does not fit the data in category 2".
    If i try to create a "group" then it says "BP Category 3 does not fit the data in category 2".
    It allows me to create only "Corporate Account" i..e. Category 2.
    What should i do to create "Individual Account" and "Group". (Category1 & Category 3).
    Individual Account (Category 1) - "BP Category 1 does not fit the data in category 2".
    Corporate Account (Category 2) - Able to create only Corporate Account
    Group (Category 3) - "BP Category 3 does not fit the data in category 2".
    Thanks & Regards
    Rohan

    Hi Rohan,
    Hope this SAP Note : 1232459, Solves your problem.
    You might have created a custom configuration for corporate accounts.
    Unfortunately in case of custom configurations exist, they are selected with higher priority.
    So in this case the configuration for corporate accounts is also shown for individual accounts,
    this causes error.
    In order to solve this problem, create a custom configuration for individual account also,
    i.e for view BP_HEAD/AccountDetails. Object type BP_ACCOUNT and object subtype INDIVIDUAL.
    Please make sure that the custom configuration includes the fields firstname and lastname for
    persons instead of name1 and name2 which are only allowed for corporate accounts.
    I hope the above information resolves your problem.
    Best Regards
    Shiven

  • I am not getting the data in Bex from the cube

    Hi Experts,
    i am not getting the data from the cube to Bex,
    cube having the data, but i am not able to see this data in the Bex result area.
    Can  any one help me.
    Best regards,
    Bhaskar

    Hi
    In the manage cube, is reporting symbol is there for your requests
    If you have any red requests delete them and refresh
    If all requests having reporting symbols you may check the BEx without any filters or selection criterions
    Regards
    N Ganesh

  • Who worked with ICS' Model 4896 GPIB? I can not count the data from the module. Can prompt as it to make. It is desirable with examples (data read-out from the module and data transmission between channels. It is in advance grateful.

    I can not count the data from the module. Can prompt as it to make. It is desirable with examples (data read-out from the module and data transmission between channels. It is in advance grateful.

    Hello. Most of the engineers in developer exchange are more familiar
    with NI products. Contacting ICS for technical support is a better
    course of action.

Maybe you are looking for

  • Imac G5 will not start up correctly? invalid directory count 52 instead of 53

    Hi, i have a Imac G5. it had been working fine for many years untill a year or 2 ago when it stopped all of a sudden and just would not start up as it should. instead, it went to this grey screen with horizontal lines. eventually after trying just ab

  • JDev 10.1.3 EA: Error initializing Embedded OC4J

    I have installed the latest EA version of JDeveloper on a Linux machine along with JDK 5.0 and when I try to run anything I get: [Starting OC4J using the following ports: HTTP=8988, RMI=23891, JMS=9227.] **** Unable to obtain password from principals

  • WD MyCloud - Time Machine Couldn't Complete The Backup; how to fix?

    I use Time Machine to backup my 3TB iMac (v. 10.8.5) with a 4TB WD MyCloud drive. It has worked fine for a few months, until I one day received the message "Time Machine couldn't complete the backup to "*******". An error occurred while copying files

  • Problem with amount of songs in iPod

    My 4G ipod with no extras like pictures, playlists, or whatever can only fit about 250 songs on it. what gives?

  • Advanced restore problems

    I have an Apple Power PCG5 with leopard 10.5.8 operating system. I  used Apple's Mac Backup (updated version) program to do a successful  "advanced backup" of photoshop files in "documents".  There were about 5GB of files and it took around 2-1/2 hou