Skip to content

Tag: sql

SQL select from inner join where count greater than

Doctor doctorid (PK) doctorname Patient patientid (PK) patientname doctorid I have the following query to get the doctors details with the number of patients that he/she consults. assume a patient has only one doctor to consult. Now I need to get the same information but only for the doctors who has more than…

Undefined variable at ‘Incdntno.Value’

I am having trouble getting this to compile, it keeps giving an undefined variable error during compile at ‘Incdntno.Value’. I tried to Dim Incdntno as Integer but then was getting Invalid qualifier. I have a similar code that works (see second code block). I didn’t need a lot of what was go…

How to debug a T-SQL trigger?

I have a table t, which has an “after insert” trigger called trgInsAfter. Exactly how do i debug it? i’m no expert on this, so the question and steps performed might look silly. The steps i performed so far are: 1. connect to the server instance via SSMS (using a Windows Admin account) right…

What is this operator in MySQL?

I’m working on code written by a previous developer and in a query it says, What does <=> mean in this query? Is it something equal to =? Or is it a syntax error? But it is not showing any errors or exceptions. I already know that <> = != in MySQL. Answer TL;DR It’s the NULL safe equal…