Group By Customer And Item Higher Sale Price?

Mar 5, 2015

I'm developing and sql 2008 view that shows me the last month of sales of every customer and every item sold, the problem is that I need group by customer with the higher Sale Price of every item of the customer, example:

1.If We sold the same item to one customer then it must show just the higher sale price of every item

2.If the same item was sold to the same customer at the same price then it must show just the last sold date record of that item

This is I get :

OrderDate |DebNr|DebName|ItemCode|Descript|Qty|CostPrice|SalePrice|
2015-03-05|0001 |Deb0001|Item-001|Item 001| 3 | 223.10 | 289.00 |
2015-02-25|0001 |Deb0001|Item-001|Item 001| 2 | 220.00 | 286.00 |
2015-03-05|0001 |Deb0001|Item-002|Item 002| 1 | 75.00 | 110.00 |
2015-03-02|0002 |Deb0002|Item-001|Item 001| 1 | 218.00 | 265.00 |
2015-02-27|0002 |Deb0002|Item-001|Item 001| 1 | 218.00 | 265.00 |

This is I need :

OrderDate |DebNr|DebName|ItemCode|Descript|Qty|CostPrice|SalePrice|
2015-03-05|0001 |Deb0001|Item-001|Item 001| 3 | 223.10 | 289.00 |
2015-03-05|0001 |Deb0001|Item-002|Item 002| 1 | 75.00 | 110.00 |
2015-03-02|0002 |Deb0002|Item-001|Item 001| 1 | 218.00 | 265.00 |

This is my code :

SELECT TOP (100) PERCENT OrderDate, DebtorNr, DebtorName, ItemCode, Description, Qty, CostPrice, SalePrice
FROM dbo.VK_SALE_ORDERS
WHERE (OrderDate >= DATEADD(MM, - 1, GETDATE()))
ORDER BY DebtorNr, ItemCode

View 2 Replies


ADVERTISEMENT

Transact SQL :: Query To Compare Current Price With That Of Previous Value Of Item

Nov 18, 2015

There are two tables testmaster and testdetail. If the value of Price for a particular ID in testdetail is more than the threshold value defined in testmaster, the output should have a new column with value as 'High Value', if the value is less than the threshold the new output should be 'Low Value' other wise 'Ignore'

Example: for ID=3, threshold is defined as 40% in testmaster table, but on 11/12/2015 the new price is 100 which 100% more than the previous value, so the status is High Value as shown below.

ID Date
Price Status
1 11/12/2015 100 Low Value

2 11/12/2015 160 Ignore
3 11/12/2015 100 High Value

create table testmaster
(
ID int,
Threshold int
)
create table testdetail
(
ID int,
Date varchar(20),
Price float
)

[Code] ...

View 15 Replies View Related

GROUP BY Min Price BUT Return Primary Key Of Row

Oct 24, 2013

I have a table with multiple products from different suppliers. there will duplicate products in my db as Supplier A may stock the same product as Supplier B. I have a business rule that only one unique product can be online at one time and as such I want the cheapest product from the 2 Suppliers to be displayed where there is a match.

I have been trying a Group By clause and also a partition by but my problem is returning the primary key for the winning row (minimum price).

here is an example

CREATE TABLE #TempTable(
productcode nvarchar(50),
productname varchar(50),
productmanufacturer varchar(50),
saleprice money,
tyrewidth varchar(5),

[Code] ....

How can I return the productcode in the above query for the row with the cheapest price? If I try MIN(productcode) or MAX(productcode) it will not always return the product code associated to the min price.

View 5 Replies View Related

Matrix - Centering Higher Level Column Group Values In Viewing Area Instead Of Entire Cell Band Width

Dec 28, 2007

I have 2 higher level column groupings of month name and year above my actual date groups. It looks a little weird aligning them left but there is no guarantee that centering them will even allow them to show until I've scrolled right to the middle of the cell width that they occupy.

Is there a feature that comes with, or a well known trick for making them center in the area that is being viewed instead of the potentially very wide cell that they occupy?

View 4 Replies View Related

Select Price For A Product Based On Price Break?

Dec 12, 2014

I have to add the unit price on the order acknowledgement for products on our shelf.

Each product has different price breaks stored in a table called MaterialUnitCost.

I don't know how to pull the correct price based on the order quantity.

Let's say the customer orders 200 pieces,

I sell 1 pcs @ $20
50 pcs @$15
200 pcs @$10.

My order acknowledgement should pull a unit price of $10, but it pulls $20 instead, because in my select statement I have

select materialunitcost.unitcost.

I thought I should do a loop or use the row_number function, but I am new to SQL, and I never used any of these two.

View 1 Replies View Related

Last Item In A Group Footer?

Apr 14, 2008

Is there any way to know you're at the last row in a group footer? I'd like to just hide all other rows except that one...

Thanks,
Steve

View 3 Replies View Related

Reporting Services :: Sum Unique Item On Group

Jul 26, 2015

I want a sum of the rows I have but only the unique items, for example

Client Name            Amount
Client 1                   $10
Client 2                   $20
Client 2                   $20
Client 3                   $30
Client 4                   $40
Client 4                   $40
Client 4                   $40

I want the sum of this to be Client 1 + Client 2 + Client 3 + Client 4 which is $100. But if I just do a sum it adds up each row. I also have them grouped together, so when it's shown, I only seen one of each item, but a sum still grabs all the duplicates.How can I go about getting the unique sum

View 6 Replies View Related

Transact SQL :: Group By On A Transaction At Line Item Level?

May 20, 2015

I need to group by transactions at line item level. As the each item in the transaction may belong to different category and I'musing case statement to identify particular category for one column , I'm using sub-query to retrieve the results at item level.

Here is the code:

SELECT
fs.TransactionId
,fs.DateKey
,dc.FirstName
,dc.LastName
,dc.Company 

[code]....

Due to case by statement and having multiple category I have to use multiple group by.

select TransactionId
,DateKey
,FirstName
,LastName
,Company
,City
,Sum(CategoryAPurchase) CategoryAPurchase

[code]....

View 5 Replies View Related

Reporting Services :: SSRS Record Counts For Group Item

Aug 11, 2015

I have a table where I am grouping on one field and would like an individual (separate) count of values from another field of same table.  So for example, I have following data:

instance_id,  area,        values
101              North       1
102              North       2
103             East          2
104             East          2

I would like to report on Area, and count of rows with different Values types, for example:

Area                            Value - 1,    Value - 2,  Value - 3
North                                 1               1              0
East                                   0             2                0

I am not sure what the technical term is for such report, but I can group by Area column, and but its aggregating counts on different Value types that I am having difficulty in performing in SSRS.

View 2 Replies View Related

Price X Quantity - Total Price

Jun 19, 2000

I am developing basket and need a simple way to get price x quantity + total price.

I get back a recordset which has a varying number of items, each item has a price and quantity. Using
SELECT ((productprice)*(productquantity)) AS subtotal, product name, productid

I don't know how to add all subtotals to get a total, I have tried putting in SUM but but cant get it to work.

Any help would be well appreciated.

View 1 Replies View Related

Create A Query Where Semi Item Materials Are Also Listed In Finished Item Recipe?

Dec 6, 2013

I have a BOM table with all finished item receipes and semi items recipes. create a query where semi item materials are also listed in finished item recipe.

View 5 Replies View Related

Updating Price Column Based On Another Price Column?

Aug 13, 2013

My dataset looks like this:

IDBuyDotComPriceCompanyIDShadowOf
AB CIRCLE PRO199.99203
AB CIRCLE PRO-b2199.99203AB CIRCLE PRO
AB CIRCLE PRO-TB249.99344AB CIRCLE PRO
AB CIRCLE PRO-TB-S10344AB CIRCLE PRO

I need to update the price of an item where the CompanyID is 344 and the ShadowOf is not null. The value in ShadowOf is the same as the ID that I want to get the BuyDotComPrice for. It should be simple, but I keep getting errors.

I use Microsoft SQL 2008

View 1 Replies View Related

For Each Cust, Show Highest Sale

Apr 1, 2008

I haven't done any SQL in a while. Having trouble getting me head around this one.

I have a table Sales:
(Transaction_ID int, Customer_ID, Sales_DateTime Time, Sales_Amt Dollar)

I need a query that returns:
For each Customer_ID that has made a purchase
Show the highest dollar Sales_Amt they have ever made

In C++ I would probably do a recursive solution, is this doable? advisable? in T-SQL?

View 3 Replies View Related

Dividing The Sale Amount By Month

Jul 3, 2006

Hello,

I want to process a row from a source table by dividing the sales amount in that row over the period of the sale by month.

For instance if an item is sold for 500$ and it's duration is 5 months from 1/15/2004 till 6/15/2004, I want to divide the sale amount by month as follows:

Month 1: 50$

Month 2: 100$

Month 3: 100$

Month 4: 100$

Month 5: 100$

Month 6: 50$

I know I can create a script component and do the calculation for each month and insert 6 records in the fact table for each row in the source table, where each record holds the amount for the corresponding month. However I was wondering if there is another technique that utilizes the components of SSIS to do it more efficiently.

Thanks,

Grace

View 4 Replies View Related

Help, Running A Control Flow Item Does Not Kick Off The Next Item

Mar 6, 2007

Hi,

Here's my problem. I have 2 tasks defined in my Control Flow tab:

EXECUTE SQL--------->EXECUTE DTS 2000 PACKAGE

When I attempt to run it, by right-clicking the EXECUTE SQL task, and selecting "Execute Task", it only runs the EXECUTE SQL part (successfully), and does not "kick off" the EXECUTE DTS 2000 PACKAGE, after it is done running (even though it completes successfully, as shown by the green box).

Yes, they are connected by a dark green arrow, as indicated in my diagram above.

Why is this?? Am I missing something here? Need help.

THANKS

View 3 Replies View Related

How To Select The Last Identical Item# Until A Different Item# In The Table

Jul 12, 2007

Hello,Basically, I have a table with 2 fieldsId     item#1      33332      33333      22224      22225      22226      33337      33338      3333I would like to only select the last identical Item# which in this case would be  the id 6,7 and 8Any idea how could I do that?Thanks

View 1 Replies View Related

How Can I Create A New Custom Report Item? The Report Item Is Extends Matrix.

Jan 18, 2007

hi everyone

what the matrix's class name ?

where is the matrix's dll?

Can i create a new class extends the matrix?

I want to override the matrix's onpaint method.

Can i do this ?

why the table not have the column group?













View 9 Replies View Related

TOUGH INSERT: Copy Sale Record/Line Items For Duplicate Record

Jul 20, 2005

I have a client who needs to copy an existing sale. The problem isthe Sale is made up of three tables: Sale, SaleEquipment, SaleParts.Each sale can have multiple pieces of equipment with correspondingparts, or parts without equipment. My problem in copying is when I goto copy the parts, how do I get the NEW sale equipment ids updatedcorrectly on their corresponding parts?I can provide more information if necessary.Thank you!!Maria

View 6 Replies View Related

Why Would My Int Primary Key Jump To Higher Number

Apr 19, 2008

Why would my int identity primary key column go from one day being 847 and the next number being inserted to 49048?

View 2 Replies View Related

Higher CPU Utilization With SQL Server 2005

Jan 16, 2007

HI
I am facing a strange problem with SQL Server 2005 . The CPU utilization with SQL Server 2005 is higer by about 70% comapared to SQL 2000.

In the same kind of Hardware and with the DB server up , I performed the following tests
Declare @i int
Set @i = 10
While @i < 100000
Begin
Insert into arup_emp values(@i,'M',0)

Set @i = @i + 1
end


The CPU utilization average on SQL 2005 was 45% and on SQL 2K it was just 25% , I am seeing a lot of people who seems to be facing this problem but unfortunately not seeing any solution to this.

Can anyone through some light .
Please note that I have tried to also see the MAXDOP options, but get the same results.

Please help.

Thanks
Arup

View 4 Replies View Related

Update Rows With Next Higher Id, If It Exists

Jul 20, 2005

I am trying to determine the next registered session of a student so Ican calculate the number of skipped sessions.Scenario: I have a student registration summary table. One row foreach student and the student's registered session. I want to update agiven row with the next higher registered session (into a field callednext_registered_session_skey if the row exists). I can then use thediff of the skeys to determine how many sessions the student skippedfor each registration period.Example: Student X registers each fall for one session for 4 years.The file might look like:STUDENT_ID SESSION_ID SESSION_SKEYNEXT_REGISTRED_SESSION_SKEY123456789 200201 100null123456789 200301 104null123456789 200401 108null123456789 200501 112nullI need to update the NEXT_REGISTRED_SESSION_SKEY so I end up with:STUDENT_ID SESSION_ID SESSION_SKEYNEXT_REGISTRED_SESSION_SKEY123456789 200201 100104123456789 200301 104108123456789 200401 108112123456789 200501 112nullI can then say SESSIONS_SKIPPED = NEXT_REGISTRED_SESSION_SKEY –SESSION_KEY (logically speaking, not syntactically)This is what I have so far as example:UPDATE F_REGISTRATIONSET NEXT_REGISTERED_SESSION_SKEY = (select top 1 nextr.session_skeyfrom f_registration rinner joinf_registration nextron r.student_skey = nextr.student_skey and nextr.session_skey[color=blue]> r.session_skey[/color]order by r.session_skey desc)WHERE STUDENT_ID = '577665705';SELECT student_skey, student_id, session_id, session_skey,next_registered_session_skey, * FROM F_REGISTRATION WHERE STUDENT_ID= '577665705' order by session_skey descRESULTS:STUDENT_SKEY STUDENT_ID SESSION_ID SESSION_SKEYNEXT_REGISTERED_SESSION_SKEY125137 577665705 200404 309 311125137 577665705 200403 308 311125137 577665705 200402 307 311125137 577665705 199804 285 311125137 577665705 199803 284 311125137 577665705 199802 283 311125137 577665705 199704 281 311TIARob(I restricted with the where = ‘577665705' so I did not have to waitto update all the rows)

View 6 Replies View Related

SSIS Importing XML And Using A TAG From Higher Hierarchy

Sep 25, 2007

I want to read data from a XML into SQL Server database tables "tour" and "stop".
There is a 1:n relation between tour and stop.
(a shortened XML sample, relation Tour : Stop = 1 : n)

<Tour>
<Mandator>mein kunde</Mandator>
<TourNoPlan>TNP_1</TourNoPlan>
<TourNo>1</TourNo>
<Stop>
<StopNo>SN_1</StopNo>
<GPSGeoDec>+8.0000,+48.0000</GPSGeoDec>
</Stop>
<Stop>
<StopNo>SN_2</StopNo>
<GPSGeoDec>+8.3000,+48.5000</GPSGeoDec>
</Stop>
</Tour>

I am able to insert elements from <Tour> into the table "tour" with the data flow in the Integration Services. But I need the values from the tag <TourNoPlan> in the rows for the table stop (it is the foreign key) in the second step. How can I get the values in the SSIS from the <Tour> in the dataflow for the different <stop>? It is a hierarchicle structure - normal for a XML. Is there a sample for reading such a XML into a Database? I have tried it with [Tour::TourNoPlan] or similar, but it was wrong. Second try was setting a UserVariable in the tour dataflow to the actual value of the TourNoPlan and using it in the data flow for the stop tags - but only a setting in a script at PostExecution was possible - to late.
I think a very simple problem and the same for each XML Import. Any ideas ???

Thanks and Best regards
Wolfram

View 1 Replies View Related

How To Get The Value Of System::TaskName Of A Higher Up Level?

May 14, 2007

Hi there,

I was wondering how can I get the value of System::TaskName of a higher scope when I have a Master Package that have several sequence task, data flow tasks and execute package tasks. For each task inside this Master Package on the Post-Execute event handler I have a script task that logs the execution of each task.

After running this master package I saw in my db that I have a row for every single tasks executed in the process and not only the tasks that exist in the master package. For instance, for simplicity let's say my master package looks like this:


SQL Task Script
|
Exec Package 2
|
Exec Package 3
|
Exec Package 4

Package 2,3 and 4 have a SQL Task Script with name Execute SQL Task Package 2, Execute SQL Task Package 3, Execute SQL Task Package 4.

Here's what I got in my db:

Execute SQL Task
Execute SQL Task Package 2
Package2
Execute Package 2
Execute SQL Task Package 3
Package3
Execute Package 3
Execute SQL Task Package 4
Package4
Execute Package 4

I see two TaskName variables in the Variable window, one with OnPostExec scope and the other with Execute Package 2 for instance. I want to get the value of System::TaskName with Execute Package 2 scope.

I want to see in my db only the tasks in bold. Any ideas of how can I do this? I hope you understand what I'm trying to achieve.

Thanks!

View 4 Replies View Related

Migrate Higher Version Of MDAC

Aug 14, 2007

Hi Friends,

I have a system with windows 2000 advanced server SP4 OS. In that system, How can i upgrade MDAC version from 2.5 to 2.8 sp2.


This is use of,
I am going to install sql server 2005 express edition advanced services SP2.

Please help me, how can i upgrade higher version of MDAC?

Thanks in Advance

Rameshkumar Thirumalaisamy

View 5 Replies View Related

Transact SQL :: Establishing Unique Sales ID To Future Sales IDs From Original Sale

May 19, 2015

i am trying to find a way to link an 'initial' Sale ID of a product to 'future' Sale IDs of products that will trace back to the original Sale ID.For example, if I call the original sale , 'Sale ID #123',  how can i link future Sale ID's (child[ren]) and all future sales to the original Sale ID #123? Can I use a Surrogate Key or similar function?

Parent:Sale ID #123
Children: Sale ID # 456,
Sale ID #789,
Sale ID #.....

how I can link the original Sales ID (Parent) to Sale ID's (child[ren]) of future purchases currently existing and in the future going forward?

View 4 Replies View Related

Error:... It Requires A Higher Level Edition.

Apr 28, 2006

I've read some threads on this topic and all have been solved by installing the SSIS service. This would be fine except for the fact that I already have SSIS installed and working on the server the package is being called from.

I have several scheduled packages that work without error and a few that fail, telling me "Error: ... it requires a higher level edition." Does SSIS need to be installed on the target server as well? Do I need to do a reinstall? Please advise. Thanks.

-Matt

View 1 Replies View Related

SSIS Higher Level Edition Error When Run In A Sql Job

Dec 27, 2006

Hi,

I am receiving the following error in Sql Job agent when I try to run an SSIS package : The task "Create Excel File" cannot run on this edition of Integration Services. It requires a higher level edition. It then goes on to tell me : The Execution method succeeded, but the number of errors raised (2) reached the maximum allowed (1); resulting in failure. This occurs when the number of errors reaches the number specified in MaximumErrorCount. I have tried reseting the error count to allow for the "errors" , but it stills fails. The job suceeds in Visual Studio, but not when scheduled in Sql Management Studio. Any suggestions?

Thanks,
J.

View 18 Replies View Related

Under What Kind Of Circumstances,the LSN On The Page Is Higher Than The Actual LSN For This Log Record

Aug 16, 2007

I'm reading <inside sql server 2005torage engine> recently.

The author mentioned about " If the LSN on the page is equal to or higher than the actual LSN for this log record, SQL Server will skip the REDO operation" in chapter 5 and section 1.

As we all know,the transaction log will be written before the changes to the database are written.
So i think the the LSN on the page is equal to or lower than the actual LSN for this log record....

Any suggestions?

View 3 Replies View Related

SQL Server Admin 2014 :: Heap Table Fragmentation Is Higher Than 50

Dec 1, 2014

I have bunch of heap tables and the fragmentation seems to be high, i am not sure whether i shall add index for them, as these tables are inserted and updated every day.

View 4 Replies View Related

Finding Orders That Have At Least 1 Promo Item And 1 Non-promo Item

Oct 16, 2014

I am having trouble finishing the last bit of a report. The report shows orders that customers have placed that contain 0 promo items, All promo items (all items in order are promo items), and a mix of promo and non promo (at least 1 promo item and 1 non-promo item). Ive simplified this a bit for ease of understanding but lets assume we have 2 tables: A Promo table that contains the items on promotion and the dates that promotion is valid, and a Sales table, that contains the order number, order date, and sku ordered.

I've already written code that finds orders that have at least 1 promo item in them, and using that, I can determine what orders have 0 promo items in them. Where I am stuck is taking the orders that have at least 1 promo item in them, and separating them into orders that have only promo items, and those that have both promo and not promo items in them. Also, there are several promos throughout the year (called "Offers") so in my code below, you can see 2 different Offers ("JF" and "MA") with their corresponding dates they are valid. They will never overlap. My results also have to be split out by Offer so management can look at the results of each offer separately. Here is some code:

Code:
create table #Promos (
Offer varchar(2) null,
SKU int null,
StartDt date null,
EndDt date null

[Code] ....

So my results should show OrderNo A1111 in the Promo and No Promo group because of SKU 5 not being promotional during the time that order was placed. OrderNo A2222 should be in the Promo Only group because both SKUs on the order were promotional at the time the order was placed.

View 6 Replies View Related

Getting The Right Price

Feb 21, 2008



Hello all, I have a question. I have two tables, one called Products which is comprised of various lookup values for IDs. The sceond table is a join table where I enter through a tool that I built another series of lookup IDs for Product, Size, Color, Quantity and Price. Each product in the join table can have multiple entries because there is not one price for each product. Instead, based on the product size, color there are price breaks at certain quantities - for example if someone orders one dozen widgets then the price will be one amount, while if they order two dozen they will get a different price.

Here is an example:

Product table
ProductID ProductName Description
1 Widget This is a widget description...

ProductPrice tbl
ProductID ColorID SizeID QuantityID Price
1 1 1 1 10.00
1 1 1 2 9.50
etc....

Quantity tbl
ID Description
1 12 - or one dozen
2 24



So what I want to do is get a complete list of products with the MAX price for each product returned. This will be displayed on a page where I will have the Product Name, Description, etc and the Price will state something like 'Starting at $10.00'

Here is what I have so far but I am not getting any results....

SELECT p.ProductID,
p.ProductName,
pc.ProductCategoryName,
p.ProductImageID,
SUBSTRING(p.Description, 1, 150) + '...' AS Description,
(SELECT DISTINCT MAX(Price)
FROM ProductColorSizeQuantityPrice
WHERE ProductId = 1) AS 'Price'
FROM Products p
INNER JOIN ProductColorSizeQuantityPrice pcs
ON pcs.ProductID = p.ProductID
INNER JOIN ProductCategory pc
ON pc.ProductCategoryID = p.ProductCategoryID
The area highlighted in blue is what I am trying to do logically but this is not getting any results. If I removed this section I get all the fields I want but I need to include this price. Any ideas?

View 6 Replies View Related

Reporting Services :: Display Group Name Value Of Each Group In Column Header Outside The Group?

Sep 29, 2015

I have an SSRS 2012 table report with groups; each group is broken ie. one group for one page, and there are multiple groups in multiple pages.

'GroupName' column has multiple values - X,Y,Z,......

I need to group 'GroupName' with X,Y,Z,..... ie value X in page 1,value Y in page 2, value Z in page 3...

Now, I need to display another column (ABC) in this table report (outside the group column 'GroupName'); this outside column itself is another column header (not a group header) in the table (report) and it derives its name partly from the 'GroupName'  values:

Example:

Value X for GroupName in page 1 will mean, in page 1, column Name of ABC column must be ABC-X Value Y for GroupName in page 2 will mean, in page 2, column Name of ABC column must be ABC-Y Value Z for GroupName in page 3 will mean, in page 3, column Name of
ABC column must be ABC-Z

ie the column name of ABC (Clm ABC)  must be dynamic as per the GroupName values (X,Y,Z....)

Page1:

GroupName                 Clm ABC-X

X

Page2:

GroupName                 Clm ABC-Y

Y

Page3:

GroupName                 Clm ABC-Z

Z

I have been able to use First(ReportItems!GroupName.Value) in the Page Header to get GroupNames displayed in each page; I get X in page 1, Y in page 2, Z in page 3.....

However, when I use ReportItems (that refers to a group name) in the Report Body outside the group,

I get the following error:

Report item expressions can only refer to other report items within the same grouping scope or a containing grouping scope

I need to get the X, Y, Z ... in each page for the column ABC.

I have been able to use this - First(Fields!GroupName.Value); however, I get ABC-X, ABC-X, ABC-X in each of the pages for the ABC column, instead of ABC-X in page 1, ABC-Y in page 2, ABC-Z in page 3, ...

View 4 Replies View Related

SHIPPING PRICE

Apr 3, 2008

 I want to make stored Procedure that get sum total of the order and return the ship pricethis is my table:in my procedure I want to get the order subTotal and return the ship priceFor example if the subTotal is 60$ than return  300$etc,my problem is that if the "toPrice" = 0, than its mean "higher than"How can I Write this Code, here is my try:declare @subTotal intset @subTotal = 60SELECT [ShippingPolicyId]      ,[Header]      ,[fromPrice]      ,[toPrice],[price]  FROM [dbo].[xxx_ShippingPolicy]where @subTotal >=[fromPrice] and    @subTotal <= [toPrice]--where @subTotal >=[fromPrice] and case when [toPrice] > 0 then   @subTotal <= [toPrice] else 1=1   

View 5 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved