Go Back   Rhinocerus > Newsgroup > Newsgroup comp.databases.* > Newsgroup comp.databases.informix

Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old 08-16-2012, 03:20 PM
Jonathan Leffler
Guest
 
Posts: n/a
Default Re: How to initialize fields

On Thu, Aug 16, 2012 at 12:00 AM, Francesco Alfano <edacedpa@yahoo.it>wrote:

> How can I write a routine in Esql/C which initialize to 0 (zero) all
> numeric fields (smallint, decimal, etc) and to (' ') space the other
> fields in a table?
>


You've been given answers. I'm going to raise the types not covered by
your question, notably the date and time types.

Zeroing a DATE gives you 1899-12-31. Zeroing an INTERVAL is fine. Zeroing
a DATETIME gives you an error; so does blanking it. What about BYTE and
TEXT and BLOB and CLOB and ...

You don't have to respond to this question — you probably should think
about it enough that you know what you want to do with these types when
they appear.

--
Jonathan Leffler <jonathan.leffler@gmail.com> #include <disclaimer.h>
Guardian of DBD::Informix - v2011.0612 - http://dbi.perl.org
"Blessed are we who can laugh at ourselves, for we shall never cease to be
amused."

Reply With Quote
Alt Today
Advertising
 
and become member of Rhinocerus
Standard Sponsored Links

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




All times are GMT. The time now is 12:48 AM.


Copyright ©2009

LinkBacks Enabled by vBSEO 3.3.0 RC2 © 2009, Crawlability, Inc.