jpadilla
13th September 2002, 02:39
How do you create a query that look for rows using some index..
this is for programs like Microsoft query, SQL Editor.... not for baan scripts where you use
where tdsls045._index1 = ***************
Regards
JP
shah_bs
13th September 2002, 03:42
This may not be of much help, but once upon a time, my DBA colleague was explaining something about 'Hints' in ORACLE SQL. For example, when you write a BAAN SQL with say ttmmmnnn._index1 = soandso, the BAAN driver creates a hint for oracle, specifying that it should use index1.
Maybe there are similar commands with other databases??
OmeLuuk
13th September 2002, 11:01
Different mechanisms are used (but I am not sure on how it works precisely: it is partly knowledge I overheard, (not all) tested, gossip etc).
1) the selection of fields: in the first line of the select statement. The order in which the fields appear can make a difference.
2) the use of fields in the where clause.
the ttmmm####._index# = {... [, ...]} can make a difference, but if for example index_2 and _1 is used , index 1 is used
3) when the order by ttmmm####._index# is used, you are most sure that the correct hint is given.
4) in newer tools it is also possible to pass a hint with http://www.baanboard.com/programmers_manual_baanerp_help_functions_query_hints_hint_types.
Armando_Rod2000
13th September 2002, 15:54
If u're using sql plus at unix-reflextion:
select t$ttyp,......,........, bla, bla, bla
from baan.(TABLE_NAME)&cia
where t$ttyp = YOUR_VALUE
and t$ttyp <> OTHER_VALUE;
when the query is executed the sistem gonna display a mess like "give me the value for cia" because u use &cia, if u don“t use it then you must to write company's table with the TABLE_NAME.
i hope help u!!!!
sorry this post is for jpadilla!
my bullsh@#% system is crazy today
patvdv
13th September 2002, 15:59
And what is your problem exactly? :confused:
mark_h
13th September 2002, 16:31
I think he meant to answer this post. So I merged the threads.
Mark