But if we want to insert a null value using SQLEXEC as below.
&name='Samba';
&birthdate=null; /* or &birthdate=' '; */
SQLexec("INSERT INTO TABLE VALUES(:1,:2)",&name,&birthdate);
Result in Database will be as below:
Name Birthdate
Samba 01/01/1900
Thought we inserted a null value or space (' '), it has taken 01/01/1900 into the date field.
To avoid the above situation, we can try this.
&name='Samba';
&birthdate=Date(0);
SQLexec("INSERT INTO TABLE VALUES(:1,:2)",&name,&birthdate);
now the output will be
Name Birthdate
Samba Null
So Date(0) can be used to insert null value into date fields.Hope this will be useful.
Nice article i was really impressed by seeing this article,
ReplyDeleteit was very intresting and it is very useful for People Soft Learners..We are also Providing one of the best The QA online training in worldwide.