Sql-OWB conversion

Hi All
I have an SQL here which I need to try convert into OWB mapping. Suppose I have a table Sequences which has Route code, planned route sequence to be followed and actual route sequence followed as follows
ROUTE     PLANNED     ACTUAL
A     1     1
A     2     3
A      3     2
A      4     4
A     5 5
Now from above table,I need to calculate the number of deviations in the sequence planned. In above case we can see one deviation between 3 and 2
My SQL is
select S3.Route,
(Select count(1)
from Sequences S1
where S1.Actual <> (
select min(actual)
from sequences S2
where S2.planned >= S1.planned
and s2. Route = S3. Route
and S1. Route = S3. Route)
) Deviations,
(Select count(1)
from Sequences S1
where S1.Actual = (
select min(actual)
from sequences S2
where S2.planned >= S1.planned
and s2. Route = S3. Route
and S1. Route = S3. Route)
) Successes
from Sequences S3
group by S3. Route
so my output is
Route Deviations Successess
A     1     4
I want to do the same in OWB. Any ideas please?
Birdy

Doing the same as the query posted, you can do this to calculate deviations:
1 - Add 3 times the sequences table to the mapping (s1, s2 and s3).
2 - Join the the tables using the joiner operator with the conditions:
S2.planned >= S1.planned
and s2. Route = S3. Route
and S1. Route = S3. Route
3 - Add an aggregation operator to get the min(actual)
4 - Add another joiner operator and join s1 with the result of the previous aggregator:
S1.Actual = min(actual)
5 - Add another aggregator and get count(1)
After getting the correct result, you can optimize the mapping or try to make it simple.

Similar Messages

  • SAP query error - 1). [Microsoft][SQL Server Native Client 10.0][SQL Server]Conversion failed when converting date and/or time from character string.  'Received Alerts' (OAIB)

    SAP query error - 1). [Microsoft][SQL Server Native Client 10.0][SQL Server]Conversion failed when converting date and/or time from character string.  'Received Alerts' (OAIB)
    SELECT    
    CASE WHEN T0.DocStatus = 'O' THEN 'OPEN'
    WHEN T0.DocStatus = 'C' THEN 'CLOSED'  END  AS 'Document Status',
    T0.DocDate AS 'Posting Date',
    T0.DocNum AS 'Doc.No',
    T0.NumAtCard,
    T0.TransId AS 'Trans. No.',
    T0.Comments AS 'Remarks',
    T0.CardCode AS 'Offset Acct',
    T0.CardName AS 'Offset Acct Name',
    sum(T0.DocTotal) + (T0.WTSum) as 'DocTotal',
    T3.DueDate AS 'Cheque Date',
    T3.CheckSum AS 'Amount'
    FROM         ODPO AS T0 LEFT OUTER JOIN
                          VPM2 AS T1 ON T0.ObjType = T1.InvType AND T0.DocEntry = T1.DocEntry LEFT OUTER JOIN
         OVPM AS T2 ON T2.DocEntry = T1.DocNum LEFT OUTER JOIN
                          VPM1 AS T3 ON T2.DocEntry = T3.DocNum
    where T0.DocDate>='[%0]' and T0.DocDate<='[%1]'

    Hi,
    Try this:
    SELECT   
    CASE WHEN T0.DocStatus = 'O' THEN 'OPEN'
    WHEN T0.DocStatus = 'C' THEN 'CLOSED'  END  AS 'Document Status',
    T0.DocDate AS 'Posting Date',
    T0.DocNum AS 'Doc.No',
    T0.NumAtCard,
    T0.TransId AS 'Trans. No.',
    T0.Comments AS 'Remarks',
    T0.CardCode AS 'Offset Acct',
    T0.CardName AS 'Offset Acct Name',
    sum(T0.DocTotal) + (T0.WTSum) as 'DocTotal',
    T3.DueDate AS 'Cheque Date',
    T3.CheckSum AS 'Amount'
    FROM         ODPO  T0 LEFT OUTER JOIN
                          VPM2  T1 ON T0.ObjType = T1.InvType AND T0.DocEntry = T1.DocEntry
    LEFT OUTER JOIN
         OVPM  T2 ON T2.DocEntry = T1.DocNum LEFT OUTER JOIN
                          VPM1  T3 ON T2.DocEntry = T3.DocNum
    where T0.DocDate >= '[%0]' and T0.DocDate <='[%1]'
    group by T0.DocStatus,T0.DocDate ,
    T0.DocNum ,
    T0.NumAtCard,
    T0.TransId ,
    T0.Comments ,
    T0.CardCode,
    T0.CardName ,
    T0.WTSum ,
    T3.DueDate ,
    T3.CheckSum
    Thanks & Regards,
    Nagarajan

  • Insert SQL server: Conversion failed. On A environment, but not on Test.

    We probably found the cause of this problem. Not that long ago we migrated the databases from SQL server 2005 to SQL server 2012. All databases are migrated now, but only the acceptance one is giving us trouble. After an extensive search we found that the connection to acceptance databases uses an other (older?) version ODBC driver. Al other environments had the same, other (newer) connection diver and they work fine. It seems that the combination of SQL server 2012 and the use of the old connection ODBC driver is causing our problem.   (we saw something strange, wich seems to be related during an other run: a SQL override in a session was giving us a 'database fetch optimize' error.... But! Not on our acceptantance environment :-) )

    Hi, I have a mapping which inserts (meta)data into a SQL server (2012) database. One field is 'proces_start_date' of the date/time datatype in Powercenter. In the SQL server database this field is of the datetime datatype. This mapping runs at the start of the workflow to insert an initial record in a metadata table for each session in the workflow. Therefor the 'proce's_start_date' is initialy set to 01-01-1900 with the following expression: TO_DATE('01011900','DDMMYYYY').  The weird thing is that when I run this mapping on our development or test environment, the insert is being performed without a problem. But when I run the same mapping on our acceptance environment the session fails. This error is returned: [Informatica][ODBC SQL Server Legacy Driver][SQL Server]Conversion failed when converting date and/or time from character string. The session log says it fail on this value of 'proces_start_date': 01/01/1900 00:00:00.000000000 Because the mapping inserts initial values, the field 'proces_start_date' will always have this value! But still it doesn't work on our A environment. I've checked the workflows/sesion/mapping/mapplet/target etc.. on T and A and there are no differences. Our DBA can't find anything different between the databases on T and A either. Also, when I try to manualy convert/insert this value of 'proces_start_date' in the database, using management studio, I get the same converion error on BOTH databases!  We are a bit lost here and have no idea wheter this could be a powercenter issue or a database related issue. Hopefully someone can help us in finding a solution for this problem.

  • XSU error oracle.xml.sql.OracleXMLSQLException: Conversion to String failed

    Appication Server: 10g, Database: Oracle 9i and Oracle 10g
    I have a table 'sw_icd2' in the database that has one column of XMLType.
    The code below, attempts to query this table as 'select * from sw_icd2' and display the result. I was able to execute this query in sqlplus.
    But when I run a program using XSU in JDeveloper:
    OracleXMLQuery qry = new OracleXMLQuery(conn, "select * from sw_icd2");
    XMLDocument domDoc = (XMLDocument)qry.getXMLDOM();
    domDoc.print(System.out);
    StringWriter s = new StringWriter(10000);
    domDoc.print(new PrintWriter(s));
    System.out.println(s.toString());
    qry.close();
    I get the following Error:
    "oracle.xml.sql.OracleXMLSQLException: Conversion to String failed"
    Any ideas on how I can resolve this issue? Your help would be appreciated.
    Thanks!

    Okay, it looks like the problem has something to do with the TIMESTAMP data type in tables.
    oracle.xml.sql.query.OracleXMLQuery can't seem to handle tables with the TIMESTAMP data type.
    this code ran fine on my machine :
    import oracle.jdbc.driver.*;
    import oracle.xml.sql.query.OracleXMLQuery;
    import java.lang.*;
    import java.sql.*;
    public class testXMLSQL {
         public static void main(String[] args) {
    try {
    // Create the connection
    System.out.println("before getConnection ");
    Connection conn = getConnection("scott","tiger");
    System.out.println("after getConnection ");
    // Create the query class
    OracleXMLQuery qry = new OracleXMLQuery(conn, "SELECT * FROM EMP");
    System.out.println("after OracleXMLQuery object created ");
    // Get the XML string
    String str = qry.getXMLString();
    // Print the XML output
    System.out.println("The XML output is:\n"+str);
    // Always close the query to get rid of any resources..
    qry.close();
    } catch(SQLException e) {
    System.out.println(e.toString());
    // Get the connection given the user name and password.!
    private static Connection getConnection(String username,
    String password)
    throws SQLException
    // register the JDBC driver..
    DriverManager.registerDriver(new
    oracle.jdbc.driver.OracleDriver());
    // Create the connection using the OCI8 driver
    Connection conn =
    DriverManager.getConnection(
    "jdbc:oracle:thin:@<server_name>:1521:<sid>",
    username,password);
    return conn;
    Then I created another table :
    create table emp_test as select * from emp;
    added a timestamp to it :
    alter table emp_test add (time timestamp(6));
    and filled it with timestamp information :
    update emp_test set time = timestamp'2005-09-22 09:26:50.124';
    ran the same code but changed the SQL to :
    "SELECT * FROM EMP_TEST"
    and got the error message :
    The XML output is:
    <?xml version = '1.0'?>
    <ERROR>oracle.xml.sql.OracleXMLSQLException: Conversion to String failed</ERROR>
    looks like bug in OracleXMLQuery object??

  • SQL Command conversion in abap code

    Hi,
    I want to implement the UNION, INTERSECT and MINUS SQL commands in abap code. Please give me the appropriate solutions asap.
    For Example:
    select field1, field2, . field_n
    from tables
    <b>UNION</b>
    select field1, field2, . field_n
    from tables;
    select field1, field2, . field_n
    from tables
    <b>MINUS</b>
    select field1, field2, . field_n
    from tables;
    select field1, field2, . field_n
    from tables
    <b>INTERSECT</b>
    select field1, field2, . field_n
    from tables;
    Thanks,
    Ravi

    Hi Ravi
    Check out this procedure...
    DATA: FRANKFURT(4) TYPE X,
          FRISCO(4)    TYPE X,
          INTERSECT(4) TYPE X,
          UNION(4)     TYPE X,
          BIT          TYPE I.
    DATA: CARRID TYPE SPFLI-CARRID,
          CARRIER LIKE SORTED TABLE OF CARRID
                              WITH UNIQUE KEY TABLE LINE.
    DATA WA TYPE SPFLI.
    SELECT CARRID FROM SCARR INTO TABLE CARRIER.
    SELECT CARRID CITYFROM FROM SPFLI
                           INTO CORRESPONDING FIELDS OF WA.
      WRITE: / WA-CARRID, WA-CITYFROM.
      READ TABLE CARRIER FROM WA-CARRID TRANSPORTING NO FIELDS.
      CASE WA-CITYFROM.
        WHEN 'FRANKFURT'.
          SET BIT SY-TABIX OF FRANKFURT.
        WHEN 'SAN FRANCISCO'.
          SET BIT SY-TABIX OF FRISCO.
      ENDCASE.
    ENDSELECT.
    INTERSECT = FRANKFURT BIT-AND FRISCO.
    UNION     = FRANKFURT BIT-OR  FRISCO.
    SKIP.
    WRITE 'Airlines flying from Frankfurt and San Francisco:'.
    DO 32 TIMES.
      GET BIT SY-INDEX OF INTERSECT INTO BIT.
        IF BIT = 1.
          READ TABLE CARRIER INDEX SY-INDEX INTO CARRID.
          WRITE CARRID.
        ENDIF.
    ENDDO.
    SKIP.
    WRITE 'Airlines flying from Frankfurt or San Francisco:'.
    DO 32 TIMES.
      GET BIT SY-INDEX OF UNION INTO BIT.
        IF BIT = 1.
          READ TABLE CARRIER INDEX SY-INDEX INTO CARRID.
          WRITE CARRID.
        ENDIF.
    ENDDO.
    This produces the following output list:
    The program uses four hexadecimal fields with length 4 - FRANKFURT, FRISCO, INTERSECT, and UNION. Each of these fields can represent a set of up to 32 elements. The basic set is the set of all airlines from database table SCARR. Each bit of the corresponding bit sequences representes one airline. To provide an index, the external index table CARRIER is created and filled with the airline codes from table SCARR. It is then possible to identify an airline using the internal index of table CARRIER.
    In the SELECT loop for database table SPFLI, the corresponding bit for the airline is set either in the FRANKFURT field or the FRISCO field, depending on the departure city. The line number SY-TABIX is determined using a READ statement in which no fields are transported.
    The intersection and union of FRANKFURT and FRISCO are constructed using the bit operations BIT-AND and BIT-OR.
    The bits in INTERSECT and UNION are read one by one and evaluated in two DO loops. For each position in the fields with the value 1, a READ statement retrieves the airline code from the table CARRIER.
    Comparing Bit Sequences
    Use the following three operators to compare the bit sequence of the first operand with that of the second:
    <operator>
    Meaning
    O
    bits are one
    Z
    bits are zero
    M
    bits are mixed
    The second operand must have type X. The comparison takes place over the length of the second operand. The first operand is not converted to type X.
    The function of the operators is as follows:
    O (bits are one)
    The logical expression
    <f> O <hex>
    is true if the bit positions that are 1 in <hex>, are also 1 in <f>. In terms of set operations with bit sequences, this comparison is the same as finding out whether the set represented by <hex> is a subset of that represented by <f>.
    Z (bits are zero)
    The logical expression
    <f> Z <hex>
    is true if the bit positions that are 1 in <hex>, are 0 in <f>.
    M (bits are mixed)
    The logical expression
    <f> M <hex>
    is true if from the bit positions that are 1 in <hex>, at least one is 1 and one is 0 in <f>.
    Caution: The following programs are no longer supported in Unicode systems:
    REPORT demo_log_expr_bits .
    DATA: text(1) TYPE c VALUE 'C',
          hex(1) TYPE x,
          i TYPE i.
    hex = 0.
    DO 256 TIMES.
      i = hex.
      IF text O hex.
        WRITE: / hex, i.
      ENDIF.
      hex = hex + 1.
    ENDDO.
    The output is as follows:
    00          0
    01          1
    02          2
    03          3
    40         64
    41         65
    42         66
    43         67
    Here, the bit structure of the character 'C' is compared to all hexadecimal numbers HEX between '00' and 'FF' (255 in the decimal system), using the operator O. The decimal value of HEX is determined by using the automatic type conversion during the assignment of HEX to I. If the comparison is true, the hexadecimal number and its decimal value are displayed on the screen. The following table shows the bit sequences of the numbers:
    Thanks
    Ashok

  • MySQL to SQL Server Conversion Tools

    Anyone know of any FREE database conversion tools?

    It's not a tool, but you might find Microsoft's documentation helpful.  You might also post this question in a Microsoft SQL Server specific forum.
    "Migrating to SQL Server 2008"
    http://www.microsoft.com/Sqlserver/2008/en/us/migration.aspx

  • SQL Date Conversion

    I have a date in text form in Excel like 41579,41609 but now I need to convert that to date form(YYYYMM) like 201311 ,201312 etc.
    Can somebody help me to figure this out?
    I used :
    Convert ([varchar](10),
    dateadd(day,-2,convert(decimal,substring([Field
    Dt],1,5))),(101))but
    this gives me in 11/01/2013 ......I need
    to get in YYYYMM form...
    SPPandey

    Try:
    DECLARE @dt varchar(20) = 41579;
    SELECT LEFT(Convert ([varchar](10), dateadd(day,-2,convert(decimal,substring(@Dt,1,5))),112), 6);
    -- 201311
    Datetime string conversion:
    http://www.sqlusa.com/bestpractices/datetimeconversion/
    Kalman Toth Database & OLAP Architect
    SELECT Video Tutorials 4 Hours
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Error Message while adding Item in Item Master Data- [Microsoft][SQL Server Native Client 10.0][SQL Server]Conversion failed when converting the nvarchar value 's008 01' to data type int. (CINF)

    Dear Experts
    I am getting the following error message while adding item in Item Master data. I have modified the following SBO_SP_transactionNotification in SQL server after that could not able to add the item
    ALTER proc [dbo].[SBO_SP_TransactionNotification]
    @object_type nvarchar(20),                      -- SBO Object Type
    @transaction_type nchar(1),               -- [A]dd, [U]pdate, [D]elete, [C]ancel, C[L]ose
    @num_of_cols_in_key int,
    @list_of_key_cols_tab_del nvarchar(255),
    @list_of_cols_val_tab_del nvarchar(255)
    AS
    begin
    -- Return values
    declare @error  int                       -- Result (0 for no error)
    declare @error_message nvarchar (200)           -- Error string to be displayed
    select @error = 0
    select @error_message = N'Ok'
    --    IF @OBJECT_TYPE = '59' AND (@TRANSACTION_TYPE = 'A' or @TRANSACTION_TYPE = 'U')
      BEGIN
       IF EXISTS(
        SELECT T0.Price FROM IGN1 T0
        where  IsNull(T0.Price, '0') = '0' and T0.DocEntry = @list_of_cols_val_tab_del)
       BEGIN
        SELECT @ERROR=1,@ERROR_MESSAGE='Please insert the price !'
      END
    end
    -- Select the return values
    select @error, @error_message
    end

    Hi Rathna,
    Just put the SP like this, without the -- before the IF. A -- marks the line as a command therefore you need to uncomment and it will work.
    IF @OBJECT_TYPE = '59' AND (@TRANSACTION_TYPE = 'A' or @TRANSACTION_TYPE = 'U')
      BEGIN
       IF EXISTS(
        SELECT T0.Price FROM IGN1 T0
        where  IsNull(T0.Price, '0') = '0' and T0.DocEntry = @list_of_cols_val_tab_del)
       BEGIN
        SELECT @ERROR=1,@ERROR_MESSAGE='Please insert the price !'
      END
    end
    Hope it helps

  • PL/SQL package conversion to SQL

    Hi,
    Can any one tell me How to convert a package existing in Oracle DB to SQL.
    I am using Oracle 11gR2 on Windows 7. Just want to know the procedure for migration of package to SQL code.

    vickyfin wrote:
    Yes I want to migrate a given PL/SQL package to SQL Server.if it's a single package, then it may be worth just doing it manually. I doubt there is any automated tool that will move some of the more complex functionality that oracle provides though...
    Best of luck - I left a job because they changed my job title from "Oracle Analyst/Developer" to "The SQL server/SSIS guy." just because I said I'd written a T-SQL statement once.
    I've made it a personal rule now, never to volunteer my limited SQL server skills.
    end rant;

  • Native SQL - BINARY_FLOAT conversion to DDIC type

    Hello guys,
    I'm having a little trouble with reading data from an external Oracle database view. I'm using ADBC to execute the SQL statement.
    When I try using ADBC_DEMO_METADATA to read the fields from the view, I get the following result:
    Fieldname          Data type      Length     DDIC Type     DDIC Length
    ZZFIELD             NUMERIC     22           FLTP             8
    Also, if I use ADBC_QUERY, the values are stored in the following format:
    1,1230000000000000E+03
    What I need when reading data into SAP is to get "1,123".
    I've tried defining my field in the SAP structure as:
    1. FLTP_VALUE
    2. f
    3. n LENGTH 8
    4. n LENGTH 22
    ... it didn't work.
    I've also tried using AS_NUMBER(ZZFIELD), still no result.
    If anyone has an idea, please share!
    Thanks,
    Tudor

    Sorry, I put the post in the wrong forum.

  • SQL Error when adding data with UDO + Form

    Good morning, friends.
    Initially, I apologize for any mistakes in my English.
    I am developing an addon for a client and now I came across a problem that started happening about 5 days ago:
    I customized a MasterData postcodes in B1, I created a UDO (oCNSTCEP) and bind to a form created by the Screen Painter. It is noteworthy that this program has been operating without any problems in the customer environment for at least 3 months. Finally, for reasons unknown to the system now has to give the following message when I insert a new record:
    [Microsoft] [SQL Server Native Client 10.0] [SQL Server] Conversion failed When converting the nvarchar value 'oCNSTCEP' to data type int. (CINF)
    The strange thing is that the record is written into the UDT corresponding to the UDO. But the error message is given, giving the user the impression that the routine was not completed successfully.
    Yesterday you told me what is happening the same error in another form, ie, the way any given recording through UDOs are giving problem.
    I searched for this post in SDN and the maximum that I discovered is that it could be happening because of the variable @ object_type in SBO_Notification be as int instead of being as nvarchar (20). I checked the stored procedure and @object_type is nvarchar(20) type.
    I would like to help for a solution to this problem. Since now, thank you!
    Sincerely,
    Junior

    The error is coming from the stored procedure and is easy to fix,
    Anywhere where you check the @object_type, you need to put the value in single quotes.
    e.g if your stored proc includes both of these:
    IF @object_type = 17
    IF @object_type = 'oCNSTCEP'
    It will fail with the error you mentioned. But if you have:
    IF @object_type = '17'
    IF @object_type = 'oCNSTCEP'
    It will work.

  • Error installing ODB+OBIEE in one machine and OWB in another one

    Hello,
    I have two machines with Oracle Linux 5:
    Machine 1 --> Oracle Linux 5 (64 bits) + Oracle DB 11g R2 + OBI 11g R1
    Machine 2 --> Oracle Linux 5 (32 bits) + I would like to have here OWB 11g
    To install OWB in the machine 2 to have access to ODB in the other machine I have followed:
    http://download.oracle.com/docs/cd/E11882_01/owb.112/e17130.pdf --> Chapter 4: Configuring Oracle Warehouse Builder for Linux (I have done these steps over Machine 1):
    @/u01/app/oracle/product/11.2.0/dbhome_1/owb/UnifiedRepos/cat_owb.sql USERS
    @/u01/app/oracle/product/11.2.0/dbhome_1/owb/UnifiedRepos/reset_owbcc_home.sql/u01/app/oracle/product/11.2.0/dbhome_1/owb
    alter user owbsys identified by owbsys account unlock;
    alter user owbsys_audit identified by owbsys_audit account unlock;
    @/u01/app/oracle/product/11.2.0/dbhome_1/owb/UnifiedRepos/remote_owb_install.sql /u01/OWB_RemoteOver Machine 2 I have tried to create the repository:
    /reposinst.shBut in the section "Creating first workspace in the Repository on Linux" in the "OWBSYS Information" screen I have the following error:
    "*El software OWB con la versión compatible se debe instalar localmente en la máquina servidor de base de datos. Si ya está instalado, obtenga las credenciales de usuario de DBA y ejecute el script SQL owb/UnifiedRepos/remote_owb_install.sql. en la máquina servidor de bases de datos. Esto creará un directorio de bases de datos denorminado 'OWB_REMOTE_ADMIN' al que accederá la instalación remota para leer el directorio de servidores de datos OWBHOME/owb/bin/admin. Vuelva a iniciar el Asistente de Respositorios o ejecute el comando de script OMBSEED de OWB para iniciar el repositorio*"
    (OWB with Software-compatible version should be installed locally on the server machine database. If already installed, obtain the user credentials and run the script DBA SQL OWB / UnifiedRepos / remote_owb_install.sql. on the server machine database. This will create a database directory denorminado 'OWB_REMOTE_ADMIN' that will access the remote installation to read the data directory server OWBHOME / OWB / bin / admin. Start the Wizard repositories or run the script command to start OMBSEED of OWB repository)
    Is necessary to install OWB before to run reposinst.sh? Because I can't:
    Error al llamar al destino 'ntcontab.o' del archivo make '/home/oracle/product/11.1.0/OWB/network/lib/inst_net_client.mk'.
    (Failed to call destination 'ntcontab.o' of makefile '/ home/oracle/product/11.1.0/OWB/network/lib/inst_net_client.mk'.)
    I am not about the procedure to follow to install OWB in a different machine over a DB that isn't in local machine.
    I aprreciate any idea to solve it.
    Thank you in advance.
    Regards,
    Mónica.

    Hello,
    I have two machines with Oracle Linux 5:
    Machine 1 --> Oracle Linux 5 (64 bits) + Oracle DB 11g R2 + OBI 11g R1
    Machine 2 --> Oracle Linux 5 (32 bits) + I would like to have here OWB 11g
    To install OWB in the machine 2 to have access to ODB in the other machine I have followed:
    http://download.oracle.com/docs/cd/E11882_01/owb.112/e17130.pdf --> Chapter 4: Configuring Oracle Warehouse Builder for Linux (I have done these steps over Machine 1):
    @/u01/app/oracle/product/11.2.0/dbhome_1/owb/UnifiedRepos/cat_owb.sql USERS
    @/u01/app/oracle/product/11.2.0/dbhome_1/owb/UnifiedRepos/reset_owbcc_home.sql/u01/app/oracle/product/11.2.0/dbhome_1/owb
    alter user owbsys identified by owbsys account unlock;
    alter user owbsys_audit identified by owbsys_audit account unlock;
    @/u01/app/oracle/product/11.2.0/dbhome_1/owb/UnifiedRepos/remote_owb_install.sql /u01/OWB_RemoteOver Machine 2 I have tried to create the repository:
    /reposinst.shBut in the section "Creating first workspace in the Repository on Linux" in the "OWBSYS Information" screen I have the following error:
    "*El software OWB con la versión compatible se debe instalar localmente en la máquina servidor de base de datos. Si ya está instalado, obtenga las credenciales de usuario de DBA y ejecute el script SQL owb/UnifiedRepos/remote_owb_install.sql. en la máquina servidor de bases de datos. Esto creará un directorio de bases de datos denorminado 'OWB_REMOTE_ADMIN' al que accederá la instalación remota para leer el directorio de servidores de datos OWBHOME/owb/bin/admin. Vuelva a iniciar el Asistente de Respositorios o ejecute el comando de script OMBSEED de OWB para iniciar el repositorio*"
    (OWB with Software-compatible version should be installed locally on the server machine database. If already installed, obtain the user credentials and run the script DBA SQL OWB / UnifiedRepos / remote_owb_install.sql. on the server machine database. This will create a database directory denorminado 'OWB_REMOTE_ADMIN' that will access the remote installation to read the data directory server OWBHOME / OWB / bin / admin. Start the Wizard repositories or run the script command to start OMBSEED of OWB repository)
    Is necessary to install OWB before to run reposinst.sh? Because I can't:
    Error al llamar al destino 'ntcontab.o' del archivo make '/home/oracle/product/11.1.0/OWB/network/lib/inst_net_client.mk'.
    (Failed to call destination 'ntcontab.o' of makefile '/ home/oracle/product/11.1.0/OWB/network/lib/inst_net_client.mk'.)
    I am not about the procedure to follow to install OWB in a different machine over a DB that isn't in local machine.
    I aprreciate any idea to solve it.
    Thank you in advance.
    Regards,
    Mónica.

  • How can i Migrate a database from DB2 to SQL Server 2008r2.

    Hi Gurus,
    Kindly help me letting me know the process for migrating the database from DB2 to SQL Server.
    1) Is there any way to migrate a database from DB2 to SqlServer. (My assumption is we can not migrate database, if wrong correct me gurus).
    2) Or we can only transfer data from that DB2 database to SQL Server (Using SSIS packages).
    Please help me knowing the process to migrate the data from DB2 server to MSSQL server. Even am reading the documents available in the web.
    Thanks in advance.. :)

    Microsoft provide a migration assistant for DB2 to SQL Server:
    http://www.microsoft.com/en-us/download/details.aspx?id=45296
    SQL Server Migration Assistant (SSMA) is a free supported tool from Microsoft that simplifies database migration process from DB2 to SQL Server and Azure SQL DB. SSMA automates all aspects of migration including migration assessment analysis, schema and
    SQL statement conversion and data migration. 
    Hope that helps

  • "Conversion to String failed"  When attempting to call rs.getString()

    Hello All,
    I'm getting a "Conversion to String failed" exception being thrown from oracle jdbc when I attempting to call the rs.getString(1) method on a column type of DATE.
    During investigations we've found the following:
    1. The query is fine, and is performing a "select * from table".
    2. I see this problem when using 9i database (v 9.2.0.7) with 9i jdbc drivers (v9.2.0.7).
    3. Strangely enough, if I use 10g jdbc drivers with the 9i database this problem goes away, and naturally I don't see this problem at all using a 10g driver working against a 10g database.
    4. Grabbing the DATE value using the getDate() instead of getString() API works just fine in 9i.
    5. The 9i rs.getString() API call will work with some date values in the database and not with others.
    6. The data placed into the DATE column in question could have been placed there using different driver type from the 9i.
    So, the 9i getString() API seems to be a problem.
    At this point, based upon points 5 and 6 above, I'm thinking there is a bug in the oracle 9i jdbc drivers that is unable to convert DATE type data using the getString() API if the data was initially placed into the database using a different driver type. But, this would mean that the format of the data in the database would be different depending upon the means of getting the data there in the first place (which doesn't make much sense).
    Here is the pertinent Stack Trace:
    java.sql.SQLException: Conversion to String failed
    at oracle.sql.Datum.stringValue(Datum.java:173)
    at oracle.jdbc.driver.ScrollableResultSet.getString(ScrollableResultSet.java:684)
    at oracle.jdbc.driver.OracleResultSet.getString(OracleResultSet.java:1549)
    at com.revenuesolutionsinc.dali.sql.DALResultSet.getString(DALResultSet.java:325)
    Any help on this matter would be greatly appreciated.
    Thanks,
    Doug Newcomb

    Doug,
    Pardon me for stating the obvious, but is there a
    reason why you cannot use method "getDate()" instead
    of method "getString()"?
    For your information, you can report bugs via the
    MetaLink
    Web site.
    Good Luck,
    Avi.Thanks for the reply Avi,
    The main reason is that we've got mountains of code that would need to be refactored. Also, the getString() method worked fine for over a year.
    So we are looking towards finding out why this is happening before making the decision to refactor.
    I will be placing a TAR with Oracle on Monday, but I thought I'd try to find out if anyone else has run into a similar problem.

  • Conversion failed when converting the varchar value 'undefined' to data typ

    Conversion failed when converting the varchar value 'undefined' to data type int.
    hi, i installed oracle insbridge following the instruction in the manual. in rate manager, when i tried to create a new "Normal rating" or "Underwriting", im getting the following exception
    Server Error in '/RM' Application.
    Conversion failed when converting the varchar value 'undefined' to data type int.
    Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
    Exception Details: System.Data.SqlClient.SqlException: Conversion failed when converting the varchar value 'undefined' to data type int.
    Source Error:
    An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
    Stack Trace:
    [SqlException (0x80131904): Conversion failed when converting the varchar value 'undefined' to data type int.]
    System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection) +1948826
    System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +4844747
    System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +194
    System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2392
    System.Data.SqlClient.SqlDataReader.HasMoreRows() +157
    System.Data.SqlClient.SqlDataReader.ReadInternal(Boolean setTimeout) +197
    System.Data.SqlClient.SqlDataReader.Read() +9
    System.Data.SqlClient.SqlCommand.CompleteExecuteScalar(SqlDataReader ds, Boolean returnSqlValue) +50
    System.Data.SqlClient.SqlCommand.ExecuteScalar() +150
    Insbridge.Net.Fwk.DAO.DataAccess.ScalarQuery(String connectionString, String command, Transaction transType, Object[] procParams) +110
    [Exception: Cannot Execute SQL Command: Conversion failed when converting the varchar value 'undefined' to data type int.]
    Insbridge.Net.Fwk.DAO.DataAccess.ScalarQuery(String connectionString, String command, Transaction transType, Object[] procParams) +265
    Insbridge.Net.Fwk.DAO.SqlProcessor.ExecuteScalarQueryProc(String subscriber, String datastore, String identifier, String command, Transaction transType, Object[] procParams) +101
    Insbridge.Net.Fwk.DAO.SqlProcessor.ExecuteScalarQuery(String subscriber, String identifier, String command) +22
    Insbridge.Net.RM.IBRM.ExeScalar(String cmd, Object[] paramsList) +99
    Insbridge.Net.RM.Components.Algorithms.AlgEdit.Page_Load(Object sender, EventArgs e) +663
    System.Web.Util.CalliHelper.EventArgFunctionCaller(IntPtr fp, Object o, Object t, EventArgs e) +14
    System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) +35
    System.Web.UI.Control.OnLoad(EventArgs e) +99
    System.Web.UI.Control.LoadRecursive() +50
    System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +627
    my insbridge versions are as follows
    IBRU 4.0.0 Copyright ©2010, Oracle. All rights reserved. - Version Listing
    RMBUILD.DLL 4.0.0.0 (x86)
    SRLOAD.DLL 3.13.0 (x86)
    IBRM v04.00.0.17
    IB_CLIENT v04.00.0.00
    RM.DLL 4.00.0 (x86)
    IBFA 3.0.2
    OS: Windows Server 2003
    DB: Sql Server 2008
    Browser: IE8
    how do i solve this, please help

    This is an error due to conversion failed from character string to int datatype. Infact, the table column contains "NO" value which you are trying to convert to Int/SUM which is illegal. Without your code and table structure, its difficult to pinpoint your
    actual issue. But check, all columns for value "NO". 

Maybe you are looking for