Hello everybody,I have a task to be accomplished at work and would like to ask you a question about it. To give you a little background, there is a CRM system with SQL server as its back-end. The CRM uses a view in SQL Server to list all the communications a user has had with his client over any given interval of time. Now there is a requirement to add a new column in the view that tells a user if the communication was filed in automatically or if it happened overnight via an automated archive manager process. I have achieved this using an expression field which is based on the comm_url field in the communications table in database.example:create view vCommunicationsasselect col1, col2,...,[b]case when comm_url is null then 'Manually filed' else 'Automatically Filed' as Filing[/b]from vCommunicationsalternatively, this can also be achieved by the following:create view vCommunicationsasselect col1, col2,...,[b]isnull(comm_url, 'Manually Filed') as Filing[/b]from vCommunicationsNow my question is, given that there are many rows in the communications table, which of the above two expression fields will be more efficient in performance i.e. CASE versus ISNULL. I've checked a lot on google but I haven't been able to come up with a concrete answer.Your insights on this will be much appreciated. Look forward to hearing from you all.Cheers,Shadab Khan.
↧