Need to look into a little further SQL Statement Building

Also check out aliasing parameters and what they are returned as by the ending select *

Check out the WITH statement within SQL Server

WITH BPOrderedStores AS ( SELECT TOP 100 PERCENT ROW_NUMBER() OVER (ORDER BY [Name]) As [RowNumber], Name, LocationNo, Street, Town, State, Postcode, Phone, Unlead, PremiumUnlead, BPUltimate, E10, Diesel, Any_Autogas, Hours_24, Trailers, LPGBottle, Toilets, CarWash, CleanGo, SuperWash, Other, Pay, EFTPOS, BIORewards, ATM, Restaurant, TruckStops, Express FROM BP_AustLocator WHERE State =’NSW’ ORDER BY [Name] ) SELECT * FROM BPOrderedStores WHERE RowNumber BETWEEN 1 AND 500

Leave a Reply

Your email address will not be published. Required fields are marked *