I have a query whose result is fetched as an attachment in the
Excel sheet. Now what I want is,
I want to hide RAName column while displaying in the excel sheet.
So what I want is, Can I hide that in sql query.
Below is my query.
SELECT row_number() over (order by (UserName)) as SR_No, UserName, Doc_No Inward_No, Document_Type Doc_Type, Party_Name, Ref_No, doc_date Inward_Date, Ref_date Dept_Received_Doc_Date, Last_Action_date Last_status_update_date, Remarks, RAName FROM #MainTempTable order by UserName,RAName
NOTE: Please ignore the temp table part.