Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » DBISAM Technical Support » Support Forums » DBISAM SQL » View Thread |
Messages 1 to 3 of 3 total |
IN Clause with parameter |
Sun, Feb 22 2015 6:12 AM | Permanent Link |
Petter Topp | Is it possible to use parameters with IN operator?
I would like to produce a list of noncontiguous records based on an Column of Integer type. "Where IN (:Values)" Will this work? And how do I assign the parameters using ParamByName in code? |
Sun, Feb 22 2015 8:28 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Petter
>Is it possible to use parameters with IN operator? No, neither DBISAM nor ElevateDB allows this >I would like to produce a list of noncontiguous records based on an Column of Integer type. > >"Where IN (:Values)" > >Will this work? >And how do I assign the parameters using ParamByName in code? You have to build the SQL in code. You can sort of do it by putting the sql into the query then doing something like query.sql.text := StringReplace(query.sql.text,':Values','my comma separated in string',[rfIgnoreCase,rfReplaceAll]); Roy Lambert |
Sun, Feb 22 2015 3:06 PM | Permanent Link |
Petter Topp | Roy,
To bad - it would have been convenient in this case - it's a quite extensive script for generating a report... I guess that I will have to do this like You suggest. Thanks Petter Roy Lambert wrote: Petter >Is it possible to use parameters with IN operator? No, neither DBISAM nor ElevateDB allows this >I would like to produce a list of noncontiguous records based on an Column of Integer type. > >"Where IN (:Values)" > >Will this work? >And how do I assign the parameters using ParamByName in code? You have to build the SQL in code. You can sort of do it by putting the sql into the query then doing something like query.sql.text := StringReplace(query.sql.text,':Values','my comma separated in string',[rfIgnoreCase,rfReplaceAll]); Roy Lambert |
This web page was last updated on Monday, May 6, 2024 at 12:23 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |