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.
| Author |
Topic |
|
iamsmahd
Yak Posting Veteran
55 Posts |
Posted - 2005-09-22 : 07:31:59
|
| Hi there....I have created this stored proc. ::Create Stored Procedure dbo.xyz_1ASdeclare @type bitSELECT DISTINCT dbo.Product.PCode, dbo.Order.ODescription, Case @type when 1 then 'x' when 0 then 'y' end as type, CASE WHEN (subquery1) ='d' THEN CASE WHEN (subquery2) >100 THEN (subquery3) WHEN (subquery2) <100 THEN begin Set @type=1 Case WHEN .. END End END AS PriceFROM .......WHERE .......-------------------------but I get error fwhat's wrong?sonia |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-09-22 : 07:38:32
|
| I think you cant set value to variable inside select statementCan you explain what you are trying to do?Post table Structure, sample data and the result you wantMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|