![]() | ![]() Products ![]() ![]() ![]() ![]() |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 4 of 4 total |
![]() |
Fri, Nov 9 2007 10:23 PM | Permanent Link |
"Trevor Keegan" | Hi,
I am using EDB v1.5b2 and have the following SQL Statement: INSERT INTO MyTable SELECT Acc.OID, Acc.Number, Acc.Name, Acc.TypeID, Acc.TaxTreatmentID, Acc.Percent, Type.Code, Type.Description AS Desc FROM AccHeader AS Acc , AccType AS Type WHERE Acc.TypeID = Type.OID AND Type.Code = :Type If I change my query to : INSERT INTO MyTable SELECT Acc.OID, Acc.Number, Acc.Name, Acc.TypeID, Acc.TaxTreatmentID, Acc.Percent, Type.Code, Type.Description AS Desc FROM AccHeader AS Acc , AccType AS Type WHERE Acc.TypeID = Type.OID AND Type.Code = 'A' Then everything seems to work OK. It seems as though I cannot use parameters here is that correct? Regards Trevor Keegan |
Sat, Nov 10 2007 12:56 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Trevor,
<< Then everything seems to work OK. It seems as though I cannot use parameters here is that correct? >> Is the original query just slow ? If so, then the reason is described here: http://www.elevatesoft.com/edb_faqt_6.htm -- Tim Young Elevate Software www.elevatesoft.com |
Sat, Nov 10 2007 5:40 PM | Permanent Link |
"Trevor Keegan" | Hello Tim,
The Query is not slow (could also be because I do not have much data), but I have noted your FAQ. My problem is just that the query does not run at all with the parameters in it. I found that if I try requesting the Execution plan on the first query i.e. I do not get an execution plan at all. However, when I run exactly the same query without the use of parameters, I get both and execution plan and the desired result. I also tried romiving the INSERT line i.e. Turn it into a simple SELECT statement using Parameters.....and this worked fine. This is what let me to ask.....can parameters can be used in this type of statement? Regards Trevor Keegan |
Mon, Nov 12 2007 5:58 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. ![]() | Trevor,
<< My problem is just that the query does not run at all with the parameters in it. I found that if I try requesting the Execution plan on the first query i.e. I do not get an execution plan at all. >> Did you try this with 1.06 ? There was an issue with parameterized queries that could cause something like this. Unfortunately, I think I found it during my work and forgot to log it. If you want to send me the database catalog/tables, I can test it here and see if it fits that case and officially add it as an incident report that has been fixed in 1.06. -- Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Wednesday, August 14, 2024 at 07:31 PM | Privacy Policy![]() © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? ![]() |