Join our DNN Community    (Newsletter, Tips, Tricks and Forums for DNN Skins & Modules)

 


 
Microsoft Gold Certified Partner - DNN Benefactor

DotNetNuke Powered! 


Thursday, August 28, 2008 Register · Login · Contact · Search:  
Company Solutions Portfolio Contact
Forums
General
The ever-powerful ListX module forum. Post your questions, new configuration ideas and reviews.
Subject: action:file SQL + subquery

You are not authorized to post a reply.   
Author Messages
ken.stessens
Middleweight
Posts:88

07/03/2008 2:31 PM Alert 
Hello,

I have been working succesfully with the action:file (destination type SQL) to load data from a text file into a database.
Now I need to add a subquery inside an IIF tag, something like below. The reference to the variable from the text file is @pn:

{IIF,"
\{SUBQUERY,
Query=\"SELECT count() FROM products WHERE pn=@pn\",
Format=\"\[count]\"
\}=0
","...","..."}

The problem is that @pn is not recognised as the variable reference inside the subquery. Other variables that are inside the IIF but not inside the subquery are working just fine. is this another escaping trick?

Thanks in advance,
Ken
robert_chumley
Please Wait...
Posts:579

07/07/2008 2:58 PM Alert 
Hello,
I have noticed the same problem. I have always resorted to exact values coming from the main query. You can always select another value like @pn as MyPN and use [MyPN] in the subquery instead.
thanks,

Robert Chumley
r2integrated (formally bi4ce)
ken.stessens
Middleweight
Posts:88

07/10/2008 8:26 AM Alert 
Robert,

I did solve the problem by creating a stored procedure. Thanks for the suggestion anyway, I'll probably be able to use it in near future.

Best regards,
Ken
You are not authorized to post a reply.
Forums > Bi4ce.Modules.ListX > General > action:file SQL + subquery



ActiveForums 3.6
 
Latest Post
 
At R2integrated (formerly Bi4ce), we take support seriously.  That's why we support our customers and DNN community with daily monitoring from our experienced engineering team.  We ask that the first step taken is to read the relevant documentation and support forums prior to submitting any questions that may already be available or have been answered.  We ask that you review the documentation that we provide for our products before posting a question.

The Forums are for our customers to chat, exchange ideas and strategies, and submit feedback.  Please be sure to perform keyword searches for previous related forum responses.

To be helpful when submitting a new item, please include the following: 
  1. DNN Version
  2. Module Version
  3. Admin Log Viewer Information
  4. Environment detail: Operating system, .NET framework version, database and version, IIS version, Browser version (if appropriate)
We always try to respond quickly and monitor the forums daily during business hours (EST).  Occasionally, requests for a specific project requirement may not apply for the free support offered. For project specific support please submit via our Information Request form.

Thank you for using our Forums.

Click here to register for the Forums
 
© 2008 by R2integrated (formerly Bi4ce) | DNN® is a registered trademark of DotNetNuke Corporation