View previous topic :: View next topic
|
Author |
Message |
meenakshi_forum Warnings : 1 Active User
Joined: 27 May 2008 Posts: 121 Location: India
|
|
|
|
Suppose, there is a file as an output of the values in Database;
There are two cases now, a field set as Null in DataBase
second, some other field set as Not Null in database.
How would the file look like in both the cases?
My Mainframe session is down so i can't check it.
By how would the file look like is, i just want to know the combinations while Hex is on, i want to know the combinations of
? followed by some values, or , ? followed by zeros, or, absence of ?
i want to know all such combinations, which are valid/invalid; normal/abnormal case.
I am also trying to determine that Null and low vales are two different things also, at times Null is equivalent to Low values(please correct if i am going wrong somewahere).
I would really appreciate if i can get some supporting examples.
Thanks. |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8697 Location: Dubuque, Iowa, USA
|
|
|
|
Quote: |
at times Null is equivalent to Low values(please correct if i am going wrong somewahere). |
You are going extremely wrong right here. Null is never equivalent to low values. For a database field to be null (and only database fields can be null -- the concept of null does not exist for a file), there actually is a separate field associated to the database field. This separate nulls field is a binary flag (true meaning the field has no value, no matter what the bits look like, false meaning the field has a value, no matter what the bits look like -- or true and false could be reversed but the same two meanings apply).
As far as what an output file would look like, that depends upon the database software and for that you must consult the manual to find out how that specific database software handles null fields upon export. Without referencing the manual, all you can do is export and then look at the output in hex. |
|
Back to top |
|
|
dbzTHEdinosauer
Global Moderator
Joined: 20 Oct 2006 Posts: 6966 Location: porcelain throne
|
|
|
|
rows in db2 do not have fields, they have columns. |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Why do you now have 2 topics about the same question. . .
Other than mis-use of terminology NULL and Low-Value / High-Value have nothing to do with each other. As you've been told before NULL is the absence of any value and the lo/hi values are values.
At the top of the page is a link to "IBM Manuals" among which are several sets of db2 manuals. You need to read about NULL in the manuals for your release of db2. |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Quote: |
My Mainframe session is down so i can't check it. |
Wait for some time, it must be up...
And following three sentences
meenakshi_forum wrote: |
There are two cases now, a field set as Null in DataBase
second, some other field set as Not Null in database.
How would the file look like in both the cases? |
appeared in the same hierarchy, in your post, as I quote them - and due to them, now I'm not sure what you are asking for? NULL is a concept which Robert has explained in golden words. BUT are you talking about DB or files? |
|
Back to top |
|
|
Anuj Dhawan
Superior Member
Joined: 22 Apr 2006 Posts: 6250 Location: Mumbai, India
|
|
|
|
Another thought, did you mean if a colum is defined as NOT NULL and then (for an experiment) defined the same column as NULL and one unload the db2-table to a file - what difference would it make to the column values which were unloaded to the file, in both the cases? |
|
Back to top |
|
|
|