Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM Enhancement Requests and Suggestions » View Thread |
Messages 1 to 8 of 8 total |
Can this work? |
Sat, Oct 10 2009 10:03 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Tim
any chance this could work select * from ELN WHERE IF(:fred IS NULL,true,_encoding = :bert) now I get ElevateDB Error #700 An error was found in the statement at line 1 and column 28 (Invalid expression ? found, dynamic parameter type cannot be inferred) It would be a nice enhancement (at least I think so) Roy Lambert |
Sat, Oct 10 2009 4:26 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Roy,
<< any chance this could work select * from ELN WHERE IF(:fred IS NULL,true,_encoding = :bert) now I get ElevateDB Error #700 An error was found in the statement at line 1 and column 28 (Invalid expression ? found, dynamic parameter type cannot be inferred) >> It's the IS NULL, and it should be possible to do. I'll see what I can do. -- Tim Young Elevate Software www.elevatesoft.com |
Sun, Oct 11 2009 10:41 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Tim
Brill. That will make it possible to construct some pretty unreadable queries Roy Lambert |
Tue, Nov 3 2009 7:36 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Missed b5 I see.
Roy Lambert |
Wed, Nov 4 2009 10:42 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Roy,
<< Missed b5 I see. >> Actually, I looked into this and it really cannot be done. EDB needs to know the parameter type at compile time to at least be able to check the types of the IF() function, and it cannot do so with the IS NULL. DBISAM used to just punt on this type of thing until execution time, but EDB isn't set up like that, and it is a lot more overhead to re-check the parameter types for every execution. -- Tim Young Elevate Software www.elevatesoft.com |
Wed, Nov 4 2009 12:33 PM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Tim
>Actually, I looked into this and it really cannot be done. EDB needs to >know the parameter type at compile time to at least be able to check the >types of the IF() function, and it cannot do so with the IS NULL. DBISAM >used to just punt on this type of thing until execution time, but EDB isn't >set up like that, and it is a lot more overhead to re-check the parameter >types for every execution. Bummer. But thinking about it does the parameter type matter IS NULL can ONLY return True or False regardless of what type the parameter is can't it? Roy Lambert |
Wed, Nov 4 2009 3:36 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Roy,
<< Bummer. But thinking about it does the parameter type matter IS NULL can ONLY return True or False regardless of what type the parameter is can't it? >> Yes, I know what you mean. I'll do some more digging on this. I just want to make sure that I don't change it, release it, and then remember why it was done that way in the first place. -- Tim Young Elevate Software www.elevatesoft.com |
Thu, Nov 5 2009 3:48 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Tim
>Yes, I know what you mean. I'll do some more digging on this. I just want >to make sure that I don't change it, release it, and then remember why it >was done that way in the first place. I know just what you mean. My take on it is that you must be able to identify the THEN / ELSE types if not its a non starter and since they have to be the same having one identifiable should be OK. The IF part must either be identifiable or not matter. So if its a statement (eg A = B) one side must be identifiable and the other side can be a parameter, if its a single entity it has to be a boolean (nothing else would work). Now I know NULL means unknown (or in Roy's world an empty string) but it does mean that the other side of the test is immaterial since NULL can only be used with a special test anyway IS NULL or IS NOT NULL and type has no bearing on it. That probably helps to confuse things a bit Roy Lambert |
This web page was last updated on Friday, March 29, 2024 at 03:30 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |