
Новые сообщения [новые:0]
Дайджест
Горячие темы
Избранное [новые:0]
Форумы
Пользователи
Статистика
Статистика нагрузки
Мод. лог
Поиск
|
|
12.11.2002, 21:33:43
|
|||
|---|---|---|---|
|
|||
hint OPTION(FORCE ORDER) in user-defined function:compilation error |
|||
|
#18+
How to use hint OPTION(FORCE ORDER) in user-defined function? create table a(i int ,val char ) create table b( i int, data char) go create function my_func (@v char) returns table as return ( select b.* from b JOIN a ON a.id=b.id OPTION(FORCE ORDER) ) go Output: Server: Msg 156, Level 15, State 1, Procedure my_func, Line 5 Incorrect syntax near the keyword 'OPTION'. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
|
|
|
12.11.2002, 22:02:25
|
|||
|---|---|---|---|
hint OPTION(FORCE ORDER) in user-defined function:compilation error |
|||
|
#18+
Choose in QA - Query - Show Execution Plan and check this script Код: plaintext 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. ... |
|||
|
:
Нравится:
Не нравится:
|
|||
|
|
|
12.11.2002, 22:24:32
|
|||
|---|---|---|---|
|
|||
hint OPTION(FORCE ORDER) in user-defined function:compilation error |
|||
|
#18+
Thanks, but ... 1) I want to hide this hint from users , which will use this function, it means I want keep hint in the body of function. 2) interesting point is that other hints, like NOLOCK, can be embedded in user-defined function without any problem. Thanks again ... |
|||
|
:
Нравится:
Не нравится:
|
|||
|
|
|
12.11.2002, 22:47:45
|
|||
|---|---|---|---|
hint OPTION(FORCE ORDER) in user-defined function:compilation error |
|||
|
#18+
You can use several table hints in same query (for each table, join, ect.) but only one OPTION clause. For example you can't create a view with OPTION clause. But you can create a view with several table hints. So a think it's the feature. OPTION hint(s) should be used throughout the entire query . So it's impossible that something in FROM Clause (inline UDF, view) already contains OPTION hint(s). ... |
|||
|
:
Нравится:
Не нравится:
|
|||
|
|
|

start [/forum/topic.php?fid=46&mobile=1&tid=1818866]: |
0ms |
get settings: |
7ms |
get forum list: |
15ms |
check forum access: |
3ms |
check topic access: |
3ms |
track hit: |
158ms |
get topic data: |
11ms |
get forum data: |
2ms |
get page messages: |
36ms |
get tp. blocked users: |
1ms |
| others: | 203ms |
| total: | 439ms |

| 0 / 0 |
