1
Answer

How to count number of entries depending on the string in a field in sql

asif basha

asif basha

15y
2.8k
1
I am having table Inbox in which i have two fields sender mailid and subject....
I should generate number of entries whose subject starts with "Re" for a unique mailid........


Please help me out in telling the query how to solve the above problem

Answers (1)
0
Niradhip Chakraborty

Niradhip Chakraborty

NA 6.5k 527k 15y

Try This:
 

DateTime dtmMechCode = Convert.ToDateTime(DateTime.Now);

 

string strMechCode = Convert.ToString(dtmMechCode).Replace("/", "").Replace(":", "").Replace(" ", "").Replace("AM", "").Replace("PM", "");

 

string UniqueId = "RE" + strMechCode;