daily pastebin goal
31%
SHARE
TWEET

Untitled

a guest Sep 14th, 2018 51 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
  1. how to use an XML param in sql query within XML Package
  2. <xsl:apply-templates select="/root/Products/Product">
  3. <xsl:with-param name="CategoryID" select="$CategoryID">
  4. </xsl:with-param>
  5. </xsl:apply-templates>
  6.    
  7. <query name="Products" rowElementName="Product">
  8.     <sql>
  9.         <![CDATA[              
  10.                     Select  TOP 1 Product.ProductID, Product.Name, Product.SubTitle, Product.Description, Product.SEName, Product.Summary, ProductVariant.Price,
  11.                             CAST(ProductVariant.LEPrice AS decimal(10,2)) AS LEPrice, Product.AuthorPreText1, Product.AuthorFName1, Product.AuthorLName1, Product.AuthorPreText2,
  12.                             Product.AuthorFName2, Product.AuthorLName2, Product.AuthorPreText3, Product.AuthorFName3, Product.AuthorLName3, Product.CoAuthorPreText1,
  13.                             Product.CoAuthorFName1, Product.CoAuthorLName1, Product.CoAuthorPreText2, Product.CoAuthorFName2, Product.CoAuthorLName2,
  14.                             Product.CoAuthorPreText3, Product.CoAuthorFName3, Product.CoAuthorLName3
  15.                     From    Product, ProductVariant, ProductCategory, Category
  16.                     Where   Status='Forthcoming' AND Product.ProductID = ProductVariant.ProductID AND Product.Deleted = 0 AND ProductCategory.CategoryID=@CategoryID AND Product.ProductID=ProductCategory.ProductID
  17.                     Order By Product.Name Asc
  18.                 ]]>
  19.     </sql>
  20.     <queryparam paramname="@CategoryID" paramtype="" sqlDataType="int" defvalue="0"  validationpattern="" />
  21. </query>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top