Extract Schema, Table, column and Alias when alias are not always present #420
Unanswered
KarthikATOS22
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Is it possible to extract table names and column names from tsql query as in the below format
Output format
Columns: [(Schema,Table,Column,Alias), (Schema,Table,Column,Alias)]
Example Query: SELECT O.OrderID as Col1, O.CustomerName FROM dbo.Orders as O where O.col5= 100 order by O.Odate"
Columns: [('dbo','Orders','OrderID','Col1'), (('dbo','Orders','CustomerName',None)]
Challenge is, some column may have alias and some may not.
Beta Was this translation helpful? Give feedback.
All reactions