I have string which I need to parse and load it into database. The string contains 7 columns and is pipe delimited and some columns might be empty spaces. For empty space I need to load them into database as null values but the problem is I can not read the nulls in C.
The string to be parsed is as follows:
1234|4324||xyz|234||asdf
Can anyone tell how I can parse this information. I tried using sscanf() and strtok() but they ignore the null values.
I do not want to traverse through the whole string as there are millions of records and it might slow things down. Is there any efficent way of doing this.
Thanks
The string to be parsed is as follows:
1234|4324||xyz|234||asdf
Can anyone tell how I can parse this information. I tried using sscanf() and strtok() but they ignore the null values.
I do not want to traverse through the whole string as there are millions of records and it might slow things down. Is there any efficent way of doing this.
Thanks