I am not sure how to do this but I basically am trying to store a set of notes a user can make about a customer. I am not sure the best way to do this but I thought it would be to create a SQL Table with multiple notes colums example;
notes table
notes_id
cus_id
notes1
notes1_datetime
notes2
notes2_datetime
notes3
ntoes3_datetime
etc...
My question is how can I check to see if the notes column has data or is NULL before inserting a new line of notes in there. I need to run through the columns until we find a empty one and then insert into there. Something maybe like;
If notes.notes1 is null Then
insert into Notes
(notes1, notes1_datetime)
Values (@notes, @datetime)
Elseif notes.notes2 is null Then
insert into Notes
(notes2, notes2_datetime)
Values (@notes, @datetime)
Elseif notes.notes3 is null Go to the complete details ...