You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@metamodel.apache.org by "John Andrunas (JIRA)" <ji...@apache.org> on 2019/04/01 19:46:00 UTC
[jira] [Updated] (METAMODEL-1203) GetColumns() listing other tables
column for MS SQL DB
[ https://issues.apache.org/jira/browse/METAMODEL-1203?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
John Andrunas updated METAMODEL-1203:
-------------------------------------
Attachment: (was: Data Management Downloads.zip)
> GetColumns() listing other tables column for MS SQL DB
> ------------------------------------------------------
>
> Key: METAMODEL-1203
> URL: https://issues.apache.org/jira/browse/METAMODEL-1203
> Project: Apache MetaModel
> Issue Type: Bug
> Affects Versions: 4.5.5
> Reporter: Tej Kiran Sharma
> Priority: Blocker
>
> Hello,
> I am using Apache Metamodel 4.5.5 version. Recently I was trying to extract MS SQL db into csv using it.
> I have these two tables which are quite similar in name just difference of dot (.) and underscore (_) and its column name are different.
> {code:java}
> CREATE TABLE [dbo].[temp.table1](
> [id] [nchar](10) NULL,
> [nametemp] [nchar](10) NULL,
> [sample] [nchar](10) NULL
> ) ON [PRIMARY]{code}
>
> {code:java}
> CREATE TABLE [dbo].[temp_table1](
> [srno] [nchar](10) NULL,
> [idea] [nchar](10) NULL,
> [classified] [nchar](10) NULL
> ) ON [PRIMARY]{code}
>
> When I try to extract these tables I got a issue that in JDBCStructuredObject.java class getRows()
>
> {code:java}
> dataContext.query().from(table).as("ct").selectAll().toQuery();{code}
>
> returns
> {code:java}
> The query is SELECT ct."id", ct."nametemp", ct."sample", ct."srno", ct."idea", ct."classified" FROM dbo."temp_table1" ct{code}
> Even the id, nametemp and sample fields are not belonging to temp_table1
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)