473,440 Members | 1,659 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,440 software developers and data experts.

How to speed up store procedure[sqlserver2005-420 Lines]

Hello,

I have wrote a stored procedure[Sqlserver2005] but its real slow. Its activated by a
dropdownlist[asp] on web page but its takes to long to process.
How to access faster in asp pages.

Expand|Select|Wrap|Line Numbers
  1. CREATE PROCEDURE [dbo].[sp_storefrontshoppingcategoryGetproductlistbyManufacturermodel_v3] 
  2. @aintEnterpriseId INT=0,
  3. @aintStoreId INT=0,
  4. @aintUserId INT=0,
  5. @aintProductCategoryId INT=0,
  6. @aintProductCategoryFilterId INT=0,
  7. @aintUserHasQuotedPricing TINYINT=0,
  8. @astrUserProdCatFilter VARCHAR(30)='',
  9. @aintUserPricingLevelID INT=0,
  10. @adecStorePoint2DollarRatio DECIMAL(11,2)=1,
  11. @aintCurrentPageNum TINYINT=1,
  12. @aintNumberOfItemsPerPage INT=35,
  13. @astrManufacturer VARCHAR(50)='',
  14. @astrModel VARCHAR(50)='',
  15. @aintSortby TINYINT=0,
  16. @aintTotalItems int=0 out
  17. )
  18. AS
  19. BEGIN
  20. SET NOCOUNT ON
  21. -- -----------------
  22. -- PRODUCT ATTRIBUTES
  23. -- 1 QtyMinimumEnforced
  24. -- 4 ASSET_TAG_PRODUCT_QTY_MIN
  25. -- 5 ASSET_TAG_PRODUCT_QTY_MAX
  26. -- -----------------
  27. --------------------------------------------------
  28. --Declarations of local variables
  29. --------------------------------------------------
  30. DECLARE @intProductInMultipleCategoriesEnabled TINYINT
  31. DECLARE @ubound INT
  32. DECLARE @lbound INT
  33. DECLARE @intDisplayOrder SMALLINT
  34. DECLARE @strProductName VARCHAR(150) 
  35. DECLARE @intAccessCode INT --#6
  36. DECLARE @intAccesscodeTypeId INT --#6
  37. SET @intAccesscodeTypeId=71 --#6 
  38. -- --------------------------------------
  39. -- Initialize variables
  40. -- --------------------------------------
  41. SELECT @ubound=0,
  42. @lbound=0,
  43. @intDisplayOrder=0,
  44. @strProductName='',
  45. @intProductInMultipleCategoriesEnabled=0
  46.  
  47. SELECT @intProductInMultipleCategoriesEnabled=ISNULL(StoreproductInMultiCategoryEnabled,'')
  48. FROM CompanyStore.dbo.t_Stores with (nolock)
  49. WHERE EnterpriseId=@aintEnterpriseId AND
  50. StoreId=@aintStoreId
  51.  
  52. SET @ubound=@aintNumberOfItemsPerPage * @aintCurrentPageNum
  53. SET @lbound=@ubound - (@aintNumberOfItemsPerPage - 1)
  54.  
  55. -- Get Default Sorting Option
  56. --#6
  57. IF (@aintStoreId=7223 AND @aintSortby=0)--tesing purpose set the store
  58. BEGIN
  59. SELECT @intAccessCode=AccessCode
  60. FROM CompanyStore.dbo.t_AccessCode
  61. WHERE EnterpriseId=@aintEnterpriseId AND
  62. StoreId=@aintStoreId AND
  63. AccessCodeTypeId=@intAccesscodeTypeId
  64.  
  65. SET @aintSortby=CASE @intAccessCode
  66. WHEN 1 THEN 1
  67. WHEN 2 THEN 3
  68. WHEN 3 THEN 2
  69. END --End#6
  70. END
  71.  
  72. CREATE TABLE #tmp_GetProductList_Product
  73. (
  74. ProductId INT,
  75. ProductName VARCHAR(150) Null,
  76. ProductEnterpriseId INT,
  77. ProductSellingPageId MONEY,
  78. ProductPrice MONEY,
  79. ProductThumbnailImageTypeId TINYINT,
  80. ProductVisibilityCodes VARCHAR(300),
  81. ProductSKU VARCHAR(150),
  82. ManufacturerName VARCHAR(300),
  83. ProductCategoryId INT,
  84. ProductDescriptors VARCHAR(500),
  85. ProductEnlargedImageTypeId TINYINT,
  86. ProductDescription VARCHAR(5000), 
  87. ProductIsReadOnly TINYINT,
  88. SupplierCatalog VARCHAR(250),--#2
  89. EnLargedImageName VARCHAR(50), --#1
  90. ThumbNailImage VARCHAR(50),
  91. productunitofMeasure VARCHAR(25),
  92. ProductNumOptions SMALLINT, --#3
  93. DisplayOrder INT,
  94. RowNum INT NOT NULL IDENTITY(1,1)
  95. )
  96.  
  97. IF(@intProductInMultipleCategoriesEnabled=1)
  98. BEGIN
  99. SELECT @aintTotalItems=COUNT(DISTINCT t_StorefrontProduct.ProductId)
  100. FROM t_StorefrontProduct AS t_StorefrontProduct WITH(nolock)
  101. INNER JOIN CompanyStore.dbo.t_StorefrontCategoryProduct AS t_StorefrontCategoryProduct WITH(nolock)
  102. ON (t_StorefrontProduct.StoreId=t_StorefrontCategoryProduct.StoreId AND
  103. t_StorefrontProduct.ProductId=t_StorefrontCategoryProduct.ProductId )
  104. LEFT JOIN CompanyStore.dbo.t_ManufacturerModelSkuMapping AS t_ManufacturerModelSkuMapping WITH(nolock)
  105. ON (t_ManufacturerModelSkuMapping.EnterpriseId=t_StorefrontProduct.EnterpriseId AND
  106. t_ManufacturerModelSkuMapping.ProductId=t_StorefrontProduct.ProductId )
  107. INNER JOIN CompanyStore.dbo.t_products t_products
  108. ON (t_products.EnterpriseId=t_StorefrontProduct.ProductEnterpriseId AND
  109. t_products.ProductId=t_StorefrontProduct.ProductId)
  110. WHERE t_StorefrontProduct.EnterpriseId=@aintEnterpriseId AND
  111. t_StorefrontProduct.StoreId=@aintStoreId AND
  112. t_StorefrontCategoryProduct.CategoryId=@aintProductCategoryId AND
  113. dbo.fn_IsProductVisible(@aintEnterpriseId, @aintStoreId,t_StorefrontProduct.ProductEnterpriseId,t_StorefrontProduct.ProductId,@astrUserProdCatFilter)=1 AND --#4
  114. ISNULL(t_ManufacturerModelSkuMapping.Manufacturer,'')=CASE WHEN ISNULL(@astrManufacturer,'')<>'' THEN @astrManufacturer
  115. ELSE ISNULL(t_ManufacturerModelSkuMapping.Manufacturer,'')
  116. END AND
  117. CAST(ISNULL(t_ManufacturerModelSkuMapping.Model,'') AS VARCHAR)=CASE WHEN ISNULL(@astrModel,'')<>'' THEN @astrModel
  118. ELSE ISNULL(t_ManufacturerModelSkuMapping.Model,'')
  119. END
  120.  
  121. SET ROWCOUNT @ubound
  122.  
  123. INSERT #tmp_GetProductList_Product
  124. (
  125. ProductId,
  126. ProductName,
  127. ProductEnterpriseId,
  128. ProductSellingPageId,
  129. ProductPrice,
  130. ProductThumbnailImageTypeId,
  131. ProductVisibilityCodes,
  132. ProductSKU,
  133. ManufacturerName,
  134. ProductCategoryId,
  135. ProductDescriptors,
  136. ProductEnlargedImageTypeId,
  137. ProductDescription,
  138. ProductIsReadOnly,
  139. SupplierCatalog, --#2
  140. EnLargedImageName, --#1
  141. ThumbNailImage,
  142. productunitofMeasure,
  143. ProductNumOptions, --#3
  144. DisplayOrder
  145. )
  146. SELECT productId,
  147. ProductName,
  148. ProductEnterpriseId,
  149. ProductSellingPageId,
  150. Productprice,
  151. ProductThumbnailImageTypeId,
  152. ProductVisibilityCodes,
  153. ProductSKU,
  154. ManufacturerName,
  155. ProductCategoryId,
  156. ProductDescriptors,
  157. ProductEnlargedImageTypeId,
  158. ProductDescription,
  159. ProductIsReadOnly,
  160. SupplierCatalogLink,
  161. productenlargedimagefilename,
  162. ProductImageFileName,
  163. productunitofMeasure,
  164. ProductNumOptions, --#3
  165. DisplayOrder
  166. FROM
  167. ( SELECT DISTINCT
  168. t_StorefrontProduct.ProductId AS ProductId,
  169. t_StorefrontProduct.ProductName AS ProductName,
  170. t_StorefrontProduct.ProductEnterpriseId AS ProductEnterpriseId,
  171. t_StorefrontProduct.ProductSellingPageId AS ProductSellingPageId,
  172. CASE
  173. WHEN @aintUserHasQuotedPricing=1AND (dbo.fn_StorefrontProductPriceGetQuoted_NER(@aintEnterpriseId, @aintStoreId, @aintUserId, t_StorefrontProduct.ProductEnterpriseId, t_StorefrontProduct.ProductId)>0 )
  174. THEN dbo.fn_StorefrontProductPriceGetQuoted_NER(@aintEnterpriseId, @aintStoreId, @aintUserId, t_StorefrontProduct.ProductEnterpriseId, t_StorefrontProduct.ProductId)
  175. ELSE
  176. CASE WHEN @aintUserPricingLevelID=0 THEN ProductDefaultPriceA
  177. WHEN (@aintUserPricingLevelID>0) AND (dbo.fn_EnterprisePublishProductPriceGetAltPrice_NER(t_StorefrontProduct.ProductEnterpriseId,t_StorefrontProduct.ProductId,@aintUserPricingLevelID,-1)>0)
  178. THEN dbo.fn_EnterprisePublishProductPriceGetAltPrice_NER(t_StorefrontProduct.ProductEnterpriseId,t_StorefrontProduct.ProductId,@aintUserPricingLevelID,-1)
  179. ELSE ProductDefaultPriceA
  180. END
  181. END AS ProductPrice,
  182. t_StorefrontProduct.ProductThumbnailImageTypeId ProductThumbnailImageTypeId,
  183. t_StorefrontProduct.ProductVisibilityCodes ProductVisibilityCodes,
  184. CompanyStore.dbo.fn_StorefrontGetproductSKU (t_StorefrontProduct.ProductId, 0, '') AS ProductSku,
  185. dbo.fn_StorefrontGetManufacturerNameByProductId(@aintEnterpriseId,t_StorefrontProduct.ProductId) AS ManufacturerName,
  186. t_StorefrontCategoryProduct.CategoryId ProductCategoryId,
  187. ISNULL(ProductDescriptors,'') AS ProductDescriptors,
  188. t_StorefrontProduct.ProductEnlargedImageTypeId ProductEnlargedImageTypeId,
  189. t_StorefrontProduct.ProductDescriptiON ProductDescription,
  190. ISNULL(t_StorefrontProduct.ProductIsReadOnly,0) AS 'ProductIsReadOnly',
  191. CoStoreStorefront.dbo.fn_GetStoreFrontProductAttributeValue(@aintEnterpriseId,@aintStoreid,t_StorefrontProduct.ProductId,6) AS 'SupplierCatalogLink',
  192. ISNULL(productenlargedimagefilename, 'noimage.gif') productenlargedimagefilename, --#1
  193. ISNULL(ProductImageFileName,'noImage.gif') ProductImageFileName,
  194. ISNULL(t_products.productunitofMeasure,'') AS productunitofMeasure,
  195. ProductNumOptions AS ProductNumOptions, --#3
  196. t_Products.DisplayOrder AS DisplayOrder
  197. FROM t_StorefrontProduct t_StorefrontProduct WITH(nolock)
  198. INNER JOIN CompanyStore.dbo.t_StorefrontCategoryProduct AS t_StorefrontCategoryProduct WITH(nolock)
  199. ON (t_StorefrontProduct.StoreId=t_StorefrontCategoryProduct.StoreId AND
  200. t_StorefrontProduct.ProductId=t_StorefrontCategoryProduct.ProductId)
  201. LEFT JOIN CompanyStore.dbo.t_ManufacturerModelSkuMapping AS t_ManufacturerModelSkuMapping WITH(nolock)
  202. ON (t_ManufacturerModelSkuMapping.EnterpriseId=t_StorefrontProduct.EnterpriseId AND
  203. t_ManufacturerModelSkuMapping.ProductId=t_StorefrontProduct.ProductId)
  204. INNER JOIN CompanyStore.dbo.t_products t_products
  205. ON (t_products.enterpriseid=t_StorefrontProduct.ProductEnterpriseId AND
  206. t_products.ProductId=t_StorefrontProduct.ProductId)
  207. WHERE t_StorefrontProduct.EnterpriseId=@aintEnterpriseId AND
  208. t_StorefrontProduct.StoreId=@aintStoreId AND
  209. t_StorefrontCategoryProduct.CategoryId=@aintProductCategoryId AND
  210. dbo.fn_IsProductVisible(@aintEnterpriseId, @aintStoreId,t_StorefrontProduct.ProductEnterpriseId,t_StorefrontProduct.ProductId,@astrUserProdCatFilter) = 1 AND
  211. ISNULL(t_ManufacturerModelSkuMapping.Manufacturer,'')=CASE WHEN ISNULL(@astrManufacturer,'')<>'' THEN @astrManufacturer
  212. ELSE ISNULL(t_ManufacturerModelSkuMapping.Manufacturer,'')
  213. END AND
  214. CAST(ISNULL(t_ManufacturerModelSkuMapping.Model,'') AS VARCHAR)=CASE WHEN ISNULL(@astrModel,'')<>'' THEN @astrModel
  215. ELSE ISNULL(t_ManufacturerModelSkuMapping.Model,'')
  216. END
  217. ) AS tblTemp
  218. ORDER BY
  219. CASE WHEN @aintSortby=1
  220. THEN tblTemp.ProductName END ASC,
  221. CASE WHEN @aintSortby=2
  222. THEN tblTemp.ProductPrice END DESC,
  223. CASE WHEN @aintSortby=3
  224. THEN tblTemp.ProductPrice END ASC,
  225. CASE WHEN @aintSortby=4
  226. THEN tblTemp.ProductSku END ASC,
  227. CASE WHEN @aintSortby=0
  228. THEN tblTemp.DisplayOrder END ASC
  229. END
  230. ------------ 
  231. --ELSE Part
  232. ------------
  233. ELSE IF(@intProductInMultipleCategoriesEnabled = 0)
  234. BEGIN
  235. SELECT @aintTotalItems=COUNT(DISTINCT t_StorefrontProduct.ProductId)
  236. FROM CoStoreStorefront.dbo.t_StorefrontProduct t_StorefrontProduct WITH (nolock)
  237. INNER JOIN CompanyStore.dbo.t_StoreProducts AS t_StoreProducts WITH (nolock)
  238. ON (t_StorefrontProduct.StoreId=t_StoreProducts.StoreId AND
  239. t_StorefrontProduct.ProductId=t_StoreProducts.ProductId)
  240. INNER JOIN CompanyStore.dbo.t_Categories AS t_Categories WITH(nolock)
  241. ON (t_StoreProducts.StoreId=t_Categories.StoreId AND
  242. t_StoreProducts.CategoryId=t_Categories.CategoryId)
  243. LEFT JOIN CompanyStore.dbo.t_ManufacturerModelSkuMapping AS t_ManufacturerModelSkuMapping WITH(nolock)
  244. ON (t_ManufacturerModelSkuMapping.EnterpriseId=t_StorefrontProduct.EnterpriseId AND
  245. t_ManufacturerModelSkuMapping.StoreId=t_StorefrontProduct.StoreId AND
  246. t_ManufacturerModelSkuMapping.ProductId=t_StorefrontProduct.ProductId)
  247. INNER JOIN CompanyStore.dbo.t_products t_products
  248. ON (t_products.enterpriseid=t_StorefrontProduct.EnterpriseId AND
  249. t_products.ProductId=t_StorefrontProduct.ProductId)
  250. WHERE t_StorefrontProduct.EnterpriseId=@aintEnterpriseId AND
  251. t_StorefrontProduct.StoreId=@aintStoreId AND
  252. t_StoreProducts.CategoryId=@aintProductCategoryId AND
  253. dbo.fn_IsProductVisible(@aintEnterpriseId, @aintStoreId,t_StorefrontProduct.ProductEnterpriseId,t_StorefrontProduct.ProductId,@astrUserProdCatFilter)=1 AND
  254. ISNULL(t_ManufacturerModelSkuMapping.Manufacturer,'')=CASE WHEN ISNULL(@astrManufacturer,'')<>'' THEN @astrManufacturer
  255. ELSE ISNULL(t_ManufacturerModelSkuMapping.Manufacturer,'')
  256. END AND
  257. CAST(ISNULL(t_ManufacturerModelSkuMapping.Model,'') AS VARCHAR)=CASE WHEN ISNULL(@astrModel,'')<>'' THEN @astrModel
  258. ELSE ISNULL(t_ManufacturerModelSkuMapping.Model,'')
  259. END
  260.  
  261. SET ROWCOUNT @ubound
  262.  
  263. INSERT #tmp_GetProductList_Product
  264. (
  265. ProductId,
  266. ProductName,
  267. ProductEnterpriseId,
  268. ProductSellingPageId,
  269. ProductPrice,
  270. ProductThumbnailImageTypeId,
  271. ProductVisibilityCodes,
  272. ProductSKU,
  273. ManufacturerName,
  274. ProductCategoryId,
  275. ProductDescriptors,
  276. ProductEnlargedImageTypeId,
  277. ProductDescription,
  278. ProductIsReadOnly,
  279. SupplierCatalog, --#2
  280. EnLargedImageName, --#1
  281. ThumbNailImage,
  282. productunitofMeasure,
  283. ProductNumOptions, --#3
  284. DisplayOrder
  285. )
  286. SELECT productId,
  287. ProductName,
  288. ProductEnterpriseId,
  289. ProductSellingPageId,
  290. Productprice,
  291. ProductThumbnailImageTypeId,
  292. ProductVisibilityCodes,
  293. ProductSKU,
  294. ManufacturerName,
  295. ProductCategoryId,
  296. ProductDescriptors,
  297. ProductEnlargedImageTypeId,
  298. ProductDescription,
  299. ProductIsReadOnly,
  300. SupplierCatalogLink,
  301. productenlargedimagefilename,
  302. ProductImageFileName,
  303. productunitofMeasure,
  304. ProductNumOptions, --#3
  305. DisplayOrder
  306. FROM
  307. (
  308. SELECT DISTINCT
  309. t_StorefrontProduct.ProductId AS productid,
  310. t_StorefrontProduct.ProductName AS productname,
  311. t_StorefrontProduct.ProductEnterpriseId AS ProductEnterpriseId,
  312. t_StorefrontProduct.ProductSellingPageId AS ProductSellingPageId,
  313. CASE
  314. WHEN @aintUserHasQuotedPricing=1 and (dbo.fn_StorefrontProductPriceGetQuoted_NER(@aintEnterpriseId, @aintStoreId, @aintUserId, t_StorefrontProduct.ProductEnterpriseId, t_StorefrontProduct.ProductId) > 0 )
  315. THEN dbo.fn_StorefrontProductPriceGetQuoted_NER(@aintEnterpriseId, @aintStoreId, @aintUserId, t_StorefrontProduct.ProductEnterpriseId, t_StorefrontProduct.ProductId)
  316. ELSE CASE WHEN @aintUserPricingLevelID=0 THEN ProductDefaultPriceA
  317. WHEN (@aintUserPricingLevelID > 0) and (dbo.fn_EnterprisePublishProductPriceGetAltPrice_NER(t_StorefrontProduct.ProductEnterpriseId,t_StorefrontProduct.ProductId,@aintUserPricingLevelID,-1) >0)
  318. THEN dbo.fn_EnterprisePublishProductPriceGetAltPrice_NER(t_StorefrontProduct.ProductEnterpriseId,t_StorefrontProduct.ProductId,@aintUserPricingLevelID,-1)
  319. ELSE ProductDefaultPriceA
  320. END
  321. END AS ProductPrice,
  322. t_StorefrontProduct.ProductThumbnailImageTypeId ProductThumbnailImageTypeId,
  323. t_StorefrontProduct.ProductVisibilityCodes ProductVisibilityCodes,
  324. CompanyStore.dbo.fn_StorefrontGetproductSKU (t_StorefrontProduct.ProductId, 0, '') AS ProductSku,
  325. dbo.fn_StorefrontGetManufacturerNameByProductId(@aintEnterpriseId,t_StorefrontProduct.ProductId) AS ManufacturerName,
  326. t_StorefrontCategoryProduct.CategoryId ProductCategoryId,
  327. ISNULL(ProductDescriptors,'') AS ProductDescriptors,
  328. t_StorefrontProduct.ProductEnlargedImageTypeId ProductEnlargedImageTypeId,
  329. t_StorefrontProduct.ProductDescription ProductDescription,
  330. ISNULL(t_StorefrontProduct.ProductIsReadOnly,0) AS 'ProductIsReadOnly',
  331. CoStoreStorefront.dbo.fn_GetStoreFrontProductAttributeValue(@aintEnterpriseId,@aintStoreid,t_StorefrontProduct.ProductId,6) AS 'SupplierCatalogLink',
  332. ISNULL(productenlargedimagefilename, 'noimage.gif') productenlargedimagefilename, --#1
  333. ISNULL(ProductImageFileName,'noImage.gif') ProductImageFileName,
  334. ISNULL(t_products.productunitofMeasure,'') AS productunitofMeasure,
  335. ProductNumOptions as ProductNumOptions --#3
  336. ,t_Products.DisplayOrder AS DisplayOrder
  337. FROM t_StorefrontProduct t_StorefrontProduct with(nolock)
  338. INNER JOIN CompanyStore.dbo.t_StorefrontCategoryProduct AS t_StorefrontCategoryProduct with(nolock)
  339. On (
  340. t_StorefrontProduct.StoreId=t_StorefrontCategoryProduct.StoreId And
  341. t_StorefrontProduct.ProductId=t_StorefrontCategoryProduct.ProductId
  342. )
  343. left JOIN CompanyStore.dbo.t_ManufacturerModelSkuMapping AS t_ManufacturerModelSkuMapping with(nolock)
  344. On (
  345. t_ManufacturerModelSkuMapping.EnterpriseId=t_StorefrontProduct.EnterpriseId and
  346. t_ManufacturerModelSkuMapping.ProductId=t_StorefrontProduct.ProductId
  347. )
  348. INNER JOIN CompanyStore.dbo.t_products t_products on --#1
  349. (
  350. t_products.enterpriseid=t_StorefrontProduct.ProductEnterpriseId and
  351. t_products.ProductId=t_StorefrontProduct.ProductId
  352. )
  353. where t_StorefrontProduct.EnterpriseId=@aintEnterpriseId and
  354. t_StorefrontProduct.StoreId=@aintStoreId And
  355. t_StorefrontCategoryProduct.CategoryId=@aintProductCategoryId and
  356. dbo.fn_IsProductVisible(@aintEnterpriseId, @aintStoreId,t_StorefrontProduct.ProductEnterpriseId,t_StorefrontProduct.ProductId,@astrUserProdCatFilter)=1 --#4
  357. And
  358. ISNULL(t_ManufacturerModelSkuMapping.Manufacturer,'')=CASE WHEN ISNULL(@astrManufacturer,'')<>''
  359. THEN @astrManufacturer
  360. ELSE ISNULL(t_ManufacturerModelSkuMapping.Manufacturer,'')
  361. END and
  362. cast(ISNULL(t_ManufacturerModelSkuMapping.Model,'') as varchar)=CASE WHEN ISNULL(@astrModel,'')<>''
  363. THEN @astrModel
  364. ELSE ISNULL(t_ManufacturerModelSkuMapping.Model,'')
  365. END
  366. ) AS tblTemp
  367. Order by
  368. CASE WHEN @aintSortby=1
  369. THEN tblTemp.ProductName END ASC,
  370. CASE WHEN @aintSortby=2
  371. THEN tblTemp.ProductPrice END DESC,
  372. CASE WHEN @aintSortby=3
  373. THEN tblTemp.ProductPrice END ASC,
  374. CASE WHEN @aintSortby=4
  375. THEN ProductSku END ASC,
  376. CASE WHEN @aintSortby=0 
  377. THEN tblTemp.DisplayOrder END ASC
  378. END
  379.  
  380. SET NOCOUNT ON
  381. SELECT ProductId,
  382. ProductName,
  383. ProductEnterpriseId,
  384. ProductSellingPageId,
  385. ProductPrice,
  386. ProductThumbnailImageTypeId,
  387. ProductVisibilityCodes,
  388. ProductSKU,
  389. ManufacturerName,
  390. ProductCategoryId,
  391. ProductDescriptors,
  392. ProductEnlargedImageTypeId,
  393. ProductDescription,
  394. ProductIsReadOnly,
  395. SupplierCatalog,
  396. EnLargedImageName,
  397. ThumbNailImage,
  398. productunitofMeasure,
  399. ProductNumOptions,
  400. RowNum,
  401. CoStoreStorefront.dbo.fn_GetProductMinimumQty(@aintEnterpriseId,ProductId) AS 'QuantityMinimum', --#5
  402. CoStoreStorefront.dbo.fn_GetProductAttribute(@aintEnterpriseId,@aintStoreid,ProductId,1) AS 'IsQtyMinEnforced' --#5
  403. FROM #tmp_GetProductList_Product
  404. WHERE RowNum BETWEEN @lbound AND @ubound
  405.  
  406. DROP TABLE #tmp_GetProductList_Product
  407. END
  408.  
Note:-
The problem is when i select dropdownlist it should take some time(Slow) to loading on the asp webpage, but the sp is correct..,



Regards
Siva
Apr 21 '10 #1
0 1056

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Joăo Santa Bárbara | last post by:
Hi all i need to know if sql dmo can connect to SQL server 2005 if can! how can i do this ?? i have this code Dim xServer a SQLDMO.Server ......bla..bla... xServer.LoginSecure = True
6
by: Peter Theill | last post by:
I'm having this query: SELECT ss.subscription_id AS SubscriptionId, s.id AS ScopeId, s. AS ScopeName, s.base AS ScopeBase, dbo.iqGetShapesByScopeAsString(s.id) AS ShapesAsString FROM
1
by: Ken Adeniji | last post by:
SELECT @@Version Microsoft SQL Server 2005 - 9.00.1314.06 (Intel X86) Sep 2 2005 21:10:31 Copyright (c) 1988-2005 Microsoft Corporation Express Edition on Windows NT 5.2 (Build 3790: Service...
4
by: John | last post by:
Hi vb2005/sqlserver2005. I have a stored procedure that accepts three optional parameters. If I run the following it returns the data fine; DECLARE @return_value int EXEC @return_value = ....
3
by: Jesse Liberty | last post by:
I created a new database (tried both in 2005 and in SQL 2000) and then created a SqlDataSource control in an asp.net application. Clicked on the smart tag and whose configure data source. When I...
2
by: Karl | last post by:
Hi All, I am working my way through the Personal Web Starter Kit from Microsoft and understand how the storing of images in a database works, but I was wondering if anyone could shed any light...
7
by: Rich | last post by:
Hello, I have an SP that inserts data into a sqlserver table. If a condition is not met within the SP after the data has been inserted into the table, the SP will rollback the insert. If I...
0
by: mentor | last post by:
I'm trying setting up a site similar to eshop. There may be 1 million items in sqlserver2005. In order to search some products, user may input some words to search product name and description...
1
by: ssknov | last post by:
hi i had created as SP to delete the record using where condtn.if the record doesnt exists the SP will throw an error as "No such record found" and return 0 . But my c# code gets -1 rows...
16
Dököll
by: Dököll | last post by:
Hey Gang! I just ran through a wonderful Microsoft video for VS 2005 Web Dev and SQL 2005 Express. Data added to SQL .mdf file through VS web site... How does one query the data in the SQL...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.