Hi Piush!

This didn't help either. I get the same error message as without the select 
*. H2 converts the column names to upper case and MSSQL expects them case 
sensitive.



2016. szeptember 16., péntek 18:35:50 UTC+2 időpontban Piush Kumar a 
következőt írta:
>
> Check this out 
>
>
> CREATE LINKED TABLE LINK('org.h2.Driver', 'jdbc:h2:test2', 'sa', 'sa', 
> 'TEST');
> CREATE LINKED TABLE LINK('', 'jdbc:h2:test2', 'sa', 'sa',
>     '(SELECT * FROM TEST WHERE ID>0)');
> CREATE LINKED TABLE LINK('javax.naming.InitialContext',
>     'java:comp/env/jdbc/Test', NULL, NULL, '(SELECT * FROM TEST WHERE 
> ID>0)');
>
> I guess you need to enclose select query in round bracket ()
>
> Thanks,
> Piush
>
> On Sep 16, 2016, at 9:28 AM, Zoltan Koczkas <zkoc...@gmail.com 
> <javascript:>> wrote:
>
> Hi Piush,
>
> I get:
>
> Table "select * from TEST(com.microsoft.sqlserver.jdbc.SQLServerException: 
> Incorrect syntax near the keyword 'select'.)" not found; SQL statement:
> CREATE LINKED TABLE 
> TEST('com.microsoft.sqlserver.jdbc.SQLServerDriver','jdbc:sqlserver://
> mssqlserver.at:1433','User','PW','select * from TEST') READONLY
>
> Thanks,
> Zoltan
>
> 2016. szeptember 16., péntek 12:05:50 UTC+2 időpontban Piush Kumar a 
> következőt írta:
>>
>> Hi zoltan,
>> When you create the linked table, try creating it using select * from 
>> <table name>
>>  Syntax and see if that helps. I don't have access to the sql server now 
>> to verify.
>>
>> Thanks,
>> Piush
>>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "H2 Database" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to h2-database...@googlegroups.com <javascript:>.
> To post to this group, send email to h2-da...@googlegroups.com 
> <javascript:>.
> Visit this group at https://groups.google.com/group/h2-database.
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to