Link to home
Start Free TrialLog in
Avatar of elucero
elucero

asked on

Sql does not recognize null value from Oracle source

Hi, I imported data into sql server from oracle.  Sql does not recoginize the null values from the oracle source.  Does anyone know the work around.  Thanks
Avatar of HainKurt
HainKurt
Flag of Canada image

need more info...

what are you trying to do?
what is the qry?
Avatar of elucero
elucero

ASKER

writing isnull(fieldname) and is not working.  The data was imported from an oracle source.
isnull has 2 parameters...

what is exact query...

what is your data?
Avatar of elucero

ASKER

yea I know I meant isnull(field1,field2)
trying to change the data if it's null but it's not recognizing null value
Avatar of elucero

ASKER

Even when I do where field1 is null - the null value is not recognized
ASKER CERTIFIED SOLUTION
Avatar of HainKurt
HainKurt
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Below Fld1 is the "column name you have for the bad date." If it is not null, it maybe is an empty string.

Select IsNull(Fld1, 'yes null' ) NullYN, len(Fld1) EmptyStringIfZero From Table1

Otherwise, it just could be empty string.

Open in new window


Possible output will be:
NullYN      EmptyStringIfZero
yes null            0
                         0        <-- len is zero but it is not labeled as null
Avatar of Vitor Montalvão
ISNULL() doesn't filter for NULL values.
If you want to filter then you should use IS NULL keyword. This is ANSI so should work for Oracle, SQL Server or any other DBMS.
Example:
SELECT *
FROM Table
WHERE Column IS NULL

Open in new window