How do I select a particular row from sql table. Example if value of variable is 2, then select 2nd row from table?
Is there any function in VBS to determine how many rows are in the table?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can execute the following SQL, that uses the
RANK()SQL Server function to always get the second row, for example, by ordering the records byidcolumn inDESCorder:I am not sure if VBS has out-of-the-box function to get the number of rows in a table, but you can use a simple SQL query to find that out:
This would return a value, but the query above that is selecting the second row would return a list of column values, as present in the table.