Browse 547 attributed reviews, viewable separately for our classroom and online training

Details for DbEnthusiast

DbEnthusiast has participated in the following threads:

Added by grao on 07 Nov 2017 at 01:34

I am not getting any results. Is this the right code?

use doctorwho

Select companionname
from tblCompanion as c
left outer join tblEpisodeCompanion as e
on c.CompanionId=e.EpisodeCompanionId
where e.EpisodeCompanionId =null

Added by ShukiMolk on 10 Apr 2020 at 02:12

Why do we need to use the CASE function?
What's wrong with this:

SELECT EventName, EventDate, ( (DATENAME(Weekday, EventDate)) + ' ' + (DATENAME(day, EventDate)) + 'th ' + (DATENAME(month, EventDate)) + ' ' + (DATENAME(year, EventDate)) ) AS 'Full Date'
FROM [tblEvent]
ORDER BY EventDate

Added by DbEnthusiast on 18 Dec 2020 at 16:31

I think the following query should work too!

SELECT EventName
        ,CASE WHEN EventName LIKE '[AEIOU]%' AND EventName LIKE '%[aeiou]' THEN 'Begin and ends with vowel'
        ELSE 'Same Letter' END AS Verdict
FROM tblEvent
Order BY Verdict