Here is my current SQL query
SELECT
tck_adv.PersonIdNo,
tck_adv.FirstName,
tck_adv.LastName,
tck_adv.WithholdingDescription,
tck_adv.CurrentWithholdingAmount
FROM
dbo.tck_adv tck_adv
Where
tck_adv.PaymentDate >= '2018-01-01'
I get back the following:
PersonIdNo FirstName LastName WithholdingDescription Withholding Amount
123456 Bill Smith Deduct 1 100.00
123456 Bill Smith Deduct 2 9000.00
987654 Jane Jones Deduct 1 54.00
987654 Jane Jones Deduct 2 1900.00
564321 Lori Apple Deduct 1 99.00
What I need is it to appear as
PersonIdNo FirstName LastName Deduct 1 Deduct 2
123456 Bill Smith 100.00 9000.00
987654 Jane Jones 54.00 1900.00
564321 Lori Apple 99.00 0.00
How can I write the SQL query to achieve this?