Hi<BR><BR>Have am new at SQL SP&#039;s/syntax and have unsuccessfully tried to use the IF..ELSE statement within a SP. Microsoft and the Enterprise Manager help were of no help.<BR><BR>Article http://www.aspfaqs.com/aspfaqs/ShowFAQ.asp?FAQID=102 seems to be along the right idea but I have hacked at this without success either...<BR><BR>Any pointers to documentation regarding the SQL IF..ELSE or advice is appreciated...<BR><BR>My code is as follows:<BR><BR>---------- START OF SQL CODE ----------<BR><BR>CREATE PROCEDURE addPlayerCalendar<BR> (<BR> @name varchar(25)<BR> )<BR> AS<BR> begin<BR> INSERT INTO<BR> matchcalendar<BR> (<BR> <BR>------------- NON CODE SECTION ------------------<BR>In the databse I have 12 cells name &#039;ply1&#039;, &#039;ply2&#039; etc and each are filled by default with &#039;-&#039;.<BR>What I am trying to do is determine the first cell to contain &#039;-&#039; and then insert the value of @name into it.<BR><BR>I though about doing this through ASP first to determine which cells are available to insert the value into it. The code worked fine but was large and cumbersome due to having to read out the database values, run vbscript to determine the correct db cell to insert into and then actually doing it. <BR><BR>----------------- END OF NON CODE SECTION --------------<BR> <BR> )<BR> VALUES<BR> ( <BR> @name<BR> )<BR> end<BR>GO<BR><BR>------------- END OF SQL CODE ----------------