10-17-2008 6:59 PM
Added SPART in a custom table , I am trying to retrieve an entry from that table where SPART is SPACE. This works fine in DEV, in Q system the select does not work.. What could be the reason ?
10-20-2008 10:53 AM
>
> Added SPART in a custom table , I am trying to retrieve an entry from that table where SPART is SPACE. This works fine in DEV, in Q system the select does not work.. What could be the reason ?
Are you sure that SPART = SPACE? I've noticed before that when you add a new character field to an existing table that already contains records, the default value for the new field on the existing records is NULL and not SPACE. Try replacing the = SPACE with IS NULL.
If this is the case, I think that if you update the record the default will then be changed from NULL to SPACE.
10-17-2008 7:06 PM
What do you mean 'does not work'? Does it dump, give an error message, a return code??
Rob
10-17-2008 7:23 PM
The query does not return a record when there are many records with SPART = SPACE
10-17-2008 7:28 PM
10-18-2008 7:11 PM
10-20-2008 6:55 AM
Hi sridhar,
Chek if there is any data for SPART in your custom table in Q system...
-Goodluck,
Bhumika
10-20-2008 10:53 AM
>
> Added SPART in a custom table , I am trying to retrieve an entry from that table where SPART is SPACE. This works fine in DEV, in Q system the select does not work.. What could be the reason ?
Are you sure that SPART = SPACE? I've noticed before that when you add a new character field to an existing table that already contains records, the default value for the new field on the existing records is NULL and not SPACE. Try replacing the = SPACE with IS NULL.
If this is the case, I think that if you update the record the default will then be changed from NULL to SPACE.
10-20-2008 3:59 PM
Hi Christine.. You have understood the problem perfectly... Thank you .. I have even tried with NULL, even that does not work, I mean it does not retrieve the record...Is it by any chance dependent on the database ? We are using Oracle... Just FYI... I have used the database utility and tried to adjust the table, I was hoping that would get in a space into SPART , even then no luck... Only way out that looked to me was getting the user to put a space into each of the record through SM30...
10-20-2008 4:26 PM
It won't work if you put the word NULL into SE16 but it will work if you put SPART IS NULL in a SQL statement in a program - I'm not sure which you are doing.
You can avoid this problem if you tick the Initial Values box when you create the field in SE11.
10-21-2008 2:11 AM