DOB datetime
WEdding datetime
Sql = "select s.Name,s.DOB,s.Mobileno,s.Weddingday from BirthDayWish s where s.Active <> 'D'";
Sql = Sql + " and year(DOB) <> '1900'";
Sql = Sql + " and month(DOB) = month('" + Convert.ToDateTime(CurDate) + "') and day(DOB) = day ('" + Convert.ToDateTime(CurDate) + "') ";
Sql = Sql + " or year(Weddingday) <> '1900'";
Sql = Sql + " or month(Weddingday) = month('" + Convert.ToDateTime(CurDate) + "') or day(Weddingday) = day ('" + Convert.ToDateTime(CurDate) + "')";
sending sms for birthday and wedding day,
i have to use loop condition query apply and send the sms.
if year not equal to 1900 DONT send sms first to birthdaywish
then i use else stmt if year not equal to 1900 DONT send sms to wedding.
likewise
if year <> to 1900 send sms DOB date from database and send sms to birthday
then i use else stmt i year <> 1900 send sms to wedding.
i send the above query from the above query how to apply my else stmt.
please send the else loop stmt query from my above query.
please help me.
i want to write the query in from1.cs page