Count of NULL field from SQL Server

Hi All,
OBIEE 11g
I have a requirement to count the number of rows from a table in SQL Server that has NULL values in that particular field. In the BMM I have placed a metric called Total Count and the aggregation for this is Count. The case statement I have in the BMM is as follows.
CASE <FIELD TO COUNT>
WHEN NULL THEN 1
WHEN ' ' THEN 1
ELSE 0
I am not getting the correct results for this count.

Try this
sum(
CASE WHEN COL is null or COL =' ' or COL ='' THEN 1 ELSE 0 END)
If you count 0 also counting.
Pls mark as correct/helpful if helps

Similar Messages

  • Problems with TIMESTAMP Field from SQL Server

    OBIEE 11g
    Hi All,
    I want to convert data into OBIEE that is coming from a TIMESTAMP field in SQL Server Database. So in SQL Server field has data like '9/20/2012 12:05:08 AM'. I have first changed the datatype in physical layer to DATETIME and then in BMM I do a CAST(<DATE_FIELD> AS DATE). On the frontend when I use this column the error I get back is [nQSError: 59030] Illegal data type conversion from source type: VARBINARY to target type: TIMESTAMP. (HY000). Does anyone know a workaround or solution.
    Thanks in Advance!

    Hi Guys,
    None of the solutions you mentioned have worked unfortunately. I have a date column and another column that holds user id. I basically want to do a count of all the user id's where that particular date column is NULL. I have checked in the physical layer and the date column in question is coming from SQL Server as a TIMESTAMP datatype. So I initially did not change anything and brought the column in as is but that did not work out. I then tried to change the datatype in the physical layer to DATETIME and then also DATE. After changing the datatype in the physical layer in the BMM I would do a CAST(<date column> as DATE) and this still did not work. I then tried to just change the datatype to DATETIME and DATE without doing the CAST in the BMM and this still did not work. Not too sure what to do now.

  • Migrating a table with BLOB field from SQL-Server to Oracle.

    Hi All,
    I'm trying to create a Class to migrate data from SQL-Server to Oracle, this table has a BLOB field.
    The Code:
    package br.com.infox;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.Statement;
    public class Migrador {
         public static void main(String[] args){
              try {
                   // Conex�o com o SQL Server
                   Class.forName("net.sourceforge.jtds.jdbc.Driver");
                   Connection conSQL = DriverManager.getConnection ("jdbc:jtds:sqlserver://10.10.2.9/protocolo","prot","suinf2002");
                   // Conex�o com o Oracle
                   Class.forName("oracle.jdbc.driver.OracleDriver");
                   Connection conORA = DriverManager.getConnection ("jdbc:oracle:thin:@10.10.2.2:1521:des","protocolo","protocolo");
                   Statement stSQL = conSQL.createStatement();
                   String querySQL = "SELECT * FROM DOC_INCORPORADO";
                   ResultSet rsSQL = stSQL.executeQuery(querySQL);
                   String queryORA = "INSERT INTO PROT_VITALICIAMENTO (NU_PROCESSO, ANO_PROCESSO, CD_USUARIO, DT_ENVIO," +
                             "DE_COMPLEMENTO, NM_ARQUIVO, ARQUIVO, NU_SEQ, CD_TIPO_ARQUIVO, MES, ANO) VALUES (?,?,?,?,?,?,?,?,?,?,?)";
                   PreparedStatement psORA = conORA.prepareStatement(queryORA);
                   while (rsSQL.next()){
                        System.out.println("Linha: " + rsSQL.getRow());
                        psORA.setInt(1, rsSQL.getInt("nu_processo"));
                        psORA.setInt(2, rsSQL.getInt("ano_processo"));
                        psORA.setInt(3, rsSQL.getInt("cd_usuario"));
                        psORA.setDate(4, rsSQL.getDate("dt_incorporacao"));
                        psORA.setString(5, rsSQL.getString("complemento"));
                        psORA.setString(6, rsSQL.getString("nm_arquivo"));
                        psORA.setBinaryStream(7, rsSQL.getBinaryStream("arquivo"), (int)rsSQL.getBlob("arquivo").length());
                        psORA.setInt(8, rsSQL.getInt("num_seq"));
                        psORA.setInt(9, rsSQL.getInt("cd_tipo_arquivo"));
                        psORA.setInt(10, rsSQL.getInt("mes"));
                        psORA.setInt(11, rsSQL.getInt("ano"));
                        psORA.executeUpdate();
                   stSQL.close();
                   psORA.close();
                   conORA.close();
                   conSQL.close();
              } catch (Exception e){
                   e.printStackTrace();
    The ERROR:
    java.sql.SQLException: Exce��o de E/S: Connection reset
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:134)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:179)
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:334)
         at oracle.jdbc.ttc7.TTC7Protocol.handleIOException(TTC7Protocol.java:3668)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java:1986)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteFetch(TTC7Protocol.java:1119)
         at oracle.jdbc.driver.OracleStatement.executeNonQuery(OracleStatement.java:2191)
         at oracle.jdbc.driver.OracleStatement.doExecuteOther(OracleStatement.java:2064)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:2989)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:658)
         at br.com.infox.Migrador.main(Migrador.java:41)
    What's the problem of these Class?
    Thank's.

    Depending on the version of the database you have, you could use transportable tablespaces.
    http://download-east.oracle.com/docs/cd/B10501_01/server.920/a96524/c04space.htm#9370

  • Get the connected users count from sql server using powershell

    Hi,
    I am working on SharePoint 2013,I am having SQL server 2012.
    I want to get the Connected Users count from  sql server using power shell.
    Can any one please let me know how to implement.
    Thanks in advance.
    Regards,
    Phani Kumar R

    Sorry Tom, I dont like to hear "There is no way" :-(
    There is always a way in computer to get what you need (at least it is good as Rule of thumb). I am not sure we will find it here (in a voluntary supporting forum).
    Now we (or better the architect of their system) should think of the way :-)
    Of course doing so in the forum, while we do know the system and only got a glimpse on what is needed, is not the best idea. I will point some issues which can be related to a solution. Those are not a solotions as it is but something we can use for a solution
    once something look in the right way.
    * A web connects counter is one of the easier thing to do. The basic idea is just to use the connect event and the disconnect event an adding 1 or removing 1 from the counter. This is best to do in the application using static variable as any way the second
    the application is down the counter can be go to hell as we know there is no one connect (there for a counter do not use database usually). Using a web dot-net (or asp 3) application this is done most of the time using the global.asa/global.asax file, which
    include the application and session events. for example using the method Session_Start
    protected void Session_Start(object sender, EventArgs e) {
    // Code that runs when a new session is started
    * IIS have a build-in loging system where we can log each and every request/response or only logins users. There is lot we can do with this log files including data mining. Using small bulk insert script we can use the SQL agent to insert those logs to the
    database and get the information we need.
    * any web developer i want to believe know about the Fiddler application which we use to monitor traffic. A proxy is not the only way to to monitor traffic (it is not good for our case as this is in the client side), there are several option in the server
    side.
    * SQL trigger on logon can be use to get information on who is loging on and can be logging only specific source (like our sharepoint IP or any sharepoint application). This information (what is the application which connect to the server can be retrive
    in several solution without using a trigger as well)
    *** (I'll be brief ... I'm getting bored... probably the reader feel the same)
    * using extended events and/or profiler we can monitor any connection and save the data or just remember it in shared (static) variable (this
    blog show how to do it by the way). Again we can monitor specific application or use any filter in order to get only the sharepoint users
    .... and i can continue for several days more :-) ...
    "If there is a willing, then there's a way"
    "If you can't do it, Then someone else probably can"
    "Never say never"
    I hope this help somehow :-)
    [Personal Site] [Blog] [Facebook]

  • Need help in migrating data from SQL Server to Oracle

    Hi,
    I've created a database link in my Oracle Database 11g Express Edition connecting to our SQL Server 2005 Enterprise Database. Now, I'm having issues on migrating some fields. Mostly Text field in SQL Server to CLOB in Oracle. I've created a PL/SQL Procedure to do this but somehow these columns don't get all the value.
    For example:
    In my sql server, I have a table SQLTBL with a field REMARKS of TEXT data type. It has the following value.
    This is line 1.
    This is line 2.
    This is line 3.
    Now I created a table ORCLTBL in oracle with field REMARKS of CLOB data type.
    In my procedure I do something like.
    begin
      for i in ( select "remarks" rem from "dbo"."sqltbl"@sqldb )
      loop
        insert into orcltbl ( remarks ) values (i.rem);
      end loop;
      commit;
    end;
    /When I select the data from oracle it will only show "This is line 1" and disregard the values after the new line character.
    Is there a way to make this work?
    Thanks,
    Allen

    Allen Sandiego wrote:
    Hi,
    I've created a database link in my Oracle Database 11g Express Edition connecting to our SQL Server 2005 Enterprise Database. Now, I'm having issues on migrating some fields. Mostly Text field in SQL Server to CLOB in Oracle. I've created a PL/SQL Procedure to do this but somehow these columns don't get all the value.
    For example:
    In my sql server, I have a table SQLTBL with a field REMARKS of TEXT data type. It has the following value.
    This is line 1.
    This is line 2.
    This is line 3.
    Does the above mean, you have Three records or it is One record spanning in Three lines?
    Now I created a table ORCLTBL in oracle with field REMARKS of CLOB data type.
    In my procedure I do something like.
    begin
    for i in ( select "remarks" rem from "dbo"."sqltbl"@sqldb )
    loop
    insert into orcltbl ( remarks ) values (i.rem);
    end loop;
    commit;
    end;
    /When I select the data from oracle it will only show "This is line 1" and disregard the values after the new line character.
    Probably, assuming that there is only One record, SQL server is sending the data as separate rows as opposed to a Single Row.
    Can you provide the Output of below when executed from Oracle terminal? (I hope you understand the motive of query, and pardon my knowledge of SQL Server if the query below does not work :) )
    select count("remarks"), "remarks" rem from "dbo"."sqltbl"@sqldb group by "remarks";

  • Fetch the data from sql server table to array

    In the following script i am fetching the servers details from text file. Please anyone help me to get the same information from sql server database table. with using this query
    "SELECT DISTINCT [server_name]
    FROM
    Servers] where
    Status='1'"
    $ServerName =Get-Content "c:\servers\servers.txt"
     foreach ($Server in $ServerName) {
         if (test-Connection -ComputerName $Server -Count 4 -Delay 2 -Quiet ) {
           write-output "$Server is alive and Pinging `n"
           } else {
    Write-output "TXUE $Server seems dead not pinging"

    i have tested it is not working..
    =@"
    SELECT DISTINCT [server_name] FROM Servers] where Status='1'
    $connection
    =new-objectsystem.data.sqlclient.sqlconnection(
    "Data Source=xxx;Initial Catalog=xxx;Integrated Security=SSPI;”)
    $adapter
    =new-objectsystem.data.sqlclient.sqldataadapter($query,
    $connection)
    $table
    =new-objectsystem.data.datatable
    $adapter
    .Fill($table)
    | out-null
    $compArray
    =@($table)
    ##### Script Starts Here ######
    foreach($Serverin$ServerName)
    if(test-Connection-ComputerName$Server-Count4
    -Delay2
    -Quiet)
    write-output"$Server
    is alive and Pinging `n"
    else{
    $query

  • Migration issue in SQL Developer (from SQL Server to Oracle)

    Dear All,
    I am using SQL Developer 3.0 to migrate data from SQL Server 2008 to Oracle 11gR2. I used Quick Migration Wizard for migrating and everything was Ok but when it was running migration process, I got this message: “Migration actions have failed. Check the migration reports for details. : null”
    But there was not any report to check. Does anyone know how I can do it without any problem?
    Thanks in advance.

    I am working on a project to migrate from SQL Server 2008 to Oracle 11gR2. It includes some tables, views, indexes, triggers and store procedures. At first I worked on SQL Developer 2.1.1.64 but it doesn’t support SQL Server 2008 (I had to use SQL Server 2005 in its offline options). I got a lot of error when I used the offline options. I know that I may be having some problem in table or view definition in my SQL Server but if I don’t have any log file I can’t solve them.
    Unfortunately, in SQL Developer 3.0 there isn’t any option to generate a SQL comments from objects (convert to Oracle) because I need to rewrite comments if they have problem. For example I have a filed named USER that it’s a reserved word in Oracle so I have to change this field name.
    I also can’t use “Translation Scratch Editor” because it has some error to convert. For example when I use it for the following code:
    CREATE TABLE [dbo].[Table1](
         [ID1] [int] IDENTITY(1,1) NOT NULL,
         [Name1] [varchar](50) NULL,
         CONSTRAINT [PK_Table1] PRIMARY KEY CLUSTERED
         [ID1] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    CREATE TABLE [dbo].[Table2](
         [ID2] [int] IDENTITY(1,1) NOT NULL,
    [Name1] [varchar](50) NULL,
         CONSTRAINT [PK_Table2] PRIMARY KEY CLUSTERED
         [ID2] ASC
    )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
    ) ON [PRIMARY]
    I receive a wrong code like this:
    CREATE SEQUENCE Table1_ID1
    START WITH 1
    INCREMENT BY 1;
    CREATE TABLE Table1
    ID1 NUMBER(10,0) NOT NULL,
    Name1 VARCHAR2(50) ,
    CONSTRAINT PK_Table1 PRIMARY KEY( ID1 )
    CREATE OR REPLACE TRIGGER Table1_ID1_TRG
    BEFORE INSERT
    ON Table1
    FOR EACH ROW
    BEGIN
    SELECT Table1_ID1.NEXTVAL INTO :NEW.ID1
    FROM DUAL;
    END;
    CREATE SEQUENCE Table1_ID1
    START WITH 1
    INCREMENT BY 1;
    CREATE SEQUENCE Table2_ID2
    START WITH 1
    INCREMENT BY 1;
    CREATE TABLE Table2
    ID2 NUMBER(10,0) NOT NULL,
    Name1 VARCHAR2(50) ,
    CONSTRAINT PK_Table2 PRIMARY KEY( ID2 )
    CREATE OR REPLACE TRIGGER Table1_ID1_TRG
    BEFORE INSERT
    ON Table1
    FOR EACH ROW
    BEGIN
    SELECT Table1_ID1.NEXTVAL INTO :NEW.ID1
    FROM DUAL;
    ENDCREATE OR REPLACE TRIGGER Table2_ID2_TRG
    BEFORE INSERT
    ON Table2
    FOR EACH ROW
    BEGIN
    SELECT Table2_ID2.NEXTVAL INTO :NEW.ID2
    FROM DUAL;
    END;

  • How to convert from SQL Server table to Flat file (txt file)

    I need To ask question how convert from SQL Server table to Flat file txt file

    Hi
    1. Import/Export wizened
    2. Bcp utility
    3. SSIS 
    1.Import/Export Wizard
    First and very manual technique is the import wizard.  This is great for ad-hoc and just to slam it in tasks.
    In SSMS right click the database you want to import into.  Scroll to Tasks and select Import Data…
    For the data source we want out zips.txt file.  Browse for it and select it.  You should notice the wizard tries to fill in the blanks for you.  One key thing here with this file I picked is there are “ “ qualifiers.  So we need to make
    sure we add “ into the text qualifier field.   The wizard will not do this for you.
    Go through the remaining pages to view everything.  No further changes should be needed though
    Hit next after checking the pages out and select your destination.  This in our case will be DBA.dbo.zips.
    Following the destination step, go into the edit mappings section to ensure we look good on the types and counts.
    Hit next and then finish.  Once completed you will see the count of rows transferred and the success or failure rate
    Import wizard completed and you have the data!
    bcp utility
    Method two is bcp with a format file http://msdn.microsoft.com/en-us/library/ms162802.aspx
    This is probably going to win for speed on most occasions but is limited to the formatting of the file being imported.  For this file it actually works well with a small format file to show the contents and mappings to SQL Server.
    To create a format file all we really need is the type and the count of columns for the most basic files.  In our case the qualifier makes it a bit difficult but there is a trick to ignoring them.  The trick is to basically throw a field into the
    format file that will reference it but basically ignore it in the import process.
    Given that our format file in this case would appear like this
    9.0
    9
    1 SQLCHAR 0 0 """ 0 dummy1 ""
    2 SQLCHAR 0 50 "","" 1 Field1 ""
    3 SQLCHAR 0 50 "","" 2 Field2 ""
    4 SQLCHAR 0 50 "","" 3 Field3 ""
    5 SQLCHAR 0 50 ""," 4 Field4 ""
    6 SQLCHAR 0 50 "," 5 Field5 ""
    7 SQLCHAR 0 50 "," 6 Field6 ""
    8 SQLCHAR 0 50 "," 7 Field7 ""
    9 SQLCHAR 0 50 "n" 8 Field8 ""
    The bcp call would be as follows
    C:Program FilesMicrosoft SQL Server90ToolsBinn>bcp DBA..zips in “C:zips.txt” -f “c:zip_format_file.txt” -S LKFW0133 -T
    Given a successful run you should see this in command prompt after executing the statement
    Starting copy...
    1000 rows sent to SQL Server. Total sent: 1000
    1000 rows sent to SQL Server. Total sent: 2000
    1000 rows sent to SQL Server. Total sent: 3000
    1000 rows sent to SQL Server. Total sent: 4000
    1000 rows sent to SQL Server. Total sent: 5000
    1000 rows sent to SQL Server. Total sent: 6000
    1000 rows sent to SQL Server. Total sent: 7000
    1000 rows sent to SQL Server. Total sent: 8000
    1000 rows sent to SQL Server. Total sent: 9000
    1000 rows sent to SQL Server. Total sent: 10000
    1000 rows sent to SQL Server. Total sent: 11000
    1000 rows sent to SQL Server. Total sent: 12000
    1000 rows sent to SQL Server. Total sent: 13000
    1000 rows sent to SQL Server. Total sent: 14000
    1000 rows sent to SQL Server. Total sent: 15000
    1000 rows sent to SQL Server. Total sent: 16000
    1000 rows sent to SQL Server. Total sent: 17000
    1000 rows sent to SQL Server. Total sent: 18000
    1000 rows sent to SQL Server. Total sent: 19000
    1000 rows sent to SQL Server. Total sent: 20000
    1000 rows sent to SQL Server. Total sent: 21000
    1000 rows sent to SQL Server. Total sent: 22000
    1000 rows sent to SQL Server. Total sent: 23000
    1000 rows sent to SQL Server. Total sent: 24000
    1000 rows sent to SQL Server. Total sent: 25000
    1000 rows sent to SQL Server. Total sent: 26000
    1000 rows sent to SQL Server. Total sent: 27000
    1000 rows sent to SQL Server. Total sent: 28000
    1000 rows sent to SQL Server. Total sent: 29000
    bcp import completed!
    BULK INSERT
    Next, we have BULK INSERT given the same format file from bcp
    CREATE TABLE zips (
    Col1 nvarchar(50),
    Col2 nvarchar(50),
    Col3 nvarchar(50),
    Col4 nvarchar(50),
    Col5 nvarchar(50),
    Col6 nvarchar(50),
    Col7 nvarchar(50),
    Col8 nvarchar(50)
    GO
    INSERT INTO zips
    SELECT *
    FROM OPENROWSET(BULK 'C:Documents and SettingstkruegerMy Documentsblogcenzuszipcodeszips.txt',
    FORMATFILE='C:Documents and SettingstkruegerMy Documentsblogzip_format_file.txt'
    ) as t1 ;
    GO
    That was simple enough given the work on the format file that we already did.  Bulk insert isn’t as fast as bcp but gives you some freedom from within TSQL and SSMS to add functionality to the import.
    SSIS
    Next is my favorite playground in SSIS
    We can do many methods in SSIS to get data from point A, to point B.  I’ll show you data flow task and the SSIS version of BULK INSERT
    First create a new integrated services project.
    Create a new flat file connection by right clicking the connection managers area.  This will be used in both methods
    Bulk insert
    You can use format file here as well which is beneficial to moving methods around.  This essentially is calling the same processes with format file usage.  Drag over a bulk insert task and double click it to go into the editor.
    Fill in the information starting with connection.  This will populate much as the wizard did.
    Example of format file usage
    Or specify your own details
    Execute this and again, we have some data
    Data Flow method
    Bring over a data flow task and double click it to go into the data flow tab.
    Bring over a flat file source and SQL Server destination.  Edit the flat file source to use the connection manager “The file” we already created.  Connect the two once they are there
    Double click the SQL Server Destination task to open the editor.  Enter in the connection manager information and select the table to import into.
    Go into the mappings and connect the dots per say
    Typical issue of type conversions is Unicode to non-unicode.
    We fix this with a Data conversion or explicit conversion in the editor.  Data conversion tasks are usually the route I take.  Drag over a data conversation task and place it between the connection from the flat file source to the SQL Server destination.
    New look in the mappings
    And after execution…
    SqlBulkCopy Method
    Sense we’re in the SSIS package we can use that awesome “script task” to show SlqBulkCopy.  Not only fast but also handy for those really “unique” file formats we receive so often
    Bring over a script task into the control flow
    Double click the task and go to the script page.  Click the Design script to open up the code behind
    Ref.
    Ahsan Kabir Please remember to click Mark as Answer and Vote as Helpful on posts that help you. This can be beneficial to other community members reading the thread. http://www.aktechforum.blogspot.com/

  • How to delete the Folder from sql server 2008

    Hi all,
    I was trying to delete the folder from sql server 2008 with the below script
    DECLARE @path VARCHAR(256) -- path for backup files
    DECLARE @cmd VARCHAR(8000)
    DECLARE @folderName VARCHAR(256) -- filename for backup
    SET @folderName = + (CONVERT(varchar(10), GETDATE()-7, 112))  -- 7 days back date folder name
    SET @path = 'I:\Backup_Test\' + @folderName -- Folder path
    SET @cmd = 'del ' + @path -- Delete
    EXEC master..xp_cmdshell @cmd
    --Print @cmd
    This is not working it was asking the Confirmation (I:\Backup_Test\20100629\*, Are you sure (Y/N)? ) what will i do to the delete the folder.
    Thanks,
    Prasad R.

    I would notice   you that T-SQL does not play well to do things like that. Do not you want using .net language to delete folders?
    Old method is
    declare @HR int, @CFOLDER varchar(255),@FSO int
        set @CFOLDER='D:\folder\'
        EXEC @HR = sp_OACreate 'Scripting.FileSystemObject', @FSO OUT
        EXEC @HR = sp_OAMethod @FSO, null, 'DeleteFolder', @CFOLDER 
    Now regarding to your second question please examine xp_fileexist  system stored procedure
    CREATE FUNCTION dbo.fn_file_exists(@filename VARCHAR(300))
      RETURNS INT
    AS
    BEGIN
      DECLARE @file_exists AS INT
      EXEC master..xp_fileexist @filename, @file_exists OUTPUT
      RETURN @file_exists
    END
    GO
    -- test
    SELECT dbo.fn_file_exists('c:\a.txt')
    Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/

  • Related to migration of db from sql server to oracle 11 g

    We're trying to migrate a Sql server managment studio database to Oracle 11g using SQL Developer 4.0. We can successfully connect to both Sql server managment studion 8.0 and Oracle 11g using the tool, as well as click through the Migration Wizard and start the migration.
    This opens the Database Migration dialog box, which indicates the capture process starts normally. we get the following error:
    ora :01440 : can not insert null into migrlog (id column) ,
    \and then after some time , i get an error that migration failed
    i am not getting the reason,I thing it may be due to reason that , I have table's column in my source db with more than 30 character.
    If i am migrating one by one table . then it is not giving any error, and identifier name is getting shrink in 30 character. but i am not getting the view , stored procedure , indexes , and others
    then what is the solution  for that, somebody pls suggest any help?????????????               

    Pl do not post duplicates - related to migration of db from sql server to oracle 11 g
    Continue the discussion in your original thread
    The error message is explicitly clear
    ora :01440 : can not insert null into migrlog (id column)
    Your process is trying to insert a NULL value into the ID column, which presumably cannot be NULL

  • Workarounds for searching a text field in SQL Server 2000

    Hi,
    I have a need to search within a text field in SQL Server 2000. In the
    limitations section it notes that this is not possible. Is there a
    recommended workaround for this in terms of performance? I have no way
    of knowing the length of the text field in advance, and this could be
    fairly large. Also, the number of objects that could contain the text
    can be fairly large as well.
    Thanks in advance,
    Khamsouk

    Note that some databases (or Oracle, at least) provide alternatives to
    LIKE '%foo%' that are more efficient for large text blocks, given that
    you have the appropriate indexing plugins etc. etc.
    To use one of those types of search operators, you'd have to put
    together a custom extension.
    -Fred
    Fred Lucas <[email protected]> wrote:
    I'm assuming that when you say 'a text field', you're referring to a
    SQLServer TEXT field, as opposed to just any old field that contains
    text.
    Like I said, I'm by no means a SQLServer pro, but I just ran:
    SELECT CLOBSTRINGX
    FROM LOCATORTESTOBJECTX
    WHERE CLOBSTRINGX LIKE '%o%';
    and got back my test row with 'foo' in the CLOBSTRINGX column.
    CLOBSTRINGX is a TEXT column.
    So, it is possible that our stringContains() extension will just work.
    But then again, maybe not. I'm guessing it will.
    Give it a try and, if you get an error, post the generated SQL (turn on
    SQL output by setting the com.solarmetric.kodo.Logger property to
    'stdout') and the error that you get. Also, try executing the generated
    SQL directly against your data store to see if it works there.
    -Fred
    Khamsouk Souvanlasy <[email protected]> wrote:
    Basically I just want to use kodo's extended stringContains syntax on a
    text field. Is this possible?
    Khamsouk
    Fred Lucas wrote:
    I'm not intimitely familiar with SQLServer's text searching
    capabilities, but I'm confident that you could create a query extension
    that would do what you need it to do.
    What is the SQL that you are trying to generate?
    -Fred
    Khamsouk Souvanlasy <[email protected]> wrote:
    Hi,
    I have a need to search within a text field in SQL Server 2000. In the
    limitations section it notes that this is not possible. Is there a
    recommended workaround for this in terms of performance? I have no way
    of knowing the length of the text field in advance, and this could be
    fairly large. Also, the number of objects that could contain the text
    can be fairly large as well.
    Thanks in advance,
    Khamsouk
    Fred Lucas
    SolarMetric Inc.
    202-595-2064 x1122
    http://www.solarmetric.com

  • Problem in Import of Tables from SQL Server.

    Hi Forum,
    I m new to OWB.
    I m facing a prob regarding the import of tables.
    I m importing tables from SQL server through ODBC DB Link..
    It imports the tables fine, but without key constraints..
    Can u tell me, Why? and How can I import that info as well?

    Hi David,
    The things I said are not a fix for this problem.
    If your RCU installation worked, then you do not have to worry about modifying the createfr.sql.
    Edit:
    I've just tracked the problem. It appears that when using the query builder, BI forgets to add the " sign.
    For example:
    This query will give the hyperion error.
    select     "table"."field"
    from     "database.user"."table"
    To correct it write it like this:
    select     "table"."field"
    from     "database"."user"."table"
    Edited by: EBA on Nov 14, 2011 10:21 AM

  • How to extract incremental data from SQL server to oracle tables in ODI

    HI All,
    In my ODI sql server is install.My Source is in SQL server and my target is in Oracle.
    I need to create a interface mapping where i need to extract incremental data from sql server to oracle.
    There is a datetime(with Timestamp) field in sql server .I need to pull incremental data based on dateime.
    Example = tablename.DateTime > (select '1-jan-11' from dual) .....i am using this query but its not woking.the error is Invalid object name"dual".
    We are not going to use Incremental in IKM and LKM.
    Request you to please provide any suggestion ASAP.
    Thanks,
    Lony

    You can do that via Variable.
    In the interface mapping create a filter on Tablename.DateTime
    and put the condition like this
    Tablename.DateTime BETWEEN #VAR and in the variable use this query in refreshing tab with oracle schema
    SELECT max(start_time)||' AND '||max(END_TIME)+1 from audit_table where ETL_JOB_CODE = '20'In the package call the above variable in refresh mode and then interface.
    This way you will pass from the query between and condition date and pass to interface so that SQL Server fetches the data between those too range.
    Note:- You might need to tweak the date format so that SQL Server can understand.
    Hope this helps.

  • How could I create a "Linked Server" link from SQL Server 2008R2 64-Bit to Oracle Database 11.2 64-Bit?

    How could I create a "Linked Server" link from SQL Server 2008R2 64-Bit to Oracle Database 11.2 64-Bit?
    Let's say the SQL Server and Oracle Database are in the same Company Internet Network.
    I have the code, but I do not know how to use it. Such as what is System DSN Name? Where could I get it. What does it look like?
    Do I need to install any Oracle Client Software in order to link from SQL Server to Oracle? Or SQL Server has the built-in drivers installed already that I can directly create a Linked Server from SQL Server to Oracle?
    I need to know details. Thanks.
    USE master
    go
    EXEC sp_addlinkedserver
         @server  = '{Linked Server Name}'
        ,@srvproduct = '{System DSN Name}'
        ,@provider  = 'MSDASQL'
        ,@datasrc  = '{System DSN Name}'
    EXEC sp_addlinkedsrvlogin
         @rmtsrvname = '{Linked Server Name}'
        ,@useself  = 'False'
        ,@locallogin = NULL
        ,@rmtuser  = '{Oracle User Name}'
        ,@rmtpassword = '{Oracle User Password}'

    You need an OLE DB provider for Oracle. There is one that ships with Windows, but it only supports very old versions of Oracle. Oracle has an OLE DB provider that you can use. I don't know if it's part of Oracle Client or how it is bundled.
    You should not use MSDASQL or any DSN.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Data length problem migrating from sql server 7 to oracle 8i

    I just migrated SQL Server 7 database to Oracle 8i db and everything seemed to have ran ok except that in my newly created oracle database, the field size is doubled. For instance a field with nvarchar(4) in sql server would convert to varchar2(8). Has anyone ran into this problem and also does anyone know how to fix it? Thank you so much.

    Hi Roberto,
    You cannot use Workbench 1.2.2 to migrate from SQL Server 7 to
    Oracle 8.
    However, the good news is that we have a new verion of the
    workbench that will have a plugin that can migrate from SQL
    Server 7.0 to Oracle8.
    A beta version will be downloadable from this web-site in approx
    one week. Eventhough this version is a beta version, it has
    undergone some rigourous testing and is very close to production.
    Regards
    John
    Roberto Werneck (guest) wrote:
    : I would like to know if it is possible to use the workbench
    : 1.2.2 to migrate from SQL Server 7 to Oracle 8. If possible
    what
    : kinds of problems would i probably have. If not, how can i get
    : the Beta version ?
    : Thanks,
    Oracle Technology Network
    http://technet.oracle.com
    null

Maybe you are looking for

  • Is there a way to password protect the access options pannel, in particular the Connection Settings?

    Is there a way that access to the Options panel can be locked by an administrator. In particular I would like to block a user from being able to change the proxy server settings in Tools > Options > Advanced > Network > Connection Settings. I would l

  • Can anybody translate this one-line Visual Basic into AppleScript?

    I have been pulling my hair out in trying to get InDesign CS4 to markup selected text with an XML tag. Supposedly this can be done using Visual Basic. Is there anybody out there that could possibly translate this seemingly simply code into AppleScrip

  • OWB 11.2.0.4 on Windows 7

    According to My Oracle Support doc id 340955.1, OWB 11.2.0.4 standalone client is available on Windows 64-bit. According to MOS doc id 1073079.1 only OWB client 11.2.0.3 is certified on Windows 7 64-bit platform. I'd like to know if OWB client 11.2.0

  • Bridge CS4 Slideshow & Tripod web hosting

    I have not been able to fully open the slidshows I have created in Bridge and ftped to  'Triod' where my website is hosted. [Please no snickering over my web site being on Tripod.] I have contacted Tripod but have not received a response so far.  I h

  • Does Mac OS 10.4.9 play nicely with FHMX?

    Hi Mac users, I've just received notification of the Mac 10.4.9 updater. Have any of you brave FH users installed it? Any issues? It looks like a few things, like font handling, might get better ... or they might get worse. Judy Arndt