MySQL: How do I remove/skip the first row (before the headers) from my stored procedure result?

Viewed 9

I am calling a stored procedure which results in the following output

CALL `resale`.`reportProfitAndLossSummary`(3,' ',599025,TRUE);

OUTPUT:

"CONCAT('"',
                   CONCAT_WS('","',
                           "Promoter",
                           "Event",
                           "Event Description",
                           "Zone",
                           "Tickets Unsold",
        "
""Promoter","Event","Event Description","Zone","Tickets Unsold","Avg. Unsold Price","Tickets Sold","Avg. Sold Price","Avg. Cost","Profit","Revenue""
""Qcue","10/2/2022 1:15 PM Pirates @ Cardinals","Pirates @ Cardinals","1/3B Field Box",0,,16,149.761250,42.000000,1724.18,2396.18"

I exported the result to .csv and discovered that a new code chunk is created above the header which distorts the structure of the file. Is there a way to skip this code chunk. I tried "-N" "-ss" since the code chunk appears as the header and none of those worked in MySQLWorkbench. Turning the header option to "FALSE" in the stored procedure call removes the actual headers and not the undesired code.

The stored procedure was developed by someone else so I am not sure where to begin fixing this. The goal is remove the undesired code from the query result itself not the .csv export.

0 Answers
Related