Login ProductsSalesSupportDownloadsAbout |
Home » Technical Support » ElevateDB Technical Support » Support Forums » ElevateDB SQL » View Thread |
Messages 1 to 10 of 10 total |
Copy Query with parameters |
Wed, Feb 3 2016 3:42 AM | Permanent Link |
Hershcu Sorin | Hello
I have a Query with parameters. After I assign values to the parameters and open the query I want to copy the command to another query without need to assign the parameters values again Can I do it and how? Thanks Sorin |
Wed, Feb 3 2016 4:48 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Sorin
I don't know a way. Roy Lambert |
Wed, Feb 3 2016 2:31 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Sorin,
<< I have a Query with parameters. After I assign values to the parameters and open the query I want to copy the command to another query without need to assign the parameters values again Can I do it and how? >> Yes, use something like this: TargetQuery.Close; TargetQuery.SQL.Assign(SourceQuery.SQL); TargetQuery.Params:=SourceQuery.Params; Tim Young Elevate Software www.elevatesoft.com |
Thu, Feb 4 2016 3:10 AM | Permanent Link |
Hershcu Sorin | Thanks
No It's raise the error: Error #700 Invalid expression ? found, dynamic parameter reference not allowed Sorin "Tim Young [Elevate Software]" wrote in message news:503013EF-F8F9-440F-8F5D-0C13C6F9A108@news.elevatesoft.com... Sorin, << I have a Query with parameters. After I assign values to the parameters and open the query I want to copy the command to another query without need to assign the parameters values again Can I do it and how? >> Yes, use something like this: TargetQuery.Close; TargetQuery.SQL.Assign(SourceQuery.SQL); TargetQuery.Params:=SourceQuery.Params; Tim Young Elevate Software www.elevatesoft.com |
Thu, Feb 4 2016 8:43 AM | Permanent Link |
Roy Lambert NLH Associates Team Elevate | Sorin
Can you show the sql and the parameters you want to apply? Roy Lambert |
Thu, Feb 4 2016 11:23 AM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Sorin,
<< No It's raise the error: Error #700 Invalid expression ? found, dynamic parameter reference not allowed >> This means that you're using a parameter marker in a location in the SQL where you're not allowed to do so, such as in the SELECT expressions. Tim Young Elevate Software www.elevatesoft.com |
Thu, Feb 4 2016 12:12 PM | Permanent Link |
Hershcu Sorin | This is the SQL:
SELECT Id, DateToDo, Tipul, CodCar, Number, Type, Contact, Tel, Shem, Tel1, Oved, Atar, Problem, ZeutM FROM KCrTipul Ct LEFT JOIN KCar Cr ON Ct.CarId = Cr.Id LEFT JOIN KTblTipul Tt ON Ct.TipulId = Tt.Id LEFT JOIN KTblType Tp ON Cr.TypeId = Tp.Id LEFT JOIN KTblOved Tv ON Cr.OvedId = Tv.Id LEFT JOIN KTblAtar Ta ON Cr.AtarId = Ta.Id LEFT JOIN KClient Cl ON Cr.ClientId = Cl.Id WHERE Cr.Pail = True AND Cr.Freze = False AND DateToDo >= mDateF AND DateToDo <= mDateP ORDER BY DateToDo There are 2 parameters. Witch one is not allowed? Thanks Sorin "Tim Young [Elevate Software]" wrote in message news:738890E1-9F1F-4FE2-B4E0-7479048E841E@news.elevatesoft.com... Sorin, << No It's raise the error: Error #700 Invalid expression ? found, dynamic parameter reference not allowed >> This means that you're using a parameter marker in a location in the SQL where you're not allowed to do so, such as in the SELECT expressions. Tim Young Elevate Software www.elevatesoft.com |
Fri, Feb 5 2016 12:39 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Sorin,
<< There are 2 parameters. Witch one is not allowed? >> That SQL looks fine. Are you using the exact same code that I posted ? Tim Young Elevate Software www.elevatesoft.com |
Fri, Feb 5 2016 1:03 PM | Permanent Link |
Hershcu Sorin | Yes. This is the source SQL. I assign the parameters value and open
Then I assign the SQL to a target query, add the command "CREATE VIEW "TEMP" AS " before the SQL and try to execute. Then it raise the error about the paramater Thanks Sorin "Tim Young [Elevate Software]" wrote in message news:BA6127D7-C13F-4CF6-8790-297162985845@news.elevatesoft.com... Sorin, << There are 2 parameters. Witch one is not allowed? >> That SQL looks fine. Are you using the exact same code that I posted ? Tim Young Elevate Software www.elevatesoft.com |
Mon, Feb 8 2016 6:20 PM | Permanent Link |
Tim Young [Elevate Software] Elevate Software, Inc. timyoung@elevatesoft.com | Sorin,
<< Yes. This is the source SQL. I assign the parameters value and open Then I assign the SQL to a target query, add the command "CREATE VIEW "TEMP" AS " before the SQL and try to execute. Then it raise the error about the parameter >> You can't use parameters with CREATE DDL statements. Tim Young Elevate Software www.elevatesoft.com |
This web page was last updated on Monday, April 29, 2024 at 05:23 AM | Privacy PolicySite Map © 2024 Elevate Software, Inc. All Rights Reserved Questions or comments ? E-mail us at info@elevatesoft.com |