Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
3
Reply
case create a problem in sql server
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
Joginder Banger
9y
702
1
Reply
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)
Post
Reset
Cancel
Answers (
3
)
Next Recommended Forum
Sqlserver Login, Credentials and User
i need Inventry Concept Store Procedure ex?