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
Joginder Banger
213
8.7k
1m
case create a problem in sql server
Nov 20 2014 8:02 AM
hi every buddy,
plz solve my problem if any buddy understand. when i use case it throw error
set @sql ='select *
from
(
select tsim.OrganisationCode orgcode , (case when tsim.OrganisationName is not null then '+'yes'+' else null end) as orgname,p.RouteofAdministration from tbl_Product p
inner join tbl_ProductMaster as pm on p.fk_ProductMasterId=pm.ProductMasterId
inner join tbl_ProductSiteInpectedBy as ps on ps.fk_ProductMasterID=pm.ProductMasterId
inner join tbl_SiteInspectedBy_Master as tsim on tsim.OrganisationID=ps.fk_OrganisationID
) d
pivot
(
max(orgcode) for orgname in ('+@columns+')
) as t2'
exec(@sql)
Reply
Answers (
3
)
Sqlserver Login, Credentials and User
i need Inventry Concept Store Procedure ex?