My sql query as follows
select DISTINCT date_TripDate AS TripDate,traveltype.varchar_TravelTypeCode AS TripType,contactss.Value as Mobilenumber,from [OneC_988].[dbo].[988_Details_VehicleRequest] request join [OneC_988].[dbo].[988_Details_VehicleTrip] trip on request.int_VehicleRequestID=trip.int_VehicleRequestID
and int_CityID ='1'
When i run the above query output as follows
Tripdate TripType Mobilenumber int_CityID
26th aug 16 IN 9878778878 1
26th aug 16 IN 9949949990 1
26th aug 16 IN 9878778878 1
i want to pass both INT_CityID 1 and 2 in the above sql query to get output as follows
Tripdate TripType Mobilenumber int_CityID
26th aug 16 IN 9878778878 1
26th aug 16 IN 9949949990 1
26th aug 16 IN 9878778878 1
28th aug 16 IN 9878778878 2
28th aug 16 IN 9949949990 2
28th aug 16 IN 9878778878 2
Loading

JohnRank #2,322 · 608 reputationPosted Aug 25, 2016, 10:39 PM EDT
and int_CityID in ('1','2')
Vinay SinghRank #604 · 4K reputationPosted Aug 25, 2016, 11:16 PM EDT
Midhun TpRank #388 · 6.5K reputationPosted Aug 25, 2016, 10:41 PM EDT
and int_CityID in('1','2') order by int_CityID asc