Quantcast
Channel: SQL Server High Availability and Disaster Recovery forum
Viewing all articles
Browse latest Browse all 4532

Too many items to match in SQL query

$
0
0

Hi there,

I have this script that I am trying to run but I have found that it will be difficult to write it

This is what the script looks like;

SELECT

UserID, ClientNumber, UserName, RoleID, IsAccountOwner, AllowWeekEndAccess, AccountName, FirstName, LastName

FROM [BSP_DXXX].[dbo].[User]where UserIDin('3800','2590','5107')

in this particular statement, there are only 3 items I want to get back from the database, however I have been asked to get back over 30,000 other items from the database. Is there a way to write the query quickly or do I have to manually go and open close quotations on each UserID value in the table which will be cumbersome and hopeless

Please let me know if there is a way to do this much faster


Regards, RayPak



Viewing all articles
Browse latest Browse all 4532

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>