不提状态获取SqlServer中的字段 [英] With out Mention the Status Getting the Fields in SqlServer

查看:66
本文介绍了不提状态获取SqlServer中的字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SELECT EmpName, [Visited], [ptp]
FROM
(SELECT EmpName, Code
FROM @ClientVisit) As Souce
PIVOT (COUNT(Code) FOR Code IN ([Visited], [ptp])) As p.



这是我的数据库查询,它工作正常.但实际上,我的问题是我在查询中提到了[visited],[ptp].这些字段是如何自动选择数据库.
因为客户端将来会添加新文本.



Hi This is My database query it working fine. But Actual my problem is i am mention in the query like [visited],[ptp]. These fields are how to pick database automatically.
Because client add new text in future.

推荐答案

您已经问过这个问题: ^ ]
不要重新发布问题,如果您没有得到答案,请使用用户''Improve question''小部件并更新您的问题.
You have already ask''d this question :Using Pivot in SqlServer[^]
Don''t re-post the question, if you''re not getting the answer then user ''Improve question'' widget and update your question.


这篇关于不提状态获取SqlServer中的字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆