CrystalRpts - Excel Data source, SQLServer2005 table. SQL Query behavior?

Greetings - What should be a simple report (with Excel 2007 spreadsheet as primary data source linking to a SQLServer 2005 table ) returns incorrect results.  Query designed to select data from SQL Table with  'DATES >=' certain date, but data returned ignores the DATE qualifier.
Running DATE query manually against the SQL Table proves the data is correct. 
Anyone notice problems with SQL Query behavior when mixing data sources?  Thanks.

Hello,
Take the SQL that works outside of CR and then create a new report and add all data sources. Now use a Command Object and paste in your SQL. YOu may have to play with adding each data source in a different order. If that works great if not you'll have to figure out a way to get all the data into one source.
I believe MS SQL Server can link multiple data sources and types. Check SQL Help file for more info it it is possible.
Thank you
Don

Similar Messages

  • Setting pl/sql procedure as the data source in a Report Query

    Is there a way to set PL/SQL as the data source in a Report Query? we want to
    able to use the ReportQuery function and query results returned by a PL/SQL procedure.
    thanks

    Not exactly sure what you want to do, but on a ReportQuery you can set either a StoredProcedureCall, or an SQLCall.
    query.setCall(new StoredProcedureCall(...));
    query.setCall(new SQLCall("begin; my_proc(); end"));
    Now, a stored procedure in Oracle cannot return a result, so using a ReportQuery which requires a result may not make sense.
    You could instead use a DataModifyQuery.
    If you return results through output parameters (you must use a StoredProcedureCall for this) you could use a DataReadQuery or a ReadAllQuery/ReportQuery if you wish to build objects from the data.
    James : http://www.eclipselink.org

  • Want to load excel data into oracle table with out changing it to CSV

    Hello all,
    I have a requirement in dumping excel data into oracle database table without changing it to CSV file and this has to be used in normal sql/plsql environment i.e., pkg/procedure cant be used in the forms also...
    so, can u guys can help me out in this
    thanks.............

    The link Pavan provided discusses Oracle Heterogeneous Services. This allows you (using ODBC) to create a database link from Oracle to a non-Oracle data source like Excel. This would allow you to query the Excel data source from SQL*Plus or any other client tool. But that is probably going to require that your Oracle database is running on Windows since I'm not aware of any Excel ODBC drivers for Unix.
    Another potential option would be to write a Java stored procedure that parsed the file. There are a few different Java libraries that can read and write Excel data files. You could load one of those libraries into the database's JVM and then write Java code that parsed the file. You would then be able to call your Java stored procedure from PL/SQL.
    Justin

  • Data source - Invalid table name [66000-7]

    Hi,
    I created UDO with master table and child table and when I tried to execute on it a dbdatasource query I got this error Data source - Invalid table name [66000-7]. When I tried this query on system table it works perfectly, so I don't know where is the problem (it looks like DBDataSources.Query doesn't work on user tables).
    My code:
                    oDBDataSources = oForm.DataSources.DBDataSources.Add("@MyTable");
                    oConditions = (SAPbouiCOM.Conditions)(SBO_Application.CreateObject(BoCreatableObjectType.cot_Conditions));
                    oMatrix = (SAPbouiCOM.Matrix)(oForm.Items.Item("mtx_dzial").Specific);
                    oCondition = oConditions.Add();
                    oCondition.BracketOpenNum = 1;
                    oCondition.Alias = "U_MyDate";
                    oCondition.Operation = BoConditionOperation.co_BETWEEN;
                    oCondition.CondVal = "2008/10/01";
                    oCondition.CondVal = "2008/10/06";
                    oCondition.BracketCloseNum = 1;
                    oDBDataSources.Query(oConditions);
    Regards
    Ela

    Hi
    Look here the working example...
    Hope it can help you.
    Public Sub SBO_CreateForm()
      Dim oForm As SAPbouiCOM.Form
      Try
        Dim sUniqueID As String = "O99_" & Microsoft.VisualBasic.Format(Now.Millisecond, "0000")
        Dim sFormXmlFile As String = "MY_FORM_FILE.xml"
        ' Search for this function on this forum...
        Call ReplaceUIDandLoadToB1(sFormXmlFile, sUniqueID)
        oForm = SBO_Application.Forms.Item(sUniqueID)
        Call Matrix_SetConditions(oForm)
        oForm.Visible = True
      Catch ex As Exception
        If Not oForm Is Nothing Then
          oForm.Close()
          oForm = Nothing
        End If
      Finally
        System.GC.Collect() 'Release the handle to the table
      End Try
    End Sub
    Private Sub Matrix_SetConditions(ByRef oForm As SAPbouiCOM.Form)
      Dim oMatrix As SAPbouiCOM.Matrix
      Dim oConditions As SAPbouiCOM.Conditions
      Dim oCondition As SAPbouiCOM.Condition
      Try
        oMatrix = oForm.Items.Item("mtx00").Specific
        If oMatrix Is Nothing Then Throw New Exception("ERROR!...")
        oConditions = SBO_Application.CreateObject(BoCreatableObjectType.cot_Conditions)
        ' ++++++++++++++++++++++++++++++++++++++++++++
        If Not sItem1.Equals("") And Not sItem2.Equals("") Then
         '// AND (P.U_CodItem BETWEEN '" & s1.Trim & "' AND '" & s2.Trim & "')"
         oCondition = oConditions.Add
         oCondition.BracketOpenNum = 1
         oCondition.Alias = "U_CodItem"
         oCondition.Operation = co_BETWEEN
         oCondition.CondVal = sItem1
         oCondition.CondEndVal = sItem2
         oCondition.BracketCloseNum = 1
        Else
         If Not sItem1.Equals("") Then
             '// AND P.U_CodItem = '" & s1.Trim & "'"
             oCondition = oConditions.Add
             oCondition.Alias = "U_CodItem"
             oCondition.Operation = co_EQUAL
             oCondition.CondVal = sItem1.Trim
         End If
         If Not sItem2.Equals("") Then
             '// AND P.U_CodItem = '" & s1.Trim & "'"
             oCondition = oConditions.Add
             oCondition.Alias = "U_CodItem"
             oCondition.Operation = co_EQUAL
             oCondition.CondVal = sItem2.Trim
         End If
        End If
        ' other conditions ....
        '// Execute the query with the conditions collection
        oForm.DataSources.DBDataSources.Item("@O99_MY_TABLE_NAME_HERE").Query(oConditions)
        oMatrix.LoadFromDataSource()
        oMatrix.SelectionMode = BoMatrixSelect.ms_Single
      Catch ex As Exception
        ' log exception here
      Finally
        If Not oConditions Is Nothing Then If oConditions.Count > 0 Then glo_Conditions = oConditions
        System.GC.Collect()
      End Try
    End Sub
    In the xml file of my form I have added dbdatasource:
            <datasources>
              <dbdatasources>
                <action type="add">
                 <datasource tablename="@O99_MY_TABLE_NAME_HERE"/>
                </action>
              </dbdatasources>

  • Importing excel data into oracle tables

    Hello gurus,
    Importing excel data into oracle tables..
    I know this is the most common question on the thread ...First, i searched the forum, i found bunch of threads with loading data using sqlloader, converting excel into .Txt, tab delimited file, .csv file etc....
    Finally i was totally confused in terms how to get this done....
    Here is wat i have
       - Excel file on local computer.
       - i have laod data into dev environment tables(So no risk involved, but want to try something simple)
       - Oracle version 11.1.0.7
       - Sqlplus and toad (editors)
    Here is wat i like to do ....i dont know if its possible
        - Without going to unix server can i do everthing on local system by making use of oracle db and sqlplus or toad
       SQLLOADER might be one option...but i dont want to go the unix server for placing files and logs and stuff.
    Wat will be best and simplest option to do?? and wat format will best to convert from excel into csv, or txt or tab delimited etc.....
    If you suggest sqlloader, any code example will be greatly appriciated.
    Thank you so much!!!

    Hi,
    user642297 wrote:
    Imran,
    This is increadible option in toad!!! It works absolutely sweet!! I have toad 9.7 version. IT works great. Thank you so much!!You are welcome :)
    Well i have further discussion on this ....this option is great if you doing in staging or development area. What if your doing in prod?? If you automating the sqlloader then how do u do it?? I think we still need to stick with traditional approach of laoding data by making use of SQLLoader right ?? If m wrong please correct me.well, in our case, we do have access to a custom schema in prod where we create the staging table and load the data from datafiles.
    try this:
    load data
    infile 'C:\dest.csv'
    into table dest_table
    fields terminated by "~" optionally enclosed by '"'
    TRAILING NULLCOLS
    (name,
    owner_nm,
    description_column,
    UPDT_DT DATE 'MM/DD/YYYY')
    {code}
    you can get more info about sql loader and your error here:
    http://download.oracle.com/docs/cd/B10501_01/server.920/a96652/ch05.htm
    http://www.allinterview.com/showanswers/53766.html
    And one more quick question ...i found an example of control file , in that i see .dat format file. Is it a data file ?? can i try that option ?? But in excel i didnt see to convert the .dat format file.
    Any thoughts ???
    It is same as a delimiter text file.
    steps to create a .dat file (from a excel file):
    1. Insert a column between two columns and populate it with the delimiter (in our case, it is ~)
    2. Save the file as unicode text.
    3. Open the file in text editor and remove all the tabs (find an replace with blank)
    4. Save the file as "DEST.dat". Select encoding as UTF-8 while saving.
    5. Your .dat file is ready.
    Regards
    Imran
    Edited by: Imran Soudagar on Apr 22, 2010 10:22 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Access odbc data sources from PL/SQL

    Dear All,
    I would like to know is there any way where i could access odbc data sources from pl/sql (i.e i would like to insert, update records into MSAccess table from pl/sql procedures, triggers). Would appreciate any help regarding this.

    The only way I know of how is to write and external function library and use that to access ODBC datasource ...if someone else knows something else I would be interesting in hearing about that also.

  • I am trying to setup a data source for postgresql with cf10 update 14. i get a time out error retruned in less than 2 seconds. I setup a data source for MS SQL 2005 no problem.

    I need a little help, what have I done wrong or not done?
    Here is the error message that is returned;
    Connection verification failed for data source: Archuleta_xxxxxx
    java.sql.SQLException: Timed out trying to establish connection
    The root cause was that: java.sql.SQLException: Timed out trying to establish connection
    any ideas would be appreciated.

    I see this error in your output:
    2014-11-26 10:55:23,583 ERROR [ThemeAutoDeployer]
    java.io.FileNotFoundException: /tmp/liferay/com/liferay/portal/deploy/dependencies/liferay-theme.tld (Too many open files)
    I'm not across what the EBS recommended setting for this is, or if there is one.  But try running:
    ulimit -n
    ... and if the number is low, edit /etc/security/limits.conf , add some entries for increased "soft nofile" and "hard nofile" and run sysctl -p.  See Linux & Java tips: Too many open files .

  • Can we create prompts in Derived Table sql query

    Hi,
    I am trying to define derived table sql query as below. Though the syntax parsing is going through but when I am generating the report it is throwing and invalid prompt definition error.
    " select * from table_a where call_direction = @Prompt('Enter Call Direction','A','"derivedtable_a".SHORT_STRING',mono,free,not_persistent,) and
    where call_type = @Prompt('Enter Call Direction','A','"derivedtable_b".SHORT_STRING',mono,free,not_persistent,) "
    Can somebody please share your thoughts if this can be achieved in universe or not ?
    Appreciate immediate responses as it is a show stopper for my deliverable.
    Thanks in advance.
    Thanks and Regards,
    Shireen.

    Hi Shireen
    We can use prompt in the derived table. There is issue with the SQL that you have used while creating the Derived Table.
    Instead of using the "derivedtable_a".SHORT_STRING' field use the object from the class on which you are creating the derived table.
    For example: If you are creating a derived table in the sample universe efashion on Agg_yr_qt_rn_st_ln_ca_sr table then use the following query:
    SELECT *
    FROM Agg_yr_qt_rn_st_ln_ca_sr
    WHERE Agg_yr_qt_rn_st_ln_ca_sr.Yr = @Prompt ('Enter Value','C','Time Period\Year',mono,constrained)
    Hope this helps!
    Thanks

  • Upload excel data into Internal table

    Hi,
    I'm trying to upload excel data into internal table, well the excel file layout will be different on each run of the report.
    Excel file will have 60 columns and 500 record limit. I can upload the excel data using 'ALSM_EXCEL_TO_INTERNAL_TABLE' and 'KCD_EXCEL_OLE_TO_INT_CONVERT' but the output table is generates 60 lines for each record i.e.., 60 * 500 = 30,000 which could cause performance.
    I try with the FM 'TEXT_CONVERT_XLS_TO_SAP', but this will only work if the file structure is static. It didn't work for dynamic file layout. Even GUI_UPLOAD doesn't work to upload excel file, it will work if I convert the file to Tab delimited file.
    Please advise if you know any alternate procedure to upload excel data into internal table.
    Thanks,
    Kumar.

    Moderator message - Cross post locked
    Rob

  • The connection string for coded UI Data driven test using excel data source is not working

    Hello,
    I am using the visual studio 2012 coded UI test, i added the following connection strings to connect to an excel data source:
    [DataSource("System.Data.Odbc", "Dsn=Excel Files;Driver={Microsoft Excel Driver (*.xls)};dbq=C:\\Users\\shaza.said.ITWORX\\Desktop\\Automation\\On-track Automation Framework\\On-track_Automation\\Automation data file.xls;defaultdir=.;driverid=790;maxbuffersize=2048;pagetimeout=5;readonly=true",
    "Sheet1$", DataAccessMethod.Sequential), TestMethod]
    [DataSource("System.Data.Odbc", "Dsn=Excel Files;dbq=|DataDirectory|\\Automation data file.xls;defaultdir=C:\\Users\\shaza.said.ITWORX\\Desktop\\Automation\\On-track Automation Framework\\On-track_Automation\\Automation data file.xls;driverid=1046;maxbuffersize=2048;pagetimeout=5",
    "Sheet1$", DataAccessMethod.Sequential), TestMethod]
    But i get the following error:
    "The unit test adapter failed to connect to the data source or to read the data. For more information on troubleshooting this error, see "Troubleshooting Data-Driven Unit Tests" (http://go.microsoft.com/fwlink/?LinkId=62412) in the MSDN Library.
    Error details: ERROR [IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default driver specified"
    Thanks,
    Shaza

    Thanks for Adrian's help.
    Hi shaza,
    From the error message, I suggest you can refer the Adrian's suggestion to check the date source connection string correctly.
    In addition, you can refer the following about how to Create a Data-Driven Coded UI Test to check your issue:
    http://msdn.microsoft.com/en-us/library/ee624082.aspx
    Or you can also try to use a Configuration File to Define a Data Source for coded UI test.
    For example:
    <?xml
    version="1.0"
    encoding="utf-8"
    ?>
    <configuration>
    <configSections>
    <section
    name="microsoft.visualstudio.testtools"
    type="Microsoft.VisualStudio.TestTools.UnitTesting.TestConfigurationSection,
    Microsoft.VisualStudio.QualityTools.UnitTestFramework, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/>
    </configSections>
    <connectionStrings>
    <add
    name="ExcelConn"
    connectionString="Dsn=Excel Files;dbq=E:\Unit Test\AddClass\AddUnitTest\add.xlsx;defaultdir=.;
    driverid=790; maxbuffersize=2048; pagetimeout=60;"
    providerName="System.Data.Odbc"/>
    <add
    name="ExcelConn1"
    connectionString="Dsn=Excel Files;dbq=E:\Unit Test\AddClass\AddUnitTest\sum.xlsx;defaultdir=.;
    driverid=790;maxbuffersize=2048;pagetimeout=60"
    providerName="System.Data.Odbc"/>
    </connectionStrings>
    <microsoft.visualstudio.testtools>
    <dataSources>
    <add
    name="ExcelDS_Addition"
    connectionString="ExcelConn"
    dataTableName="Addition$"
    dataAccessMethod="Sequential"/>
    <add
    name="ExcelDS_Multiply"
    connectionString="ExcelConn1"
    dataTableName="Multiply$"
    dataAccessMethod="Sequential"/>
    </dataSources>
    </microsoft.visualstudio.testtools>
    </configuration>
    For more information, please see:https://msdn.microsoft.com/en-us/library/ms243192.aspx
    Best Regards,
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Data Source for MS SQL SERVER

    Need Help on how to add a data source from MS SQL Server. Please give an example using PUB as the database and the server is N12345\SQLSERVER. Thanks.

    Connecting to SQL 2000 server worked very easily. Make sure you start the SQL Server and the Sun Java Studio Creator IDE. In the Server Navigator pane, right click on the 'Data Sources' node and pick up the menu item' Add Source'. This brings up a dialogue box wherein you need to insert info regarding the hostname, password, database information etc. For a detailed screen shots of this you see my page at
    http://www.mysorian.com/htek. The last item in the scrolling page is the one you should look for.

  • How to configure data source for MS SQL 2005 Server.

    Good morning,
    While creating a data source for MS SQL 2005 Server, what are the values I should use for:
    Object Factory, DataSource Type, and CPDS Class Name values ?
    Thanks
    Seenu

    seenuFour wrote:
    Hi,
    I am working on a web application, the backend of which is a MS SQL 2005 server. I am creating a data source on the application server to manage the connection pool.
    Hence I need to give the following values while creating the data source:...
    Hence you need to provide some actual detail about what the context is.
    IIS runs "web applications" but your question would have no meaning in that context. On the other hand it might have some meaning if you were running Tomcat.

  • Help with Importing Excel Data into Formatted Tables

    This is my first post, here, so please be gentle!
    I am a relatively new user of InDesign CS4, and I am creating a 70-pg manufacturer's price book.  A very large portion of each page is going to be size and price information imported from a large Excel spreadsheet.
    I have created the table format that I'd like to use for each page, but the trouble comes when I import the Excel data into that table.  For some reason, when I import, it all dumps into one cell.  Would it be best to import as an unformatted table, and then format the table each time, or is there a way to simply import the data into my pre-formatted table?  I've seen how the former is done, but the latter seems much easier (...although that could be my inexperience talking).
    Any advice would be greatly appreciated!
    Thanks so much,
    Laura (V1500)

    Thank you both so much for your time!  This is exactly what I needed.
    Cheers
    Laura

  • How to get second maximum salary from employee table(sql query)

    how to get second maximum salary from employee table(sql query)

    dude there is no matter of structure .........that user already said its from employee table ...............its basic table in sql and there is no need to specify the table structure
    .........i think u got my point I think you are the one who didn't understand Sarma's point.
    Give a man a fish and you feed him once. Teach a man how to fish and you feed him a life long.
    >
    and the query is
    select max(sal) from emp where sal<(select max(sal)
    from emp);
    this will give the 2nd max salary from the emp tableBtw: You solution is bad, because it needs to scan and sort the table emp twice. And a better solution has been given already.
    Message was edited by:
    Sven W. - reordered statements

  • Error while reporting on Excel Data source

    Hello OBIEE Experts,
    I have created a rpd based on excel datasheet.
    Record counts are updated and when I try to retrieve records on Physical layer, sometimes I can view records and sometimes the following error message is displayed:
    [nQSError: 16001] ODBC error state: S0002 code: - 1305 message: [Microsoft][ODBC Excel Driver] The Microsoft Jet database engine could not find the object 'Hospital'. Make sure the object exists and that you spell its name and patha name correctly..
    [nQSError: 16002] Cannot obtain nuber of columns for the query result
    While creating the report on BI Answers getting the below error:
    View Display Error
    Odbc driver returned an error (SQLExecDirectW).
    Error Details
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 16001] ODBC error state: S0002 code: -1305 message: [Microsoft][ODBC Excel Driver] The Microsoft Jet database engine could not find the object 'Sales'. Make sure the object exists and that you spell its name and the path name correctly.. [nQSError: 16002] Cannot obtain number of columns for the query result. (HY000)
    SQL Issued: SELECT Sales.Site saw_0, Sales."Pt# Identifier" saw_1, Sales."Q1 Charges" saw_2 FROM HosNew ORDER BY saw_0, saw_1, saw_2
    Here, HosNew is the subject area name. I don't have any password for Administrator user. The Password is <blank>. Connection pool uses Call interface: ODBC 3.5
    Please help in solving this.
    Thanks.

    hi,
    Try replicating the data source again.
    After that go to RSDS x-action there give the data source name and source system name and do restore and activations from there .
    After check if you were able to create x-fer rules first.
    Thanks
    Mukesh

Maybe you are looking for

  • How can i block the adversing in my macbook

    Ich möchte Webung von mein Mackoob Blokieren

  • Ticker in SUN idm....

    When we log in into the Identity Manager , we have a option of enabling or disabling the TICKER. What i found is, that this ticker is being called from the idm/home/index.jsp which references the following class.... com.waveset.ui.web.home.TickerGene

  • HT201209 Can I add to my iTunes account using my credit card?

    Can you add to your iTunes account total with a credit card, or is a iTunes card the only way to add money?

  • Error: We had difficulty downloading episodes from your feed...

    Im trying to setup a podcast for itunes... so far, I tried to setup dropbox as my file hoster, blogger as my blog, and feedburner to set it all up. I dont know why im getting this error message. Links below.. Dropbox file: https://dl-web.dropbox.com/

  • Debugging Sap Script

    HI all, I am working on a SAP Script...this custom SAP SCRIPT is being used for transaction F110...every time we are running this transaction we are missing some data in the checks that are printing and this problem is coming after we applied the Ser