generated from duckdb/extension-template
-
Notifications
You must be signed in to change notification settings - Fork 4
/
odbc_scan_db2.test
31 lines (28 loc) · 805 Bytes
/
odbc_scan_db2.test
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# name: test/sql/odbc_scan_db2.test
# description: test odbc_scanner extension
# group: [odbc_scan]
# Before we load the extension, this will fail
statement error
SELECT * FROM odbc_scan(
'DSN={db2 odbctest};Hostname=localhost;Database=odbctest;Uid=db2inst1;Pwd=password;Port=50000',
'DB2INST1',
'PEOPLE'
)
ORDER BY salary ASC;
----
Catalog Error: Table Function with name odbc_scan does not exist!
# Require statement will ensure this test is run with this extension loaded
require odbc_scanner
# Confirm the extension works
query III
SELECT * FROM odbc_scan(
'DSN={db2 odbctest};Hostname=localhost;Database=odbctest;Uid=db2inst1;Pwd=password;Port=50000',
'DB2INST1',
'PEOPLE'
)
ORDER BY salary ASC;
----
Lebron James 37 100.1
Spiderman 25 200.2
Wonder Woman 21 300.3
David Bowie 69 400.4