The always interesting issue of NULL Vs Blank is driving me bit crazy now.
I have two ESQL/C structures that represent two tables. I'm fetching a row from one table in a cursor. Using the values of two fields from this fetch, I will retrieve a row from another table. I know before hand the second fetch will definitely return one row.
Now, second table can have blank values. By blank, I mean values like ''. When I do a unload these characters show up as '\ '. But within the C program, these are not getting fetched, I believe.
Alternatively, I'm not able to see if these values are present. Assuming I fetch the values in the char *value,
if (value[0] == '\0') or if (value[0] == ' ')
doesn't work. gdb shows something like value = "\000", ' ' . But I'm not able to verify this from the C code.
I manually loaded the table through a pipe delimited file. For inserting the blank, I typed |\ |.
Can anyone please let me know where I'm wrong.