Click here to Skip to main content
15,896,201 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
- I have a View, such as:
SQL
Create View vPrice As
Select 
	bg.PriceListID,			
	bg.ProductAttributeValue,
	bg.ProductName,
	bg.UnitID,
	bg.PriceValue,
	bg.DateFrom
From D14T1120 bg


- when i select this view, result as:
SQL
------------Select * from vPrice    ----------------------            
P..ID	P..lue  P...Name	UnitID	PriceValue	DateFrom
------------------------------------------------------------------------
BGIALE	893482	Heniken 	LON	5.0000	        2012-03-22 17:23:06
BGIALE	893482	Heniken 	LON	17.000		2012-02-08 17:23:06
BGIALE	893482	Heniken 	LON	17.500		2011-09-23 10:00:00
BGIALE	893482	Heniken 	LON	1		2011-09-09 07:50:12
BGIALE	893482	Heniken 	LON	16.000		2011-06-06 15:15:12
BGIALE	893482	Heniken 	LON	15.500.		NULL            


- please help me modify command in this view, more conditions: PriceValue >1 and DateFrom <=Getdate() (with today is 2012-03-21)
SQL
------------Select * from vPrice    ----------------------            
P..ID	P..lue  P...Name	UnitID	PriceValue	DateFrom
------------------------------------------------------------------------
BGIALE	893482	Heniken 	LON	17.000		2012-02-08 17:23:06
BGIALE	893482	Heniken 	LON	17.500		2011-09-23 10:00:00
BGIALE	893482	Heniken 	LON	16.000		2011-06-06 15:15:12



Regards
Posted
Updated 20-Mar-12 16:01pm
v2
Comments
ZurdoDev 20-Mar-12 22:33pm    
So, what is the question? Where are you stuck?
Nilesh Patil Kolhapur 21-Mar-12 1:07am    
what u want clear it.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900