what will be the best way to write this code? I have the following code:BEGIN declare status_sent as nvarchar(30) SET NOCOUNT ON; case status_sent =( select * from TableSignal where ID=(SELECT id_ FROM [P_Database].[dbo].[Package] where SerialNumber=@Pallet ) and SignalId=23) when is null then 'Signal not send' when not null then 'Signal Sent' end then if Signal Sent.... do the following query:Select * from package.....if signal not sent don't do anythingany help will be appreciate it.....on how to evaluate the first query with the 2 options and based on thatoptions write the next query.
↧