----------------------------------------------------------- New Message on BDOTNET
----------------------------------------------------------- From: Neeraj_Bangalore Message 6 in Discussion Hi Balaji, You are passing first parameter as blank string as TESTPROC1 '','NAIR','' Try this TESTPROC1 NULL,'NAIR',NULL It will work. Regards, Neeraj Saluja SCT Software Solutions, Bangalore -----Original Message----- From: BalajiKrishnan [mailto:[EMAIL PROTECTED] Sent: Wednesday, December 31, 2003 11:59 AM To: BDOTNET Subject: Re: SQL -SP DOUBT New Message on BDOTNET SQL -SP DOUBT Reply Reply to Sender Recommend Message 5 in Discussion From: BalajiKrishnan Dear Srini, This is working for MedRecNo,but when i pass only lastname or firstname,it is not fetching the records ALTER Procedure TESTPROC1 '','NAIR','' @PatientFName varchar(60)= NULL , @PatientLName varchar(60)= NULL , @MedRecNo varchar(2000) AS --DECLARE @fname VARCHAR(60) --DECLARE @lname VARCHAR(60) --DECLARE @id varchar(200) BEGIN -- SELECT @PatientFName = NULL, @PatientLName = NULL, @MedRecNo = NULL SELECT a.strMRN, a.strPatientFName, a.strPatientLName, a.strPatientCity,a.dtPatientDOB, maxVisitID = ISNULL ((select max(b.intPatientVisitId) FROM tblmedicalrecorddetails b WHERE b.FKstrPatientMRN = a.strmrn), 0) FROM tblmedicalrecordmaster a WHERE a.strPatientFName LIKE CASE WHEN @PatientFName IS NULL THEN '%' ELSE @PatientFName + '%' END AND a.strPatientlName LIKE CASE WHEN @PatientLName IS NULL THEN '%' ELSE @PatientLName + '%' END AND a.strmrn = CASE WHEN @MedRecNo IS NULL THEN a.strmrn ELSE @MedRecNo END END View other groups in this category. ----------------------------------------------------------- To stop getting this e-mail, or change how often it arrives, go to your E-mail Settings. http://groups.msn.com/bdotnet/_emailsettings.msnw Need help? If you've forgotten your password, please go to Passport Member Services. http://groups.msn.com/_passportredir.msnw?ppmprop=help For other questions or feedback, go to our Contact Us page. http://groups.msn.com/contact If you do not want to receive future e-mail from this MSN group, or if you received this message by mistake, please click the "Remove" link below. On the pre-addressed e-mail message that opens, simply click "Send". Your e-mail address will be deleted from this group's mailing list. mailto:[EMAIL PROTECTED]
