prasadalone
Programmer
- Aug 15, 2002
- 87
Following is my mssql query i want to convert this query into mssql query tell me how thank you
Select firstname +' '+lastname+' userid :'+Users.userid ,PrayerDetails,PrayerRequestDate,Paidstatus,PrayerRequest.PrayerRequestId,t1.tcnt from PrayerRequest,UserPrayerRequest,Users,(select count(*) as tcnt,PrayerRequestId from UsersReplys group by PrayerRequestId) as t1 where Users.UserId = UserPrayerRequest.Userid and UserPrayerRequest.userid <> 'aratidesai' and UserPrayerRequest.PrayerRequestId*= t1.PrayerRequestId and PrayerRequest.PrayerRequestId=UserPrayerRequest.PrayerRequestId and PrayerRequest.PrayerRequestId Not in (Select PrayerRequestId from UsersReplys where userid='aratidesai')
Select firstname +' '+lastname+' userid :'+Users.userid ,PrayerDetails,PrayerRequestDate,Paidstatus,PrayerRequest.PrayerRequestId,t1.tcnt from PrayerRequest,UserPrayerRequest,Users,(select count(*) as tcnt,PrayerRequestId from UsersReplys group by PrayerRequestId) as t1 where Users.UserId = UserPrayerRequest.Userid and UserPrayerRequest.userid <> 'aratidesai' and UserPrayerRequest.PrayerRequestId*= t1.PrayerRequestId and PrayerRequest.PrayerRequestId=UserPrayerRequest.PrayerRequestId and PrayerRequest.PrayerRequestId Not in (Select PrayerRequestId from UsersReplys where userid='aratidesai')