Im not good in querying. I would like to ask if this query works.
I want to retrieve starttime, endtime and sessioncost from the table SESSION of my database. my program will be an autorun. IT MEANS THAT ID SHOULD BE SELECTED AUTOMATICALLY WHEN IT RUNS.
Dim sql As String = "select STARTTIME, ENDTIME, SESSIONCOST from SESSIONS where CLIENTID = (?)"
I cant post the image because it requires more than 10 reputation. Im sorry.. If you have a better code/query, I appreciate your help. 🙂
thank you so much for your feedback..
First count CLIENTID into one variable
sql query for count
now store this count value into some variable
Now once you get the random value
By this way you can get random results within the count of clientids