-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using * to specify columns on tables with columns of identical names results in one of the columns being suppressed #22
Comments
GitHub doesn't support the .cls type, so I renamed the files. |
The problem lies in the AppendResultSet method of %Api.Atelier.v1, which uses the colName property of each %SQL.StatementColumn in the %GetMetaData() of the query result when constructing the JSON response to the /action/query request, without prefixing it with the schemaName and tableName. Please raise this with InterSystems WRC. It will require a server-side change, probably a new API endpoint in order not to break existing users of the v1//action/query endpoint who may rely on receiving unqualified column names. |
I can do that. First thing in the morning. Thanks. |
I've reproduced the behavior John mentioned independently of the SQLTools Driver (using the Query method of the Source Code File REST API) and reported it to InterSystems development. @joncard1, I will send you details on this. |
A change to the server-side API (Atelier API v6) to allow result set columns to be returned positionally rather than by name is on its way to 2023.1, due for preview release in the next month or so. This can be taken advantage of on the SQLTools side to address this issue. |
Atelier API v6 adds support for a new {
"status": {
"errors": [],
"summary": ""
},
"console": [],
"result": [
{
"columns": [
{
"name": "Name",
"type": "VARCHAR(4096)"
}
],
"content": [
[
"%CSP.UI.Portal.Dialog.SQLTuneTablesOutput"
]
]
}
]
} |
I will attach the class files used to create the tables, but the following command resulted in a result set with only the columns ID and Name:
INSERT INTO SQLUser.Table1 (Name) VALUES ('Name 1')
INSERT INTO SQLUser.Table2 (Name) Values ('Name 2')
SELECT * FROM SQLUser.Table1 CROSS JOIN SQLUser.Table2
I expected either the columns "ID", "Name", "ID", "Name" as in the Management Portal, or "SQLUser.Table1.ID", "SQLUser.Table1.Name", "SQLUser.Table2.ID", "SQLUser.Table2.Name". All 4 columns should display.
The text was updated successfully, but these errors were encountered: