How to create a query according to the students? I tried it like this, but I probably need it as something different.
SELECT [SSN] ,[Studentnumber] ,[Surename] ,[Forenames] ,[Bithdate] ,[Address] ,[Phonenumber] FROM [dw].[connected_person_contact_details] Where (Surename IS NULL OR Surename = @Surename) AND (SSN IS NULL OR SSN = @SSN) AND (Phonenumber IS NULL OR Phonenumber = @Phonenumber) It is necessary to do a search for example in one of the above parameters. Or such a query so that you can search by one or more parameters.
NULLsorted in order to search for a given parameter.@surname IS NULLetc. - teran