TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
shahnid k
NA
61
15.5k
The multi-part identifier could not be bound.
Nov 22 2016 4:42 AM
hi am new to programming. Once am copying m query from asp page and place it in sql i cant execute the query directly. Here is my query.
SELECT [BIDAT].[dbo].[viewTotalTurnOver].[REPTORG] as org, [BIDAT].[dbo].[viewTotalTurnOver].[REPTORG] AS code,view002Opporunities.Amount0+BIDAT.dbo.view002Opporunities.Amount10+"
+" Case when BIDAT.dbo.view002Opporunities.Amount0+BIDAT.dbo.view002Opporunities.Amount10+BIDAT.dbo.view002Opporunities.Amount50 = 0"
+ " then 0 else isnull(BIDAT.dbo.view002Opporunities.Amount0+BIDAT.dbo.view002Opporunities.Amount10+BIDAT.dbo.view002Opporunities.Amount50 , 0) end as O50,"
+ " Case when BIDAT.dbo.view002Opporunities.Amount75 = 0 then 0 else isnull([BIDAT].[dbo].view002Opporunities.Amount75 , 0) end as O75 ,"
+ " Case when BIDAT.dbo.view002Opporunities.Amount99 = 0 then 0 else isnull([BIDAT].dbo.view002Opporunities.Amount99 , 0) end as O99 ,"
+ " Case when BIDAT.dbo.view002Opporunities.Amount100 = 0 then 0 else isnull(BIDAT.dbo.view002Opporunities.Amount100 , 0) end as O100 ,"
+ " ABS(BIDAT.dbo.viewTotalTurnOver.[Total Turnover]) AS TT, "
+ " (BIDAT.dbo.viewTotalGP.[Total GP]*-1) AS TGP,"
+ " BIDAT.dbo.viewFRYeartoDate.Actual+FRY.Actual as OH ,"
+ " FRYEAR.Actual*-1 as NP,"
+ " BIDAT.dbo.viewTotalTurnOver.FSCSYR "
+ " FROM BIDAT.dbo.viewTotalTurnOver JOIN "
+ " BIDAT.dbo.viewTotalGP ON BIDAT.dbo.viewTotalTurnOver.REPTORG = BIDAT.dbo.viewTotalGP.REPTORG AND "
+ " BIDAT.dbo.viewTotalTurnOver.FSCSYR = BIDAT.dbo.viewTotalGP.FSCSYR JOIN"
+ " BIDAT.dbo.viewFRYeartoDate ON BIDAT.dbo.viewTotalTurnOver.REPTORG = BIDAT.dbo.viewFRYeartoDate.REPTORG AND "
+ " BIDAT.dbo.viewTotalTurnOver.FSCSYR = BIDAT.dbo.viewFRYeartoDate.FSCSYR AND BIDAT.dbo.viewFRYeartoDate.head ='Overhead Expenses' JOIN"
+ " BIDAT.dbo.viewFRYeartoDate as FRY ON BIDAT.dbo.viewTotalTurnOver.REPTORG = FRY.REPTORG AND "
+ " BIDAT.dbo.viewTotalTurnOver.FSCSYR = FRY.FSCSYR AND FRY.head ='Corporate Expenses' JOIN "
+ " BIDAT.dbo.viewFRYeartoDate as FRYEAR ON BIDAT.dbo.viewTotalTurnOver.REPTORG = FRYEAR.REPTORG AND "
+ " BIDAT.dbo.viewTotalTurnOver.FSCSYR = FRYEAR.FSCSYR AND FRYEAR.head ='Net Profit' "
+ " LEFT JOIN BIDAT.dbo.view002Opporunities ON "
+ " BIDAT.dbo.viewTotalTurnOver.REPTORG = BIDAT.dbo.view002Opporunities.REPTORG AND BIDAT.dbo.viewTotalTurnOver.FSCSYR = "
+ " BIDAT.dbo.view002Opporunities.FSCSYR"
+ " where BIDAT.dbo.viewTotalTurnOver.FSCSYR="+FSCSYR+ " AND(BIDAT.dbo.viewTotalTurnOver.REPTORG in('KPSDUB','QKDODT','KPSRIY','KPSJED','KPSKBR'))"
+ " order by FRYEAR.Actual
Reply
Answers (
2
)
Conversion error in stored procedure
Secure SQL Server