Hello Shubhangi Agarwal,
I want to clarify - so you are hitting a microsoft access db from microsoft sql server using the specified query? Sorry - not sure I understand how that is done.
Tableau will wrap a query string sent from Tableau custom sql with a select statement. The exception is the use of Intital SQL - Run Initial SQL - which might work for you in this case. Have you tried using Initial SQL ?
Shubhangi Agarwal is probably using Custom SQL query connected to Excel workbook.
I have the same issue. What I need is a column with row number in my source data.
Both rank() and row_number() functions don't work in Tableau Custom SQL.
Unfortunately, I can't run Intial SQL for Excel as data source.
Does anybody have and idea how to get a unique row number for each record without those functions?