LBZ3800
25th October 2011, 13:11
Hi

I need to send SQL query to Baan Oracle. I get those information to make my query text

Table : baan.ttiitm001300 i
Field : i.t$item

What's the correct syntax :

SELECT
i.[t$item] AS item,
FROM
baan.ttiitm001300 i

Or

SELECT
i.[t$item] AS item,
FROM
ttiitm001300 i

Or

SELECT
i.item AS item,
FROM
ttiitm001300 i

....
Thanks for your kind help
Loic:confused:

Han Brinkman
25th October 2011, 13:25
select tiitm001.item
from tiitm001

You don't need to specify the number because baan knows in what company you run the query.

Within Oracle:
select t$item
from baan.ttiitm001300

Here you need to specify the company number (in this case 300).

HTH,

LBZ3800
25th October 2011, 13:50
Hi,

Thks for your help. I've tried (thru ODBC)

SELECT tiitm001.item
FROM tiitm001

And i got the following message :
[Oracle][ODBC][Ora]ORA-00942 : table or view does not exist

Can you help me ?
Thks a lot
Loic

Kozure Ohashi
25th October 2011, 20:53
As Hans mentioned:

Baan Level:

SELECT tiitm001.item
FROM tiitm001

Oracle Level (please use this in your ODBC)

SELECT t$item
FROM <schemaname>.ttiitm001<company number>

e.g. FROM baan.ttiitm001100

You use ODBC. There is a great free java based tool from oracle called sql developer using native db driver.

Regards,

Kozure