Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 sql query?

Author  Topic 

akas
Starting Member

42 Posts

Posted - 2009-06-10 : 10:49:13
Hey Friends,

I have been given this scenario and i have to use it in sql query. what way it should be?

Does any one give me some idea? it would be helpful..thanks.

-Customer enters a promo code (“PROMO”)
-Logic to determine if “PROMO” is currently in effect
-Loop through each item in the shopping basket, determine if “PROMO” is a valid price level for that item (simple SQL call).
If so, set the “price level” orderform variable for that item to “PROMO”. If not, leave “price level” variable blank (which will force the pricing to use to the customer’s price level)

any help or suggestion to prepare sql query? i would be appreciate it. thanks.


khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2009-06-10 : 10:55:37
maybe it will be easier if you can post the related table DDL, sample data and the expected result


KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2009-06-10 : 14:17:23
see guidelines on how to post a question here

http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx
Go to Top of Page
   

- Advertisement -