Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- how to use an XML param in sql query within XML Package
- <xsl:apply-templates select="/root/Products/Product">
- <xsl:with-param name="CategoryID" select="$CategoryID">
- </xsl:with-param>
- </xsl:apply-templates>
- <query name="Products" rowElementName="Product">
- <sql>
- <![CDATA[
- Select TOP 1 Product.ProductID, Product.Name, Product.SubTitle, Product.Description, Product.SEName, Product.Summary, ProductVariant.Price,
- CAST(ProductVariant.LEPrice AS decimal(10,2)) AS LEPrice, Product.AuthorPreText1, Product.AuthorFName1, Product.AuthorLName1, Product.AuthorPreText2,
- Product.AuthorFName2, Product.AuthorLName2, Product.AuthorPreText3, Product.AuthorFName3, Product.AuthorLName3, Product.CoAuthorPreText1,
- Product.CoAuthorFName1, Product.CoAuthorLName1, Product.CoAuthorPreText2, Product.CoAuthorFName2, Product.CoAuthorLName2,
- Product.CoAuthorPreText3, Product.CoAuthorFName3, Product.CoAuthorLName3
- From Product, ProductVariant, ProductCategory, Category
- Where Status='Forthcoming' AND Product.ProductID = ProductVariant.ProductID AND Product.Deleted = 0 AND ProductCategory.CategoryID=@CategoryID AND Product.ProductID=ProductCategory.ProductID
- Order By Product.Name Asc
- ]]>
- </sql>
- <queryparam paramname="@CategoryID" paramtype="" sqlDataType="int" defvalue="0" validationpattern="" />
- </query>
Add Comment
Please, Sign In to add comment