How to use information from a CSV and SQL to add attributes to constituents based on ticket history?

Hi there!

I have written a bit of SQL that adds an attribute to a constituent's record if they have a specific item in their ticket history (this is historical data from a flatfile, so no keywords allowed unfortunately).

Here is my code:

INSERT INTO TX_CUST_KEYWORD (keyword_no, customer_no, key_value, n1n2_ind, create_loc, created_by, last_updated_by)
SELECT {attribute number from CSV}, e.customer_no, {attribute description from CSV}, NULL, {Username}, {individual}, {individual}
FROM (SELECT DISTINCT c.customer_no, t.perf_name, t.perf_dt FROM T_CUSTOMER c
LEFT JOIN VS_TICKET_HISTORY t ON t.customer_no = c.customer_no
WHERE t.perf_name = {Show title} AND t.perf_dt = {Performance date}) AS e;

I have put dynamic stuff in brackets (aside from username and user identifiers as those don't matter.

So essentially I want a spreadsheet that matches the perf date and perf name to an attribute and attribute description, and goes through each line of that spreadsheet to add the correct attribute to constituents with that item in their ticket history. I'm just stuck on actually accessing the spreadsheet.

I attempted to follow this tutorial: https://www.sqlshack.com/importing-and-working-with-csv-files-in-sql-server/

However, when I right click the database connection, I do not have the "Tasks" option. Is something amiss with my SQL privileges, or am I going about this the wrong way?

Thank you!