Re: Empty String Question

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Tibor Karaszi (tibor_please.no.email_karaszi_at_hotmail.nomail.com)
Date: 03/29/04


Date: Mon, 29 Mar 2004 17:20:02 +0200

Forch,

No, these are two different things. I'm surprised that Oracle changes an empty string to NULL. AFAIK, you'd
have to use a trigger to change the values for the INSERT. Or better yet, fix the code ;-).

-- 
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Forch" <anonymous@discussions.microsoft.com> wrote in message
news:A66C975A-852E-4EC5-8B79-A81E91732FB5@microsoft.com...
> Hello everyone..... I hope you are having a great day...
>
> We have recently converted an Oracle Database to SQL Server 2000.  Please consider the following command:
>
> insert into Localtable (SomeTextField) values ('');
>
> In Oracle, the data in stored as NULL, where in SQL Server it is stored as an empty string.
>
> My question is, is there anyway the default for an Empty String can be stored as NULL?
>
> Thanks,
>
> Forch


Relevant Pages

  • Re: Empty Strings, Null values, and options.
    ... A null and an empty string are two completely different things. ... you do in Oracle if you wanted to allow empty strings but not allow NULLs? ... and the way to enclose strings is with single quotes. ... SQL Server MVP ...
    (microsoft.public.sqlserver.setup)
  • Re: Oracle NULL vs revisited
    ... If we had a '' in Oracle then its length would be 0, but we don't, ... invoice identifier. ... Nulls would have been nothing like equivalent ... to using an empty string and would have added needless complexity. ...
    (comp.databases.oracle.server)
  • Re: Sacred EIAS
    ... Handling NULL in RDBMS's also require a lot of attention, ... In Oracle, NULL values are not indexed for example (except in bitmap ... If you query a database from an application, imho you can and always should ... handling would ofcourse be returning an empty string. ...
    (comp.lang.tcl)
  • Re: Weird Query
    ... I'd withdrawn $100 from the account and my receipt said I had $0.00 remaining balance. ... engines that support it. ... As in Oracle you can not (without additional ... attributes) distinguish between NULL and empty string, ...
    (comp.databases.oracle.misc)
  • RE: oracleparameter returns empty resultset
    ... Move to a stored procedure and test input. ... (have not worked in Oracle in months), so alter to correct syntax: ... > when I pass an empty string in one of the paramters the result set is empty. ...
    (microsoft.public.dotnet.framework.adonet)