Subquery returned
Your immediate problem is that the old proprietary :UPDATE.. FROM.. does not work; it has cardinality problems. Good SQL programmers use the MERGE statement and have correct DDL so there are no...
View ArticleSubquery returned
Hi,The subquery i can see in the starting is ( SELECT DT FROM MFI_SYS WHERE SYS_CD ='LAST_COMP_DATE')May be this one returning more values.execute this and see wether it returning one value or more. If...
View ArticleSubquery returned
Run each part separately. Run your SQL statement up to a specific point and see if you are getting error in that part or NOT. Then continue toward another part. See where you are getting the error.Best...
View ArticleSubquery returned
Problem is in the JOIN between dbo.mfi_Comp and dbo.MFI_MARKET_COMMISSION, and dbo.vGERS_EMP_SLSP. For each row in mfi_Comp table you are getting more than one row. Try to make the correction and have...
View ArticleSubquery returned
Perhaps the following is returning more than 1 record:SET @LastCompDate = ( SELECT DT FROM MFI_SYS WHERE SYS_CD = 'LAST_COMP_DATE' )select @Fiscal_cd = fiscal_cd from mfi_fiscal_calendar where date =...
View ArticleSubquery returned
DECLARE @ThisCompDate AS datetime, @Fiscal_cd int, @DateString as varchar(50) SET @ThisCompDate = GETDATE() SET @DateString = CAST(DATEPART(m,@ThisCompDate) AS varchar(2)) + '/' +...
View Article