Advertisement
Guest User

Untitled

a guest
May 13th, 2014
210
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 17.49 KB | None | 0 0
  1. SELECT TOP (90)
  2.     [Project1].[Id] AS [Id],
  3.     [Project1].[ExternalId] AS [ExternalId],
  4.     [Project1].[SkuAvailability] AS [SkuAvailability],
  5.     [Project1].[Colour] AS [Colour],
  6.     [Project1].[SIZE] AS [SIZE],
  7.     [Project1].[GenderId] AS [GenderId],
  8.     [Project1].[ManufacturerId] AS [ManufacturerId],
  9.     [Project1].[ProductTypeId] AS [ProductTypeId],
  10.     [Project1].[ParentGroupedProductId] AS [ParentGroupedProductId],
  11.     [Project1].[VisibleIndividually] AS [VisibleIndividually],
  12.     [Project1].[Name] AS [Name],
  13.     [Project1].[ShortDescription] AS [ShortDescription],
  14.     [Project1].[FullDescription] AS [FullDescription],
  15.     [Project1].[AdminComment] AS [AdminComment],
  16.     [Project1].[ProductTemplateId] AS [ProductTemplateId],
  17.     [Project1].[VendorId] AS [VendorId],
  18.     [Project1].[ShowOnHomePage] AS [ShowOnHomePage],
  19.     [Project1].[MetaKeywords] AS [MetaKeywords],
  20.     [Project1].[MetaDescription] AS [MetaDescription],
  21.     [Project1].[MetaTitle] AS [MetaTitle],
  22.     [Project1].[AllowCustomerReviews] AS [AllowCustomerReviews],
  23.     [Project1].[ApprovedRatingSum] AS [ApprovedRatingSum],
  24.     [Project1].[NotApprovedRatingSum] AS [NotApprovedRatingSum],
  25.     [Project1].[ApprovedTotalReviews] AS [ApprovedTotalReviews],
  26.     [Project1].[NotApprovedTotalReviews] AS [NotApprovedTotalReviews],
  27.     [Project1].[SubjectToAcl] AS [SubjectToAcl],
  28.     [Project1].[LimitedToStores] AS [LimitedToStores],
  29.     [Project1].[Sku] AS [Sku],
  30.     [Project1].[ManufacturerPartNumber] AS [ManufacturerPartNumber],
  31.     [Project1].[Gtin] AS [Gtin],
  32.     [Project1].[IsGiftCard] AS [IsGiftCard],
  33.     [Project1].[GiftCardTypeId] AS [GiftCardTypeId],
  34.     [Project1].[RequireOtherProducts] AS [RequireOtherProducts],
  35.     [Project1].[RequiredProductIds] AS [RequiredProductIds],
  36.     [Project1].[AutomaticallyAddRequiredProducts] AS [AutomaticallyAddRequiredProducts],
  37.     [Project1].[IsDownload] AS [IsDownload],
  38.     [Project1].[DownloadId] AS [DownloadId],
  39.     [Project1].[UnlimitedDownloads] AS [UnlimitedDownloads],
  40.     [Project1].[MaxNumberOfDownloads] AS [MaxNumberOfDownloads],
  41.     [Project1].[DownloadExpirationDays] AS [DownloadExpirationDays],
  42.     [Project1].[DownloadActivationTypeId] AS [DownloadActivationTypeId],
  43.     [Project1].[HasSampleDownload] AS [HasSampleDownload],
  44.     [Project1].[SampleDownloadId] AS [SampleDownloadId],
  45.     [Project1].[HasUserAgreement] AS [HasUserAgreement],
  46.     [Project1].[UserAgreementText] AS [UserAgreementText],
  47.     [Project1].[IsRecurring] AS [IsRecurring],
  48.     [Project1].[RecurringCycleLength] AS [RecurringCycleLength],
  49.     [Project1].[RecurringCyclePeriodId] AS [RecurringCyclePeriodId],
  50.     [Project1].[RecurringTotalCycles] AS [RecurringTotalCycles],
  51.     [Project1].[IsShipEnabled] AS [IsShipEnabled],
  52.     [Project1].[IsFreeShipping] AS [IsFreeShipping],
  53.     [Project1].[AdditionalShippingCharge] AS [AdditionalShippingCharge],
  54.     [Project1].[DeliveryDateId] AS [DeliveryDateId],
  55.     [Project1].[WarehouseId] AS [WarehouseId],
  56.     [Project1].[IsTaxExempt] AS [IsTaxExempt],
  57.     [Project1].[TaxCategoryId] AS [TaxCategoryId],
  58.     [Project1].[ManageInventoryMethodId] AS [ManageInventoryMethodId],
  59.     [Project1].[StockQuantity] AS [StockQuantity],
  60.     [Project1].[DisplayStockAvailability] AS [DisplayStockAvailability],
  61.     [Project1].[DisplayStockQuantity] AS [DisplayStockQuantity],
  62.     [Project1].[MinStockQuantity] AS [MinStockQuantity],
  63.     [Project1].[LowStockActivityId] AS [LowStockActivityId],
  64.     [Project1].[NotifyAdminForQuantityBelow] AS [NotifyAdminForQuantityBelow],
  65.     [Project1].[BackorderModeId] AS [BackorderModeId],
  66.     [Project1].[AllowBackInStockSubscriptions] AS [AllowBackInStockSubscriptions],
  67.     [Project1].[OrderMinimumQuantity] AS [OrderMinimumQuantity],
  68.     [Project1].[OrderMaximumQuantity] AS [OrderMaximumQuantity],
  69.     [Project1].[AllowedQuantities] AS [AllowedQuantities],
  70.     [Project1].[AllowAddingOnlyExistingAttributeCombinations] AS [AllowAddingOnlyExistingAttributeCombinations],
  71.     [Project1].[DisableBuyButton] AS [DisableBuyButton],
  72.     [Project1].[DisableWishlistButton] AS [DisableWishlistButton],
  73.     [Project1].[AvailableForPreOrder] AS [AvailableForPreOrder],
  74.     [Project1].[PreOrderAvailabilityStartDateTimeUtc] AS [PreOrderAvailabilityStartDateTimeUtc],
  75.     [Project1].[CallForPrice] AS [CallForPrice],
  76.     [Project1].[Price] AS [Price],
  77.     [Project1].[RRP] AS [RRP],
  78.     [Project1].[ProductCost] AS [ProductCost],
  79.     [Project1].[FromPrice] AS [FromPrice],
  80.     [Project1].[ToPrice] AS [ToPrice],
  81.     [Project1].[FromRRP] AS [FromRRP],
  82.     [Project1].[DiscountPercentage] AS [DiscountPercentage],
  83.     [Project1].[SpecialPrice] AS [SpecialPrice],
  84.     [Project1].[SpecialPriceStartDateTimeUtc] AS [SpecialPriceStartDateTimeUtc],
  85.     [Project1].[SpecialPriceEndDateTimeUtc] AS [SpecialPriceEndDateTimeUtc],
  86.     [Project1].[CustomerEntersPrice] AS [CustomerEntersPrice],
  87.     [Project1].[MinimumCustomerEnteredPrice] AS [MinimumCustomerEnteredPrice],
  88.     [Project1].[MaximumCustomerEnteredPrice] AS [MaximumCustomerEnteredPrice],
  89.     [Project1].[HasTierPrices] AS [HasTierPrices],
  90.     [Project1].[HasDiscountsApplied] AS [HasDiscountsApplied],
  91.     [Project1].[Weight] AS [Weight],
  92.     [Project1].[LENGTH] AS [LENGTH],
  93.     [Project1].[Width] AS [Width],
  94.     [Project1].[Height] AS [Height],
  95.     [Project1].[AvailableStartDateTimeUtc] AS [AvailableStartDateTimeUtc],
  96.     [Project1].[AvailableEndDateTimeUtc] AS [AvailableEndDateTimeUtc],
  97.     [Project1].[DisplayOrder] AS [DisplayOrder],
  98.     [Project1].[Published] AS [Published],
  99.     [Project1].[Deleted] AS [Deleted],
  100.     [Project1].[CreatedOnUtc] AS [CreatedOnUtc],
  101.     [Project1].[UpdatedOnUtc] AS [UpdatedOnUtc]
  102.     FROM ( SELECT [Project1].[Id] AS [Id], [Project1].[ExternalId] AS [ExternalId], [Project1].[SkuAvailability] AS [SkuAvailability], [Project1].[Colour] AS [Colour], [Project1].[SIZE] AS [SIZE], [Project1].[GenderId] AS [GenderId], [Project1].[ManufacturerId] AS [ManufacturerId], [Project1].[ProductTypeId] AS [ProductTypeId], [Project1].[ParentGroupedProductId] AS [ParentGroupedProductId], [Project1].[VisibleIndividually] AS [VisibleIndividually], [Project1].[Name] AS [Name], [Project1].[ShortDescription] AS [ShortDescription], [Project1].[FullDescription] AS [FullDescription], [Project1].[AdminComment] AS [AdminComment], [Project1].[ProductTemplateId] AS [ProductTemplateId], [Project1].[VendorId] AS [VendorId], [Project1].[ShowOnHomePage] AS [ShowOnHomePage], [Project1].[MetaKeywords] AS [MetaKeywords], [Project1].[MetaDescription] AS [MetaDescription], [Project1].[MetaTitle] AS [MetaTitle], [Project1].[AllowCustomerReviews] AS [AllowCustomerReviews], [Project1].[ApprovedRatingSum] AS [ApprovedRatingSum], [Project1].[NotApprovedRatingSum] AS [NotApprovedRatingSum], [Project1].[ApprovedTotalReviews] AS [ApprovedTotalReviews], [Project1].[NotApprovedTotalReviews] AS [NotApprovedTotalReviews], [Project1].[SubjectToAcl] AS [SubjectToAcl], [Project1].[LimitedToStores] AS [LimitedToStores], [Project1].[Sku] AS [Sku], [Project1].[ManufacturerPartNumber] AS [ManufacturerPartNumber], [Project1].[Gtin] AS [Gtin], [Project1].[IsGiftCard] AS [IsGiftCard], [Project1].[GiftCardTypeId] AS [GiftCardTypeId], [Project1].[RequireOtherProducts] AS [RequireOtherProducts], [Project1].[RequiredProductIds] AS [RequiredProductIds], [Project1].[AutomaticallyAddRequiredProducts] AS [AutomaticallyAddRequiredProducts], [Project1].[IsDownload] AS [IsDownload], [Project1].[DownloadId] AS [DownloadId], [Project1].[UnlimitedDownloads] AS [UnlimitedDownloads], [Project1].[MaxNumberOfDownloads] AS [MaxNumberOfDownloads], [Project1].[DownloadExpirationDays] AS [DownloadExpirationDays], [Project1].[DownloadActivationTypeId] AS [DownloadActivationTypeId], [Project1].[HasSampleDownload] AS [HasSampleDownload], [Project1].[SampleDownloadId] AS [SampleDownloadId], [Project1].[HasUserAgreement] AS [HasUserAgreement], [Project1].[UserAgreementText] AS [UserAgreementText], [Project1].[IsRecurring] AS [IsRecurring], [Project1].[RecurringCycleLength] AS [RecurringCycleLength], [Project1].[RecurringCyclePeriodId] AS [RecurringCyclePeriodId], [Project1].[RecurringTotalCycles] AS [RecurringTotalCycles], [Project1].[IsShipEnabled] AS [IsShipEnabled], [Project1].[IsFreeShipping] AS [IsFreeShipping], [Project1].[AdditionalShippingCharge] AS [AdditionalShippingCharge], [Project1].[DeliveryDateId] AS [DeliveryDateId], [Project1].[WarehouseId] AS [WarehouseId], [Project1].[IsTaxExempt] AS [IsTaxExempt], [Project1].[TaxCategoryId] AS [TaxCategoryId], [Project1].[ManageInventoryMethodId] AS [ManageInventoryMethodId], [Project1].[StockQuantity] AS [StockQuantity], [Project1].[DisplayStockAvailability] AS [DisplayStockAvailability], [Project1].[DisplayStockQuantity] AS [DisplayStockQuantity], [Project1].[MinStockQuantity] AS [MinStockQuantity], [Project1].[LowStockActivityId] AS [LowStockActivityId], [Project1].[NotifyAdminForQuantityBelow] AS [NotifyAdminForQuantityBelow], [Project1].[BackorderModeId] AS [BackorderModeId], [Project1].[AllowBackInStockSubscriptions] AS [AllowBackInStockSubscriptions], [Project1].[OrderMinimumQuantity] AS [OrderMinimumQuantity], [Project1].[OrderMaximumQuantity] AS [OrderMaximumQuantity], [Project1].[AllowedQuantities] AS [AllowedQuantities], [Project1].[AllowAddingOnlyExistingAttributeCombinations] AS [AllowAddingOnlyExistingAttributeCombinations], [Project1].[DisableBuyButton] AS [DisableBuyButton], [Project1].[DisableWishlistButton] AS [DisableWishlistButton], [Project1].[AvailableForPreOrder] AS [AvailableForPreOrder], [Project1].[PreOrderAvailabilityStartDateTimeUtc] AS [PreOrderAvailabilityStartDateTimeUtc], [Project1].[CallForPrice] AS [CallForPrice], [Project1].[Price] AS [Price], [Project1].[RRP] AS [RRP], [Project1].[ProductCost] AS [ProductCost], [Project1].[FromPrice] AS [FromPrice], [Project1].[ToPrice] AS [ToPrice], [Project1].[FromRRP] AS [FromRRP], [Project1].[DiscountPercentage] AS [DiscountPercentage], [Project1].[SpecialPrice] AS [SpecialPrice], [Project1].[SpecialPriceStartDateTimeUtc] AS [SpecialPriceStartDateTimeUtc], [Project1].[SpecialPriceEndDateTimeUtc] AS [SpecialPriceEndDateTimeUtc], [Project1].[CustomerEntersPrice] AS [CustomerEntersPrice], [Project1].[MinimumCustomerEnteredPrice] AS [MinimumCustomerEnteredPrice], [Project1].[MaximumCustomerEnteredPrice] AS [MaximumCustomerEnteredPrice], [Project1].[HasTierPrices] AS [HasTierPrices], [Project1].[HasDiscountsApplied] AS [HasDiscountsApplied], [Project1].[Weight] AS [Weight], [Project1].[LENGTH] AS [LENGTH], [Project1].[Width] AS [Width], [Project1].[Height] AS [Height], [Project1].[AvailableStartDateTimeUtc] AS [AvailableStartDateTimeUtc], [Project1].[AvailableEndDateTimeUtc] AS [AvailableEndDateTimeUtc], [Project1].[DisplayOrder] AS [DisplayOrder], [Project1].[Published] AS [Published], [Project1].[Deleted] AS [Deleted], [Project1].[CreatedOnUtc] AS [CreatedOnUtc], [Project1].[UpdatedOnUtc] AS [UpdatedOnUtc], ROW_NUMBER() OVER (ORDER BY [Project1].[Name] DESC) AS [ROW_NUMBER]
  103.         FROM ( SELECT
  104.             [Extent1].[Id] AS [Id],
  105.             [Extent1].[ExternalId] AS [ExternalId],
  106.             [Extent1].[SkuAvailability] AS [SkuAvailability],
  107.             [Extent1].[Colour] AS [Colour],
  108.             [Extent1].[SIZE] AS [SIZE],
  109.             [Extent1].[GenderId] AS [GenderId],
  110.             [Extent1].[ManufacturerId] AS [ManufacturerId],
  111.             [Extent1].[ProductTypeId] AS [ProductTypeId],
  112.             [Extent1].[ParentGroupedProductId] AS [ParentGroupedProductId],
  113.             [Extent1].[VisibleIndividually] AS [VisibleIndividually],
  114.             [Extent1].[Name] AS [Name],
  115.             [Extent1].[ShortDescription] AS [ShortDescription],
  116.             [Extent1].[FullDescription] AS [FullDescription],
  117.             [Extent1].[AdminComment] AS [AdminComment],
  118.             [Extent1].[ProductTemplateId] AS [ProductTemplateId],
  119.             [Extent1].[VendorId] AS [VendorId],
  120.             [Extent1].[ShowOnHomePage] AS [ShowOnHomePage],
  121.             [Extent1].[MetaKeywords] AS [MetaKeywords],
  122.             [Extent1].[MetaDescription] AS [MetaDescription],
  123.             [Extent1].[MetaTitle] AS [MetaTitle],
  124.             [Extent1].[AllowCustomerReviews] AS [AllowCustomerReviews],
  125.             [Extent1].[ApprovedRatingSum] AS [ApprovedRatingSum],
  126.             [Extent1].[NotApprovedRatingSum] AS [NotApprovedRatingSum],
  127.             [Extent1].[ApprovedTotalReviews] AS [ApprovedTotalReviews],
  128.             [Extent1].[NotApprovedTotalReviews] AS [NotApprovedTotalReviews],
  129.             [Extent1].[SubjectToAcl] AS [SubjectToAcl],
  130.             [Extent1].[LimitedToStores] AS [LimitedToStores],
  131.             [Extent1].[Sku] AS [Sku],
  132.             [Extent1].[ManufacturerPartNumber] AS [ManufacturerPartNumber],
  133.             [Extent1].[Gtin] AS [Gtin],
  134.             [Extent1].[IsGiftCard] AS [IsGiftCard],
  135.             [Extent1].[GiftCardTypeId] AS [GiftCardTypeId],
  136.             [Extent1].[RequireOtherProducts] AS [RequireOtherProducts],
  137.             [Extent1].[RequiredProductIds] AS [RequiredProductIds],
  138.             [Extent1].[AutomaticallyAddRequiredProducts] AS [AutomaticallyAddRequiredProducts],
  139.             [Extent1].[IsDownload] AS [IsDownload],
  140.             [Extent1].[DownloadId] AS [DownloadId],
  141.             [Extent1].[UnlimitedDownloads] AS [UnlimitedDownloads],
  142.             [Extent1].[MaxNumberOfDownloads] AS [MaxNumberOfDownloads],
  143.             [Extent1].[DownloadExpirationDays] AS [DownloadExpirationDays],
  144.             [Extent1].[DownloadActivationTypeId] AS [DownloadActivationTypeId],
  145.             [Extent1].[HasSampleDownload] AS [HasSampleDownload],
  146.             [Extent1].[SampleDownloadId] AS [SampleDownloadId],
  147.             [Extent1].[HasUserAgreement] AS [HasUserAgreement],
  148.             [Extent1].[UserAgreementText] AS [UserAgreementText],
  149.             [Extent1].[IsRecurring] AS [IsRecurring],
  150.             [Extent1].[RecurringCycleLength] AS [RecurringCycleLength],
  151.             [Extent1].[RecurringCyclePeriodId] AS [RecurringCyclePeriodId],
  152.             [Extent1].[RecurringTotalCycles] AS [RecurringTotalCycles],
  153.             [Extent1].[IsShipEnabled] AS [IsShipEnabled],
  154.             [Extent1].[IsFreeShipping] AS [IsFreeShipping],
  155.             [Extent1].[AdditionalShippingCharge] AS [AdditionalShippingCharge],
  156.             [Extent1].[DeliveryDateId] AS [DeliveryDateId],
  157.             [Extent1].[WarehouseId] AS [WarehouseId],
  158.             [Extent1].[IsTaxExempt] AS [IsTaxExempt],
  159.             [Extent1].[TaxCategoryId] AS [TaxCategoryId],
  160.             [Extent1].[ManageInventoryMethodId] AS [ManageInventoryMethodId],
  161.             [Extent1].[StockQuantity] AS [StockQuantity],
  162.             [Extent1].[DisplayStockAvailability] AS [DisplayStockAvailability],
  163.             [Extent1].[DisplayStockQuantity] AS [DisplayStockQuantity],
  164.             [Extent1].[MinStockQuantity] AS [MinStockQuantity],
  165.             [Extent1].[LowStockActivityId] AS [LowStockActivityId],
  166.             [Extent1].[NotifyAdminForQuantityBelow] AS [NotifyAdminForQuantityBelow],
  167.             [Extent1].[BackorderModeId] AS [BackorderModeId],
  168.             [Extent1].[AllowBackInStockSubscriptions] AS [AllowBackInStockSubscriptions],
  169.             [Extent1].[OrderMinimumQuantity] AS [OrderMinimumQuantity],
  170.             [Extent1].[OrderMaximumQuantity] AS [OrderMaximumQuantity],
  171.             [Extent1].[AllowedQuantities] AS [AllowedQuantities],
  172.             [Extent1].[AllowAddingOnlyExistingAttributeCombinations] AS [AllowAddingOnlyExistingAttributeCombinations],
  173.             [Extent1].[DisableBuyButton] AS [DisableBuyButton],
  174.             [Extent1].[DisableWishlistButton] AS [DisableWishlistButton],
  175.             [Extent1].[AvailableForPreOrder] AS [AvailableForPreOrder],
  176.             [Extent1].[PreOrderAvailabilityStartDateTimeUtc] AS [PreOrderAvailabilityStartDateTimeUtc],
  177.             [Extent1].[CallForPrice] AS [CallForPrice],
  178.             [Extent1].[Price] AS [Price],
  179.             [Extent1].[RRP] AS [RRP],
  180.             [Extent1].[ProductCost] AS [ProductCost],
  181.             [Extent1].[FromPrice] AS [FromPrice],
  182.             [Extent1].[ToPrice] AS [ToPrice],
  183.             [Extent1].[FromRRP] AS [FromRRP],
  184.             [Extent1].[DiscountPercentage] AS [DiscountPercentage],
  185.             [Extent1].[SpecialPrice] AS [SpecialPrice],
  186.             [Extent1].[SpecialPriceStartDateTimeUtc] AS [SpecialPriceStartDateTimeUtc],
  187.             [Extent1].[SpecialPriceEndDateTimeUtc] AS [SpecialPriceEndDateTimeUtc],
  188.             [Extent1].[CustomerEntersPrice] AS [CustomerEntersPrice],
  189.             [Extent1].[MinimumCustomerEnteredPrice] AS [MinimumCustomerEnteredPrice],
  190.             [Extent1].[MaximumCustomerEnteredPrice] AS [MaximumCustomerEnteredPrice],
  191.             [Extent1].[HasTierPrices] AS [HasTierPrices],
  192.             [Extent1].[HasDiscountsApplied] AS [HasDiscountsApplied],
  193.             [Extent1].[Weight] AS [Weight],
  194.             [Extent1].[LENGTH] AS [LENGTH],
  195.             [Extent1].[Width] AS [Width],
  196.             [Extent1].[Height] AS [Height],
  197.             [Extent1].[AvailableStartDateTimeUtc] AS [AvailableStartDateTimeUtc],
  198.             [Extent1].[AvailableEndDateTimeUtc] AS [AvailableEndDateTimeUtc],
  199.             [Extent1].[DisplayOrder] AS [DisplayOrder],
  200.             [Extent1].[Published] AS [Published],
  201.             [Extent1].[Deleted] AS [Deleted],
  202.             [Extent1].[CreatedOnUtc] AS [CreatedOnUtc],
  203.             [Extent1].[UpdatedOnUtc] AS [UpdatedOnUtc]
  204.             FROM  [dbo].[Product] AS [Extent1]
  205.             INNER JOIN [dbo].[Product_Category_Mapping] AS [Extent2] ON [Extent1].[Id] = [Extent2].[ProductId]
  206.             WHERE [Extent2].[CategoryId] = 1 /* @p__linq__0 */
  207.         )  AS [Project1]
  208.     )  AS [Project1]
  209.     WHERE [Project1].[ROW_NUMBER] > 0
  210.     ORDER BY [Project1].[Name] DESC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement