Can I retrieve a result set from Oracle and then incorporate that result set into my main SQL Server Stored Procedure?

So I have a chunk of data that only resides in Oracle. So I need to capture that information from Oracle. Now before you get over zealous, I did try with an OPENQUERY and it took FOREVER! And I don't know why the OPENQUERY took FOREVER but if I run the same
query directly against Oracle it runs very quickly...like 20 seconds.
So now I'm wondering...can I build a dataset in my SSRS Report that uses an Oracle Data source and an Oracle Stored Procedure in its Dataset that I'll create to aggregate this subset of data and then utilize its result set back in my main reporting
Dataset that will utilize SQL Server? And how can I do that? Can I make my main Dataset reference, say, a #TemporaryTable that is created from my Oracle Dataset in its
I'll continue to Google a few things as I await your review and hopefully a reply.
Thanks in advance for your help.

Hi ITBobbyP,
According to your description you want to use data from a Oracle data source into a DataSet which retrieving data from SQL Server. Right?
In Reporting Services, we can have multiple data sources in one project pointing to different database. And we can use separated dataset to retrieve data from different data source. However, it's not supported to combine the two datasets together
directly. We can only use Lookup(), LookupSet() function to combine fields from different dataset into one tablix when there are common columns between two datasets. This is the only way to make tow result sets together in SSRS.
Reference:
Lookup Function (Report Builder and SSRS)
LookupSet Function (Report Builder and SSRS)
Best Regards, 
Simon Hou
TechNet Community Support

Similar Messages

  • How to call a sql server stored procedure from oracle

    Hi all,
    Please anybody tell me how to call a sql server stored procedure from oracle.
    I've made an hsodbc connection and i can do insert, update, fetch data in sql server from oracle. But calling SP gives error. when I tried an SP at oracle that has line like
    "dbo"."CreateReceipt"@hsa
    where CreateReceipt is the SP of sql server and hsa is the DSN, it gives the error that "dbo"."CreateReceipt" should be declared.
    my database version is 10g
    Please help me how can i call it... I need to pass some parameters too to the SP
    thanking you

    hi,
    thank you for the response.
    when i call the sp using DBMS_HS_PASSTHROUGH, without parameters it works successfully, but with parameters it gives the following error
    ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
    [Generic Connectivity Using ODBC][Microsoft][ODBC SQL Server Driver]Invalid parameter number[Microsoft][ODBC SQL Server Driver]Invalid Descriptor Index (SQL State: S1093; SQL Code: 0)
    my code is,
    declare
    c INTEGER;
    nr INTEGER;
    begin
    c := DBMS_HS_PASSTHROUGH.OPEN_CURSOR@hsa;
    DBMS_HS_PASSTHROUGH.PARSE@hsa(c, 'Create_Receipt(?,?)');
    DBMS_HS_PASSTHROUGH.BIND_VARIABLE@hsa(c,1,'abc');
    DBMS_HS_PASSTHROUGH.BIND_VARIABLE@hsa(c,2,'xyz');
    nr:=DBMS_HS_PASSTHROUGH.EXECUTE_NON_QUERY@hsa(c);
    DBMS_HS_PASSTHROUGH.CLOSE_CURSOR@hsa(c);
    end;
    Create_Receipt is the sp which requires two parameters.
    please give me a solution
    thanking you
    sreejith

  • Converting SQL Server Stored Procedure to Oracle

    Hi there,
    I tried to use SwisSQL to convert my SQL Server stored procedure to Orcale without much success.
    Is there anyone who could help me out with this?
    My SQL Server Stored Procedure is:
    CREATE PROCEDURE [dbo].[SP_BackgroundCheckRequest]
         --MASTER Table
         @MASTER_ID int,
         @PERSONNEL_ID int = NULL,
    @DATE_OF_BIRTH datetime = NULL,
         @GENDER varchar(1) = NULL,
         @COUNTRY_OF_BIRTH varchar(3) = NULL,
    @TOWN_OF_BIRTH varchar(100) = NULL,
         @STATE_OF_BIRTH varchar(50) = NULL,
         @CHECK_CATEGORY varchar(10) = NULL,
         @CHECK_TYPE varchar(10) = NULL,
         @PRIORITY varchar(10) = NULL,
         @PRIORITY_REASON varchar(100) = NULL,
         @SCREENING_LEVEL nchar(1) = NULL,
         @POSITION nchar(50) = NULL,
         @REQUEST_SOURCE varchar(60) = NULL,
         --NAME_TYPE Table
         @NAME_TYPE varchar(5) = NULL,
         @FAMILY_NAME varchar(50) = NULL,
         @FIRST_NAME varchar(50) = NULL,
         @MIDDLE_NAME varchar(50) = NULL,
         @TITLE varchar(10) = NULL,
         @PREFFERED_NAME varchar(40) = NULL,
         @PREVIOUS_NAME varchar(140) = NULL,
         --ADDRESS_TYPE Table
         @ADDRESS_TYPE varchar(10) = NULL,
         @ADDRESS_LINE_1 varchar(30) = NULL,
         @ADDRESS_LINE_2 varchar(30) = NULL,
         @ADDRESS_LINE_3 varchar(30) = NULL,
         @COUNTRY varchar(3) = NULL,
         @SUBURB varchar(50) = NULL,
         @STATE varchar(50) = NULL,
         @POSTCODE varchar(15) = NULL,
         @START_DATE varchar(10) = NULL,
         @END_DATE varchar(10) = NULL,
         --LICENSE_TYPE Table
         @LICENSE_TYPE varchar(5) = NULL,
         @LICENSE_AGENCY varchar(15) = NULL,
         @LICENSE_NUMBER varchar(100) = NULL,
         @LICENSE_SIGHTED varchar(1) = NULL,
         --PHONE_TYPE Table
         @TELEPHONE_TYPE varchar(5) = NULL,
         @TELEPHONE_NUMBER varchar(20) = NULL,
         @MOBILE_TYPE varchar(5) = NULL,
         @MOBILE_NUMBER varchar(20) = NULL,
         @EXTENSION_TYPE varchar(5) = NULL,
         @EXTENSION_NUMBER varchar(20) = NULL,
         --PASSPORT_TYPE Table
         @PASSPORT_TYPE varchar(5) = NULL,
         @PASSPORT_NUMBER varchar(50) = NULL,
         @PASSPORT_COUNTRY varchar(3) = NULL,
         @PASSPORT_SIGHTED varchar(1) = NULL
    AS
    BEGIN TRANSACTION
    INSERT into MASTER (MASTER_ID, PERSONNEL_ID, DATE_OF_BIRTH, GENDER, COUNTRY_OF_BIRTH,
         TOWN_OF_BIRTH, STATE_OF_BIRTH, CHECK_CATEGORY, CHECK_TYPE, PRIORITY, PRIORITY_REASON,
         SCREENING_LEVEL, POSITION, REQUEST_SOURCE)
         VALUES (@MASTER_ID, @PERSONNEL_ID, @DATE_OF_BIRTH, @GENDER, @COUNTRY_OF_BIRTH,
         @TOWN_OF_BIRTH, @STATE_OF_BIRTH, @CHECK_CATEGORY, @CHECK_TYPE, @PRIORITY, @PRIORITY_REASON,
         @SCREENING_LEVEL, @POSITION, @REQUEST_SOURCE)
    IF @@ERROR <> 0
    BEGIN
         ROLLBACK
         RAISERROR ('Error inserting values into MASTER table!', 16, 1)
         RETURN
    END
    INSERT into NAME_TYPE (MASTER_ID,NAME_TYPE,FAMILY_NAME,FIRST_NAME,MIDDLE_NAME,TITLE)
         VALUES (@MASTER_ID,@NAME_TYPE,@FAMILY_NAME,@FIRST_NAME,@MIDDLE_NAME,@TITLE)
    IF @@ERROR <> 0
    BEGIN
         ROLLBACK
         RAISERROR ('Error inserting values into NAME_TYPE table!', 16, 1)
         RETURN
    END
    INSERT into ADDRESS_TYPE (MASTER_ID,TYPE,ADDRESS_LINE_1,ADDRESS_LINE_2,ADDRESS_LINE_3,
              COUNTRY,SUBURB,STATE,POSTCODE,START_DATE,END_DATE)
         VALUES (@MASTER_ID,@ADDRESS_TYPE,@ADDRESS_LINE_1,@ADDRESS_LINE_2,@ADDRESS_LINE_3,
              @COUNTRY,@SUBURB,@STATE,@POSTCODE,@START_DATE,@END_DATE)
    IF @@ERROR <> 0
    BEGIN
         ROLLBACK
         RAISERROR ('Error inserting values into ADDRESS_TYPE table!', 16, 1)
         RETURN
    END
    INSERT into LICENSE_TYPE (MASTER_ID,TYPE,AGENCY,NUMBER,SIGHTED_YN)
         VALUES (@MASTER_ID,@LICENSE_TYPE,@LICENSE_AGENCY,@LICENSE_NUMBER,@LICENSE_SIGHTED)
    IF @@ERROR <> 0
    BEGIN
         ROLLBACK
         RAISERROR ('Error inserting values into LICENSE_TYPE table!', 16, 1)
         RETURN
    END
    INSERT into PHONE_TYPE (MASTER_ID,TYPE,NUMBER)
         VALUES (@MASTER_ID,@TELEPHONE_TYPE,@TELEPHONE_NUMBER)
    IF @@ERROR <> 0
    BEGIN
         ROLLBACK
         RAISERROR ('Error inserting Telephone number into PHONE_TYPE table!', 16, 1)
         RETURN
    END
    IF ((@MOBILE_TYPE <> NULL) AND (@MOBILE_NUMBER <> NULL))
    BEGIN
         INSERT into PHONE_TYPE (MASTER_ID,TYPE,NUMBER)
              VALUES (@MASTER_ID,@MOBILE_TYPE,@MOBILE_NUMBER)
         IF @@ERROR <> 0
         BEGIN
              ROLLBACK
              RAISERROR ('Error inserting Mobile number into PHONE_TYPE table!', 16, 1)
              RETURN
         END
    END
    IF ((@EXTENSION_TYPE <> NULL) AND (@EXTENSION_NUMBER <> NULL))
    BEGIN
         INSERT into PHONE_TYPE (MASTER_ID,TYPE,NUMBER)
              VALUES (@MASTER_ID,@EXTENSION_TYPE,@EXTENSION_NUMBER)
         IF @@ERROR <> 0
         BEGIN
              ROLLBACK
              RAISERROR ('Error inserting Extension number into PHONE_TYPE table!', 16, 1)
              RETURN
         END
    END
    INSERT into PASSPORT_TYPE (MASTER_ID,NUMBER,COUNTRY,SIGHTED_YN)
         VALUES (@MASTER_ID,@PASSPORT_NUMBER,@PASSPORT_COUNTRY,@PASSPORT_SIGHTED)
    IF @@ERROR <> 0
    BEGIN
         ROLLBACK
         RAISERROR ('Error inserting values into PASSPORT_TYPE table!', 16, 1)
         RETURN
    END
    COMMIT

    First, a basic concept. That also illustrates how different Oracle is (and PL/SQL) from SQL-Server (and T-SQL).
    PL/SQL integrates two different languages. The PL language. The SQL language. It allows you to code SQL source code natively inside the PL language. The PL compiler is clever enough to do the rest - make calls to the SQL engine to create SQL cursors, bind PL variable values to bind variables in the SQL code. Etc.
    PL is a "proper" programming language. It is much like Pascal (it is based on Ada, a close family member of Pascal). It is nothing at all like T-SQL.
    Okay, now for the very basic rule for Oracle development.
    Maximize SQL. This means using the SQL language to crunch data. It is the "closest" to the data. It is designed and optimised for dealing with data. Do your data processing using SQL.
    Minimize PL/SQL. This means using the PL language not to crunch data, but to provide the conditional logic. Implement business rules. And then have the SQL language crunch the data as the data processing language.
    Attempting to directly translate T-SQL code into PL/SQL is flawed. It is like trying to make coffee with teabags. Yeah, the tea may have caffeine it, but it is not coffee.
    To do what that T-SQL script does, insert a row into a table, a typical PL/SQL equivalent will look as follows:
    create or replace procedure InsertMaster( masterRow master%rowtype ) authid definer is
    .. types and variables declared here
    begin
      -- masterRow is a record structure that matches the actual MASTER table
      .. apply business rules and validation to the data.. raising user exceptions as needed
      -- e.g. the POSITION column must be upper case
      masterRow.position := upper(masterRow.position);
      -- after the business logic and data validation we can add the row to the table
      -- (PL will make the INSERT call to the SQL engine)
      insert into master values masterRow;
    end;No commit. The caller does the business transaction. It needs to decide when to commit to maintain the integrity of the data in the database. It may need to do several more calls, before committing.
    With this approach, we can give the application schema (the caller) execute privs on this procedure. This procedure is defined with definer rights. This means it runs with the privs of owner of that procedure and MASTER table. It is trusted code. It does all the correct stuff to add a valid and checked row to the MASTER table. So we give the app schema execute privs on the procedure and no insert priv on the MASTER table.
    The only way the caller can add row to the MASTER table is via this trusted procedure of ours.
    And this is a typical approach in Oracle - using the PL/SQL (both PL language and SQL language) code to create an interface to a logical database in Oracle. Abstracting the complexities of SQL from the caller. Moving business and validation into PL. Allowing us the flexibility of modifying business and validation logic, without touching a single byte of caller/client code. Allowing us to manage and tune SQL performance without dealing with (badly designed and coded) SQL from a client - as the SQL resides in PL/SQL packages and procedures and functions.

  • Can a SQL Server stored procedure call an SAP function module?

    Can a SQL Server stored procedure call an SAP function module.? The stored procedure will be called via a trigger when data records are added to a Z table.

    You have two options:
    - the other software can use the RFC SDK and call directly in the system
    - the other software can use a database connect
    Markus

  • How to convert SQL server stored procedures to Oracle 11g

    Hi Experts,
    In SQL server 30 stored procedures are there how to convert all the stored procedure
    from SQL server to Oracle 11g.
    Please help me,
    Thanks.

    ramya_162 wrote:
    In SQL server 30 stored procedures are there how to convert all the stored procedure
    from SQL server to Oracle 11g.
    The single most fundamental concept you need to understand (grok in its fullness) is:
    ORACLE IS NOT SQL-SERVER
    There is very little, to NOTHING, in common between T-SQL (a language extension to SQL) and PL/SQL (integration of SQL with the language Ada, part of ALGOL family of languages that includes Pascal and C++).
    So taking a T-SQL procedure and porting it as is to PL/SQL is plain stupid.
    Why?
    Oracle sucks at trying to be SQL-Server.
    So how do you migrate from SQL-Server to Oracle?
    By taking the REQUIREMENTS that the T-SQL procedures address, and addressing these requirements using Oracle SQL and PL/SQL.

  • Can I attach a link to one image and then use that linked image multiple times in my site?

    Hi,
    Is it possible to attach a link to an image and then use that image (with link attached) multiple times in my site.
    Thanks,
    Ally

    Use 'Find and Replace'>under the 'Edit' menu.
    Select from 'Find in'- Folder and browse to the folder your website files are kept in to select it.
    Search: Source Code
    In the Find box (but obviously use YOUR image code):
    <img src="images/imageName.jpg" width="200" height="200" alt="" />
    In the Replace box: (use YOUR link and image code)
    <a href="yourLink.html"><img src="images/imageName.jpg" width="200" height="200" alt="" /></a>
    Then select 'Replace All'

  • How can I read the active (plugged in) DAQs and then send that to the device name input on DAQ assist?

    I have a system property node for daqmx but it does not let me change it to read when i right click on it. I am trying to have my program detect the name of the daq that is plugged in to the PC and then send that to daq assistant so that it will run properly wiithout me manually having to change the device name every time i switch hardware.
    Solved!
    Go to Solution.

    labview12110 wrote:
    Im just frustrated that the only function I have is to get a list of things that I can't do anything with. MAX knows which is active can I call it up somehow?
    You have do do programming.  That is what LabVIEW is.  MAX gives you all the tools to do everything you want and much more just program it to do what you want.
    Attached is a VI that I think does what you want.  I looks at all of your devices and returns the first non simulated one.  Apparently this list already excludes devices not connected to the system.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.
    Attachments:
    Find Non Simulated Device.vi ‏6 KB

  • My MacBook was stolen over Christmas and i cannot find my serial number, i have a time machine which my macbook was backed up to can i retrieve my serial number from it and how?

    Anyone able to advise how to trace the serial number of my macbook pro that was stolen, I used it to purchase from iTunes and i have a Time machine with back up info. It was bought in 2009 and i cannot find my receipts for the police but need to provide a serial number? Help please

    If you enabled the Find My Mac application, than you can locate it from http://icloud.com
    If you do not have, than you should contact apple through the Apple Support Lane: https://expresslane.apple.com
    You can contact me by Private Message anytime for more help.

  • Conversion from SQL Server Stored Procedures to Oracle Procedures

    We are having an ERP Package which runs on SQL Server 7.0. For the Reports and Transaction windows, we are using the stored procedures extensively.Now , we want to convert it to Oracle Procedures.Where can i find the resource for this subject.
    Please mail me to [email protected]
    Regards,
    Buhari

    Oracle provides a tool, called the Migration Workbench, that can do an automated conversion. In the newest release of SQL Developer, Oracle's PL/SQL development GUI, the Migration Workbench is built in.
    Be aware, though, that there are limits to what an automated tool is capable of doing. In all probability, you'll want to manually adjust at least a handful of the procedures after any automated tool converts them in order to make things more efficient or to adjust logic that may depend on database-specific behavior. If you have code, for example, that assumes that writers block readers, that code will no longer block in Oracle, which might require re-assessing your algorithm. In addition, there are numerous approaches to developing procedures that are very common in SQL Server (the use of temp tables, for example), that while possible in Oracle generally aren't the most efficient approach.
    Justin

  • SQL Server Stored Procedure to Oracle

    Hi All,
    I have a store procedure in SQL Server(2005 onwards)...I need to convert that in Oracle. As I am new to Oracle. Please guide me.
    I have two tables MetaDatabase and MetaEntity. The store procedure loads the MetaDatabase and MetaEntity based on MetaDatabase...As of now it is hardcoded in SP...
    MetaDatabase
    CREATE TABLE MetaDatabase
    ID INT NOT NULL,
    Alias VARCHAR(64) NOT NULL,
    VersionMajor smallint NOT NULL,
    VersionMinor smallint NOT NULL,
    VersionRevision smallint
    INSERT INTO MetaDatabase VALUES(1, 'DB1', 1, 1, 1);
    INSERT INTO MetaDatabase VALUES(2, 'DB1', 1, 1, 2);
    INSERT INTO MetaDatabase VALUES(3, 'DB2', 1, 2, 1);
    MetaEntity
    CREATE TABLE MetaEntity
    ID INT NOT NULL,
    MetaDatabaseID INT NOT NULL,
    Name VARCHAR(64) NOT NULL
    INSERT INTO MetaEntity VALUES(1, 1, 'TABLE11');
    INSERT INTO MetaEntity VALUES(2, 1, 'TABLE12');
    INSERT INTO MetaEntity VALUES(3, 2, 'TABLE21');
    INSERT INTO MetaEntity VALUES(4, 2, 'TABLE22');
    INSERT INTO MetaEntity VALUES(5, 3, 'TABLE31');
    INSERT INTO MetaEntity VALUES(6, 3, 'TABLE32');Here is the SP as of now I am loading 2 MetaDatabase out of 3.
    CREATE Procedure myProc
    AS
         DECLARE @tmpDictionaries  TABLE ( Alias varchar(64),
                                          VersionMajor smallint,
                                          VersionMinor smallint,
                                          VersionRevision smallint )
         DECLARE @tmpMetaDatabase  TABLE ( ID int PRIMARY KEY )
         DECLARE @tmpMetaEntity    TABLE ( ID int PRIMARY KEY )
        /* Load these 2 MetaDatabase */
        INSERT INTO @tmpDictionaries (Alias,VersionMajor,VersionMinor,VersionRevision) VALUES ('DB1',1,1,1)
        INSERT INTO @tmpDictionaries (Alias,VersionMajor,VersionMinor,VersionRevision) VALUES ('DB2',1,2,1)
        /* Make sure that all passed in dictionaries actually exist */
        IF (SELECT COUNT(*) FROM @tmpDictionaries t WHERE NOT EXISTS(SELECT ID FROM MetaDatabase md WHERE md.Alias=t.Alias AND md.VersionMajor=t.VersionMajor AND md.VersionMinor=t.VersionMinor AND md.VersionRevision=t.VersionRevision)) > 0 BEGIN
          RAISERROR ('Not all dictionaries requested exist', 16, 1) WITH SETERROR
          RETURN
        END
        /* remember the MetaDatabase records */
        INSERT INTO @tmpMetaDatabase    SELECT ID FROM MetaDatabase md  WHERE EXISTS(SELECT *  FROM @tmpDictionaries t  WHERE md.Alias=t.Alias AND md.VersionMajor=t.VersionMajor AND md.VersionMinor=t.VersionMinor AND md.VersionRevision=t.VersionRevision)
        /* remember all related MetaEntity records */
        INSERT INTO @tmpMetaEntity      SELECT ID FROM MetaEntity me    WHERE EXISTS(SELECT ID FROM @tmpMetaDatabase t  WHERE t.ID=me.MetaDatabaseID)
        /* return all MetaDatabase */
        SELECT md.* FROM MetaDatabase md WHERE EXISTS(SELECT ID FROM @tmpMetaDatabase WHERE ID=md.ID)
        /* return all related MetaEntity records */
        SELECT me.* FROM MetaEntity me WHERE EXISTS(SELECT ID FROM @tmpMetaEntity WHERE ID=me.ID)Here is the output I get..It returns 2 resultsets one for each SELECT in SP.
    EXEC myProc
    1     DB1     1     1     1
    3     DB2     1     2     1
    1     1     TABLE11
    2     1     TABLE12
    5     3     TABLE31
    6     3     TABLE32I need same in Oracle..where I can parse the resultset returned from SP. Any help will be greatly appreciated.
    Edited by: [email protected] on Jun 10, 2010 2:34 PM

    [email protected] wrote:
    I have a store procedure in SQL Server(2005 onwards)...I need to convert that in Oracle. Not really a good idea - as T-SQL has very little in common with PL/SQL.
    PL/SQL is two languages:
    - a procedural language called Programming Logic - which has its roots in the Ada and Pascal family of procedural languages.
    - the SQL language.
    These are tightly integrated to allow you to use SQL natively inside PL. In other words, you can mix SQL source inside PL source code, reference PL variables in SQL source and the PL compiler and run-time is clever enough to know what code is PL and what code is SQL and how to glue the SQL into the PL.
    Bottom line - PL is not a macro/scripting language for running SQL. It is equivalent to to Java, C#, Visual Basic and others ito features and how one designs and uses the language.
    So your question of how to covert a T-SQL proc to PL/SQL is equivalent of asking how to change a T-SQL proc to C/C++ using the Pro*C (embedded SQL) compiler.
    So please - forget any notion that PL/SQL is like T-SQL. Or even that Oracle is at all like SQL-Server. Oracle is "+that darn good+" not because it emulates SQL-Server.. but because it is not like SQL-Server. It is the differences in the feature set of Oracle from SQL-Server that sells Oracle.
    I need same in Oracle..where I can parse the resultset returned from SP. Any help will be greatly appreciated.Oracle does not work this way. There are also no "result sets" in terms of a temporary data set that's created in the server and stored in memory. This type of approach does not scale if you have a 1000 users all running the same application code and all attempting to create "result sets" in server memory at the same time.
    The norm for client-server code using PL/SQL as the server side interface into database data, is for the PL/SQL code to create a SQL cursor and return a pointer (called a reference cursor handle or simple a reference cursor) to the client.
    The client (e.g. VB/Java/C#/Delphi/etc) can then fetch data from the SQL cursor (a "program" in server memory that finds and retrieves the relevant rows).
    To understand and "enjoy" Oracle, one needs to empty one's cup of SQL-Server/DB2/Informix/whatever in order to fill that cup with the Oracle brew. Only then can one really taste and enjoy Oracle. So, think twice before assuming Oracle is like SQL-Server and PL/SQL is like T-SQL. You will save yourself a lot of frustration, wasted effort, and run into fewer (very hard and very painful) brick walls as a result.

  • Set date as MM/dd/yyyy as in parameter for SQL Server stored procedure

    I have string date in MM/dd/yyyy .
    My requirement is to send date as in parameter to stored procedure in format MM/dd/yyyy .
    CallableStatement cstmt=null;
    cstmt = connection.prepareCall("{......
    How this to be done .I am Using SQL server.
    If i do like below data field is not updated by my code.
    cstmt.setTimestamp
    cstmt.setDate
    But if procedure is executed from SQL Query Anylaxer procedure is updating

    Hi,
    The format that appears by Default for date printing in the List is picked from SU01 parameters or SU3
    You can change the defaults by going into ur system profile.
    Su01 - Change - Go into Defaults tab.
    U can see various details like Start Menu, Logon lamguage, Decimal notation and date format. Choose the format u want and save .
    But the Date Format Is not reflected just by changing the format, you need to Log Off and Log In again to see the changed format in the output.
    also see the link
    http://web.mit.edu/sapr3/docs/webdocs/getstarted/gsSETTINGS.html
    Hope this helps.
    Thanks
    Ruchika

  • Call a SQL Server stored procedure from AppleScript

    I've a stored procedure that runs and creates a new Job Number. I need to create an applescript and run this stored procedure and prompt
    the user with the new Job number on screen. Does SQL server support applescript? Any suggestions/alternative? Thanks

    Hi SSRS-Newebie,
    I am not that into Java as well, based on my research, in your case, you shall modify the Java file as below.
    import java.sql.CallableStatement;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    public class Main {
    public static void main(String[] argv) throws Exception {
    Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
    Connection con = DriverManager.getConnection("jdbc:sqlserver://MYSERVER;databaseName=MYDATABASE",
    "USERID", "PASSWORD");
    /*call the procedure here*/
    CallableStatement proc_stmt = con.prepareCall("{ call Int.dbo.GetNewJobNumber(?,?,?) }");
    /*set values for SP parameters*/
    proc_stmt.setString(1, "6852");
    proc_stmt.setString(2, "Test Job");
    proc_stmt.setString(3, "Manual SQL Query");
    ResultSet rs = proc_stmt.executeQuery();
    /*get the result set values*/
    if (rs.next()) {
    /*you need to change the below to get correlated columns according to what your SP returns*/
    int employeeId = rs.getInt(1);
    System.out.println("Generated employeeId: " + employeeId);
    } else {
    System.out.println("Stored procedure couldn't generate new Id");
    For more professional and technical quesions, I suggest you post them in dedicated
    Java Forums.
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • Call SQL Server Stored Procedure from BPEL

    Could somebody send me the tutorial on how to use Stored Procedures for SQL Server (as mentioned by mchiocca in this thread: Stored Procedure Support?
    [email protected]
    Thanks!

    This is not a possibility.
    Refer to Support for Non-Oracle Stored Procedures

  • I have purchased many apps on my Ipod touch (4g) and have synced them into my iTunes, now I am going to buy an iPhone (4g) tomorrow and I am wondering if i can transfer the apps I purchased from my iPod[The ones that are synced into my iTunes] to my new I

    can i sync purchased apps from my ipod to my itunes then to my iphone? both are 4g

    Yes, when you open iTunes, click Apps on the sidebar
    these apps are all your apps
    In your case, you will be able too*
    *Certain iPad apps can't be transferred to an iPhone or iPod

  • Retrieve specific range data from oracle table

    Hi, Dear friends,
    I want to retrieve all the data from oracle table and then save them to mysql table using JDBC ResultSet. The problem is that some oracle table is too big, if I retrieve all of them to memory at a once time using excuteQuery, the program will become no response out of memory limitation. So my question is if I can retrieve just specific range data once a time. I can¡¯t find this function through JDBC API. Also, I don¡¯t want to use the specific sql sentence, for example ¡°select ¡ from¡ where someid>¡ and someid<¡¡±, because there are many different tables, I want to transfer them automatically. So I can¡¯t construct such sql sentence in advance. Does anyone know if oracle JDBC driver provide such kind of function or does there any other way?
    Any suggestion will be greatly appreciated!
    Sammy

    Dear Justin,
    thank you so much for your prompt reply!
    as your suggestion, I do check the performance while my program is running, after the program become nearly no response, I found the memory usage is nearly 100%, while disk usage and process usage is pretty low. that's the reason why I guess maybe the memory limitation, but the strange thing is that no any error reported by JBuilder, it just nearly no response and don't transfer any data any more. my os is windows xp, the version of JBuilder is 7. my main memory is 768M. just as you said, the total 6,000 records in not very large, just no more than 400K. another strange thing is that why my program works well when there is little data records in the table.
    the big picture of my program is first I retrieve oracle table metadata, according to this information, I construct DDL sql words and then create the corresponding table in mysql database. this part works well. in order to save your time, I will not paste the code here. then there is a method to transfer oracle data to mysql table, whenever creating the mysql table, then I will call this method to transfer datat to it. the following is the code of this method, I am very sorry to take your time. please read it when you are available.
    thank you very much!!
    Sammy
    //transfer data from oracle to mysql!!!
    private static void transferData(Connection oracleConn, Connection mysqlConn, String oracleTableName, String oracleSchemaName) throws SQLException{
    Statement oracleStmt=oracleConn.createStatement();
    Statement mysqlStmt=mysqlConn.createStatement();
    // sending sql to oracle to retrieve data
    String thisTableName=oracleTableName;
    String oracleSQL="SELECT * FROM ".concat(thisTableName);
    ResultSet oracleRS = oracleStmt.executeQuery(oracleSQL);
    String sql="";
    if (oracleRS.next()) {
    ResultSetMetaData rsmd = oracleRS.getMetaData();
    int colCount = rsmd.getColumnCount();
    do {
    String sqlBodyPart="";
    String sqlValuePart="";
    System.out.println("the number of column is "+colCount);
    for (int i = 1; i <= colCount; i++) {
    String columnValue = oracleRS.getString(i);
    boolean b = oracleRS.wasNull();
    String columnName =rsmd.getColumnName(i);
    System.out.println("the value of column " + i + "is " + columnValue);
    //construc the sql body part and value part
    sqlBodyPart=sqlBodyPart.concat(" ").concat(columnName).concat(",");
    if(b){ //if the value of the column i is null
    sqlValuePart=sqlValuePart.concat(" null").concat(",");
    }else{
    sqlValuePart=sqlValuePart.concat(" '").concat(columnValue).concat("',");
    //get rid of the last comma in sqlBodyPart and sqlValuePart
    if(!sqlBodyPart.equalsIgnoreCase("")) sqlBodyPart=sqlBodyPart.substring(0,sqlBodyPart.length()-1);
    if(!sqlValuePart.equalsIgnoreCase("")) sqlValuePart=sqlValuePart.substring(0,sqlValuePart.length()-1);
    //construct the sql sentence!!!
    sql="INSERT INTO ".concat(thisTableName).concat(" (").concat(sqlBodyPart).concat(") ").concat(" VALUES(").concat(sqlValuePart).concat(")");
    System.out.println("the sql words for this column is");
    System.out.println(sql);
    System.out.println(" ");
    if(mysqlStmt!=null){
    int rows = mysqlStmt.executeUpdate(sql);
    } else{
    System.out.println("can't connect with mysql server");
    System.exit(1);
    while (oracleRS.next());
    } else {
    System.out.println("There are no data in the table...");
    }//end of method data transfer!
    //end of method data transfer!

Maybe you are looking for

  • Back-referencing data using MODEL

    Not sure how possible this is... with t as (select 1 as id, 'blah blah' as txt from dual union all            select 2,       '# header 1' from dual union all            select 3,       '41 text line 1' from dual union all            select 4,      

  • My Macbook pro 13 inch is stuck on a gray screen with the apple logo, how do I fix this?

    Sooo, I was using my laptop for a while and the charger was kind of broken, it was dip in and out, and slowly I got a "Service Battery" notification. I updated my system and now everytime I try to boot up my computer it'd show a gray screen with the

  • Cannot set default programs for a file extension in Gnome

    After a gnome upgrade (cannot remember when), I can no longer set the default program for a particular file extension by right clicking the file in nautilus -> going to "properties" -> going to "open with" tab -> highlighting a program -> pressing "s

  • Video and Audio tags from compressor??

    Hey guys, I have some thing Im trying to solve. I have an audio and video podcast that i run through compressor every week and would really like to add all the meta-data straight from compressor. Its a pain to add to itunes and then grab that file an

  • Motion Tween.

    Hello!     I have a big problem on a project that I'm developing. I've created an animation with ActionScript 2.0 using mx Tween class. This is the code: import mx.transitions.Tween; import mx.transitions.easing.*; var myTween:Tween = new Tween(mc1,