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 |
|
sqlnovice123
Constraint Violating Yak Guru
262 Posts |
Posted - 2010-04-16 : 11:03:50
|
| Hi ,I have declared the below parameters:DECLARE @ClientType varchar(200) @Client varchar(30), SET @ClientType = '154246'SET @Client = '15'I input the below values which will be displayed in another reporting fron end:INSERT MARPTGEN_PARAMLISTVALUES('15','Broker-Dealer: Pershing Group LLC',1)INSERT MARPTGEN_PARAMLISTVALUES('15','Insurance/Reinsurance Co.: The Travelers Companies Inc',1)Users will have the ability to multi select via a combo box:ClientType: Broker-DealerClientType: Insurance/Reinsurance Co.I try and select the passed paramter with multiple values in order to get an output as 'Avg of Peer Group ' + @ClientType + ' Clients',example Avg of Peer Group.Broker-DealerInsurance/Reinsurance Co. ClientsI get the below error because I am trying to assign multiple values to a variable.How can I achieve this differently?Msg 512, Level 16, State 1, Line 261Subquery returned more than 1 value. This is not permitted when the subquery follows =, != |
|
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
|
|
sqlnovice123
Constraint Violating Yak Guru
262 Posts |
Posted - 2010-04-16 : 11:20:01
|
| So if I have a column ClientType with valuesas belowBroker-DealerInvestmentManagerCan I make the values as column names instead and then all i need to do is concatenate? But I am not sure how to do this if it is possible?Column1 Column2Broker-Dealer InvestmentManager |
 |
|
|
sqlnovice123
Constraint Violating Yak Guru
262 Posts |
Posted - 2010-04-16 : 11:31:15
|
| Or I could use pivot? |
 |
|
|
|
|
|
|
|