Hi there,
in My table i have a field called primry, This can contain the data of 1, 0 or NULL for one person. I need to see if there are three records against one persons containing a row for each 1, 0 and NULL then then it selects only that row containing the record 1 ignoring the 0's and NULL rows and if the column contains 0 and NULL then it brings back the row with zero else it brings back the row with null.
can i do it without using cursor or inline function as the data returned is in thousands and cursor or inilne function will make it very slow.
kindest regards,
A sample with the source data and another sample with the expect result for the same dataset.