cmd.CommandText = cmd +"city.varchar_CityName AS City,placeee.varchar_PlaceName AS SourceArea,place.varchar_PlaceName AS DestinationArea,varchar_StatusDescription As Status,reason.varchar_ReasonDescription AS AppType";
cmd.CommandText = cmd +"from [OneC_988].[dbo].[988_Details_VehicleRequest] request";
cmd.CommandText = cmd +"join [OneC_988].[dbo].[988_Details_VehicleTrip] trip on request.int_VehicleRequestID=trip.int_VehicleRequestID";
cmd.CommandText = cmd + "and int_CityID ='8'";
cmd.CommandText = cmd +"join [OneC_988].[dbo].[988_Details_TripSheet] sheet on trip.int_VehicleTripID=sheet.int_VehicleTripID";
cmd.CommandText = cmd +"join [CentralRepository].[dbo].[vw_CentralRepository_Associate_Details] AD on trip.varchar_TravelerID=AD.Associate_ID";
cmd.CommandText = cmd +"left join [CentralRepository].[dbo].[vw_CentralRepository_Contacts] contactss on contactss.Associate_ID = trip.varchar_TravelerID and contactss.Contact_Type='MBL1'";
cmd.CommandText = cmd +"join [OneC_988].[dbo].[988_Master_Place] place on place.int_PlaceID=trip.int_TripDestinationID";
cmd.CommandText = cmd +"join [OneC_988].[dbo].[988_Master_Place] placeee on placeee.int_PlaceID=trip.int_TripSourceID";
cmd.CommandText = cmd +"join [988_Master_City] city on request.int_CityID=city.int_CityID";
cmd.CommandText = cmd +"join [OneC_988].[dbo].[988_Master_TravelType] traveltype on traveltype.int_TravelTypeID=trip.int_TravelTypeID";
cmd.CommandText = cmd +"join [OneC_988].[dbo].[988_Master_Reason] reason on reason.int_ReasonID=request.int_ReasonID";
cmd.CommandText = cmd +"join [OneC_988].[dbo].[988_Master_Status] status on status.int_StatusID=trip.int_TripStatusID";
cmd.CommandText = cmd + "where date_TripDate ='2016-08-24' and trip.int_TripStatusID not in (0)";
cmd.CommandType = CommandType.Text;
cmd.Connection = sqlConnection;
sqlConnection.Open();
reader = cmd.ExecuteReader();
Console.WriteLine("test");
sqlConnection.Close();
when i run the above shows error as follows
Incorrect syntax near '='.
The above error shows in below line as follows
reader = cmd.ExecuteReader();
please help me what is the mistake in my above query