Unix Technical Forum

Re: Informix limitations, should we be using Oracle?

This is a discussion on Re: Informix limitations, should we be using Oracle? within the Informix forums, part of the Database Server Software category; --> John Carlson wrote: > On Tue, 18 Nov 2003 14:41:05 +0000, Paul Watson <paul@oninit.com> > wrote: > > >>If ...


Go Back   Unix Technical Forum > Database Server Software > Informix

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-19-2008, 07:27 PM
Mark D. Stock
 
Posts: n/a
Default Re: Informix limitations, should we be using Oracle?


John Carlson wrote:

> On Tue, 18 Nov 2003 14:41:05 +0000, Paul Watson <paul@oninit.com>
> wrote:
>
>
>>If you cast null then it should work OK you need 9.x
>>
>>select null::INT

>
>>from systables;

>
>
>
> Same here:
>
> select null::char(1)
> from systables


I was wondering what the equivalent was in SE. In 4GL you used to be able
to use a blank string, like "". I know Jonathan, I know, it was a bug.. :-)

Anyway, that doesn't work in SQL, but strangely, (or not if it's related to
the 4GL "feature") if you convert an empty string to a numeric value by
adding any numeric value, the string gets converted to NULL along the way.
Now NULL plus any value is...

SELECT ""+0 AS col1 -- or ""+9999 or " "+0 or...
FROM systables
INTO TEMP mds
;
SELECT COUNT(*)
FROM mds
WHERE col1 IS NULL
;

Well it does in SE version 7.24, so maybe it's been fixed now. ;-)

....Oh, maybe not, it also works in IDS 9.40. 8-)

Personally, I wouldn't be inclined to use this method or expect it to be
supported.

Cheers,
--
Mark.

+----------------------------------------------------------+-----------+
| Mark D. Stock mailto:mdstock@MydasSolutions.com |//////// /|
| Mydas Solutions Ltd http://MydasSolutions.com |///// / //|
| +-----------------------------------+//// / ///|
| |We value your comments, which have |/// / ////|
| |been recorded and automatically |// / /////|
| |emailed back to us for our records.|/ ////////|
+----------------------+-----------------------------------+-----------+

sending to informix-list
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 10:36 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com