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 |
kabon
Starting Member
48 Posts |
Posted - 2013-03-07 : 23:05:51
|
I used condition for examplewhere mur.RECID in (SELECT [COLUMN 0] COLLATE SQL_Latin1_General_CP1_CI_AS FROM CTMURATALL WHERE FIN_MAT_DATE > (select a.XMLRECORD.value('(/row/c1)[1]','NVARCHAR(100)') from t24testsby.dbo.F_DATES as a))and error out like thisSubquery returned more than 1 value. This is not permitted when the subquery follows =, !=, <, <= , >, >= or when the subquery is used as an expression.do you know how to solve that? |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-03-08 : 00:10:17
|
i think its the below subquery returning multiple records (select a.XMLRECORD.value('(/row/c1)[1]','NVARCHAR(100)') from t24testsby.dbo.F_DATES as a)run it alone and checkalso in case it returns multiple, you may consider applying some form of aggregation to get this working------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
kabon
Starting Member
48 Posts |
Posted - 2013-03-08 : 01:31:42
|
yeah i think it's multiple records, but i must take from that table and that column...can you help me? |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
kabon
Starting Member
48 Posts |
Posted - 2013-03-08 : 01:46:46
|
i have table like thiscolumn 1 | column 2 | date |a |123 |20130308|b |234 |20130308|c |567 |20130209|d |145 |20130308|i must show with condition that the date must 20130308 and take from other table. and this is the table to take the date :ID |date |A1 |20130308|A2 |20130308|A3 |20130308|A4 |20130308|i just want to take the that from that table, can you help me? |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-03-08 : 05:30:53
|
so what should be your final output? if you just join on date, as per current table structure you will get duplicate entries for each column_1 value------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|