Ramco Ramco

Ramco Ramco

  • 442
  • 3.4k
  • 515.5k

If date is null then '' instead of 1900-01-01

Nov 10 2022 11:31 AM

Hi

  In below Sql i want in inner select statement if record is not found then Space should be returned.

select
  [LogID]
      ,[ModuleCode]
      ,[ModuleMasterCode]
      ,[EntryCode]
      ,[EmpCID]
      ,[EmpName]
      ,[StepCode]
      ,[EntryDate]
	  ,isnull((select top 1 EntryDate from [PRQS].[dbo].[BackLog] where  and StepCode = T0.StepCode and EntryCode = T0.EntryCode),'')
  FROM [LiveData].[dbo].[EntryLog] T0
  where T0.EntryCode = '100'

Thanks


Answers (3)