MicrosoftDocs / feedback

📢 docs.microsoft.com site feedback
https://learn.microsoft.com
Creative Commons Attribution 4.0 International
239 stars 160 forks source link

FirstTokenIndex for ExistsPredicate in TSql140Parser(Microsoft.SqlServer.TransactSql.ScriptDom) #615

Open smrtreddyk opened 6 years ago

smrtreddyk commented 6 years ago

FirstTokenIndex for exists statement is pointing to "opening bracket" instead of "exist" itself, this is causing issue with splitting a query using FirstTokenIndex and LastTokenIndex from ScriptTokenStream

example: Query: select from tbl1 where exists (select from tbl2 where tbl1.col1=tbl2.col2) expected output using FirstTokenIndex and LastTokenIndex: exists (select from tbl2 where tbl1.col1=tbl2.col2) current output: (select from tbl2 where tbl1.col1=tbl2.col2)

Powerhelmsman commented 6 years ago

@smrtreddyk Can you provide the page link?

smrtreddyk commented 6 years ago

@Powerhelmsman

Link: Scriptdom API

property: FirstTokenIndex

Microsoft.SqlServer.TransactSql.ScriptDom DLL version: 14.0.3811.1

Powerhelmsman commented 6 years ago

@dend Do you know who is right contact for .Net API on SQL part?

dend commented 6 years ago

@Powerhelmsman I would start with @sudeepku - this seems like an issue that will need the SQL team looped in.

Powerhelmsman commented 5 years ago

@dend @sudeepku Any updates so far?