Re: Odd SQL IN usage?



@sh (spam@xxxxxxxx) writes:
Got an odd SQL string that I need to produce that is most probably
simple to construct but with it being hot in our office, I simply can't
get my head around it....!!

It must also have been hot in the office when this was desiged:

CampaignID, CampaignName, CampaignHotelIDs
1 Test Campaign 1,4,5,7,9
2 Test Campaign2 1,2

UserID, UserName, UserHotelIDAccess
1 Test User 1,6,7
2 Test User 2,7

If you are on SQL 2000, this is very painful to work with. If you are on
SQL 2005, it's slightly less painful.

Before I go, which version of SQL Server do you actually have?



--
Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx

Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodinfo/previousversions/books.mspx
.



Relevant Pages

  • Speed of MS Access
    ... BLOB fields, the speed becomes painful. ... The BDE offers a feature whereby BLOB fields can be cached to memory to ... I am thinking of switching to SQL Server. ...
    (borland.public.delphi.database.ado)
  • Re: advanced editor
    ... Now you asking me questions that goes over my head. ... But isn't this "Advanced Editor" simply the Package Designer you ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ... Books Online for SQL Server 2005 at ...
    (microsoft.public.sqlserver.tools)
  • RE: Cannot create linked server from SQL 2005 to SQL 2000
    ... I am not going to say that I know from the top of my head how you would ... Books Online of course. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (microsoft.public.sqlserver.security)
  • Re: add column in particular order
    ... recreates it. ... Could be painful, if you want to do this on a large table. ... Vyas, MVP (SQL Server) ... commnad or other SQL command ...
    (microsoft.public.sqlserver.programming)
  • Re: Using DFS to replicate application and SQL data
    ... the entire file would replicate. ... painful. ... Doesn't SQL Server provide data replication? ... Prev by Date: ...
    (microsoft.public.windows.server.general)