删除SQL查询中的未填充数据 - 仅需要前两行数据 [英] Removing unwated data in SQL query-Only need first two rows of data

查看:94
本文介绍了删除SQL查询中的未填充数据 - 仅需要前两行数据的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试删除输出中的重复数据。我只需要前两行,但查询给了我几行。请参阅下面的代码和 输出屏幕截图。谢谢。

Hi,

I'm trying to remove duplicate data in my output. I only need the first two rows, but the query is giving me several rows. See code and output screen shots below. Thank you.

推荐答案

Hi
< span lang ="en-US"> favor357,

 

感谢您的发布。

 

Per你的屏幕截图,我认为你的输出不重复。在每一行中,它有不同的[Appt D / T],[PAT_ENC_CSN]等等。

Per your screen shots, I think your output is not duplicate . In each row , it has different [Appt D/T],[PAT_ENC_CSN] and so on.

 

请与我们分享您的预期结果或在结果中添加其他条件你要?如果不是 
并且您仍然想获得前两行,请在您的脚本中将'SELECT'更改为'SELECT TOP(2)'。

Could you please share us your expected result or add other condition to the results you want? If not  and you still would like to get the first two rows, please change 'SELECT' into 'SELECT TOP(2)' in your script.

 

更多详情 
关于TOP,请参阅
TOP

For more details  about TOP , please refer to TOP.

 

希望它可以帮到你。

 

最诚挚的问候,

Rachel


这篇关于删除SQL查询中的未填充数据 - 仅需要前两行数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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