I'm relatevly new in SQL Server and may be my question is too simple for some of you. I need to retrieve data from database using sql like that
'SELECT SomeData FROM SomeTables WHERE ClienID = 12 OR ClienID = 45 OR ClienID = 23 OR ... ORDER BY ClientID'. I know how do that using ADO, recordset and embeded sql from Visual Basic App but because of some reason I have (mandatory) to use stored procedure. The question is is there way to build stored procedure looping through database. I do not need real code, the example/advice with general idea (like use statement such and such)will be fine. Thanx in advance.
'SELECT SomeData FROM SomeTables WHERE ClienID = 12 OR ClienID = 45 OR ClienID = 23 OR ... ORDER BY ClientID'. I know how do that using ADO, recordset and embeded sql from Visual Basic App but because of some reason I have (mandatory) to use stored procedure. The question is is there way to build stored procedure looping through database. I do not need real code, the example/advice with general idea (like use statement such and such)will be fine. Thanx in advance.