Over the next few days we are going to start the migration to a new forum application. I'm going to start with high post count and active users. You may receive an invitation to the new forums. It's not spam. It's just me trying to seed the user base. My goal is to open it up over the weekend.

Once we open the site we'll block registrations here. We should be open shortly on the new site.

SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 help query
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

kabon
Starting Member

Indonesia
48 Posts

Posted - 05/24/2013 :  04:27:16  Show Profile  Reply with Quote
I have query like this:

SELECT PD.RECID,
dbo.[f_ZeroLeading] ((ISNULL(convert(numeric(16,2),C.XMLRECORD.value('(/row/c22)[1]','NVARCHAR(100)')),'0'))
+(ISNULL(convert(numeric(16,2),C.XMLRECORD.value('(/row/c22 [@m=2])[1]','NVARCHAR(100)')),'0'))) AS OUTSTANDING_BAL
FROM FBNK_PD_CAPTURE as PD with (nolock)
left join FBNK_PD_PAYMENT_DUE C on PD.RECID COLLATE Latin1_General_100_BIN2 = (SELECT REPLACE(C.RECID COLLATE Latin1_General_100_BIN2 , 'PDLD','PDCA') FROM FBNK_PD_PAYMENT_DUE C WHERE C.RECID COLLATE Latin1_General_100_BIN2 LIKE 'PDLD%')

and have still error.
Do you have idea for this query?

bandi
Flowing Fount of Yak Knowledge

India
2241 Posts

Posted - 05/24/2013 :  05:28:09  Show Profile  Reply with Quote
Check whether you have returned more than one record for sub query ?
SELECT REPLACE(C.RECID COLLATE Latin1_General_100_BIN2 , 'PDLD','PDCA') FROM FBNK_PD_PAYMENT_DUE C WHERE C.RECID COLLATE Latin1_General_100_BIN2 LIKE 'PDLD%'

Let us know the result...
And also post us the error message

--
Chandu
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000