Direct Query和View的结果不同 [英] Different results from Direct Query and View

查看:39
本文介绍了Direct Query和View的结果不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试运行以下查询并获得以下结果

I am trying to run below query and getting below results

SELECT DISTINCT  

  FG.FacilityKey,DF.FacilityKey f2,

  DF.FacilityNbr,

  FG。[EOMDateKey]

    FROM FactGLTransaction FG

  LEFT JOIN DimFacility DF ON FG.FacilityKey = DF.FacilityKey

 其中FG.FacilityKey = 23 

SELECT DISTINCT  
  FG.FacilityKey,DF.FacilityKey f2,
  DF.FacilityNbr,
  FG.[EOMDateKey]
   FROM FactGLTransaction FG
  LEFT JOIN DimFacility DF ON FG.FacilityKey = DF.FacilityKey
  Where FG.FacilityKey = 23 

但我使用相同的查询并在视图中使用 为什么我得到不同的结果

but i used same query and used in view  Why i am getting different results

我从未见过这种奇怪的事件发生。我们正在使用  Azure DB  SQL Server版本 -   Microsoft SQL Azure(RTM) - 12.0.2000.8   四月  3 2019 13:27:00   版权所有(C)2019 Microsoft Corporation。

I never saw this weird incident happen. we are using  Azure DB  SQL Server version - Microsoft SQL Azure (RTM) - 12.0.2000.8   Apr  3 2019 13:27:00   Copyright (C) 2019 Microsoft Corporation.

和Facilitykey具有相同的数据类型。

and Facilitykey has same datatype.

我错过了什么或者我是否需要提供任何权限?

Am i missing anything or do i need to give any permissions?

谢谢,

aravind -

aravind-

推荐答案

该表的架构是什么  FactGLTransaction和
DimFacility ?是否与视图相同( WIP)? 
What is your schema for the table FactGLTransaction and DimFacility? is it same as the view (WIP)? 


这篇关于Direct Query和View的结果不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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