i have two table
table responces
column name tada type
-----------------------------
ReqDate date
ticket_id int
User_id varchar(50)
log_view table
column name tada type
-----------------------------
Ticket_id int
user_id varchar(30)
view_date date
my code behind is
Dim curr_date As Date = Date.Today.Date
Dim datebefore90 As Date = Date.Now.AddDays(-90)
Dim datebefore180 As Date = Date.Now.AddDays(-180)
Dim constring As String = ConfigurationManager.ConnectionStrings("RealEstatePortalConnectionString").ConnectionString
Using con As New SqlConnection(constring)
Using cmd As New SqlCommand("sp_getcountresponses", con)
cmd.CommandType = CommandType.StoredProcedure
'@c_date,@db90,@db180,@uid
cmd.Parameters.AddWithValue("@c_date", curr_date)
cmd.Parameters.AddWithValue("@db90", datebefore90)
cmd.Parameters.AddWithValue("@db180", datebefore180)
cmd.Parameters.AddWithValue("@u_id", usernm)
con.Open()
now i wants to write sql procedure
please help