|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Hi guys,
I'm new to Firebird and I want to use the UDFs. I've tried to use SRIGHT. It's fast if for one table only but if there's joining it's very slow. Can you help me how to make it faster? Thanks in advance. |
|
#2
|
|||
|
|||
|
What kind of SQL statement are you trying to perform?
With regards, Martijn Tonies Database Workbench - developer tool for InterBase, Firebird, MySQL & MS SQL Server. Upscene Productions http://www.upscene.com
__________________
Martijn Tonies Database Workbench: developer IDE for Firebird, MySQL, InterBase, MSSQL Server and Oracle Upscene Productions http://www.upscene.com |
|
#3
|
|||
|
|||
|
Hi upscene,
Sorry it's only this I have time to reply. Here's my query. SELECT A.ITEMCODE, B.PLUCODE, C.ITEMDESC, SUM(B.QUANTITY) FROM SCANCODE A, SALESDETAILS B, ITEM_H C WHERE SRIGHT(RTRIM(A.SCANCODE), 13) = B.PLUCODE AND A.ITEMCODE = C.ITEMCODE GROUP BY A.ITEMCODE, B.PLUCODE, C.ITEMDESC ORDER BY SUM(B.QUANTITY) Hope to hear from you soon. Thank you in advance. |
|
#4
|
|||
|
|||
|
Hi,
With this join, Firebird cannot use an index on A.scancode... It's hard to tell what's going on though, without know the full table metadata (including constraints/indices) |
![]() |
| Viewing: Dev Shed Forums > Databases > Firebird SQL Development > Questions With UDF (new to Firebird) |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|