?
???Q
as title said ,
I run code below , the column(a1ap6d1.in_seq) from subquery
could not return basetablename but null
I realize that using join syntax could ,
but subquery is popular syntax ,
is there any way to get correct basetablename when a query contain
subquery?
Dim rdr As SqlDataReader, dsa As String
da1.SelectCommand = New SqlCommand("select *,(select top 1
in_seq from a1ap6d1 where in_id=a.in_id) as in_seq from a1ap6h a",
conn)
rdr = da1.SelectCommand.ExecuteReader(CommandBehavior.KeyInfo)
Dim tbl As DataTable = rdr.GetSchemaTable()
Dim row As DataRow
rdr.Close()
For Each row In tbl.Rows
dsa = row("BaseTableName")
Next
I run code below , the column(a1ap6d1.in_seq) from subquery
could not return basetablename but null
I realize that using join syntax could ,
but subquery is popular syntax ,
is there any way to get correct basetablename when a query contain
subquery?
Dim rdr As SqlDataReader, dsa As String
da1.SelectCommand = New SqlCommand("select *,(select top 1
in_seq from a1ap6d1 where in_id=a.in_id) as in_seq from a1ap6h a",
conn)
rdr = da1.SelectCommand.ExecuteReader(CommandBehavior.KeyInfo)
Dim tbl As DataTable = rdr.GetSchemaTable()
Dim row As DataRow
rdr.Close()
For Each row In tbl.Rows
dsa = row("BaseTableName")
Next