How to extract cross databases references using scriptdom API
问题 Microsoft has exposed the scriptdom API to parse and generate TSQL. I'm new to it and still playing with it. I want to know how to get the cross databases references from queries like this one. UPDATE t3 SET description = 'abc' FROM database1.dbo.table1 t1 INNER JOIN database2.dbo.table2 t2 ON (t1.id = t2.t1_id) LEFT OUTER JOIN database3.dbo.table3 t3 ON (t3.id = t2.t3_id) INNER JOIN database2.dbo.table4 t4 ON (t4.id = t2.t4_id) What I want is a list of the references: database1.dbo.table1.id