SQL Query in Excel PowerPivot -
i have issue when try validate sql query , says 'a column name can not blank'
i have been able shortened version without joining 2 table together.
select [dbo].[stocktransactions].[transactionnumber], [dbo].[stocktransactions].[activitydate], [dbo].[stocktransactions].[sitecode], [dbo].[stocktransactions].[commoditycode], [dbo].[stocktransactions].[commodityvarietycode], [dbo].[stocktransactions].[bingradecode], [dbo].[stocktransactions].[samplemoistureqty], [dbo].[stocktransactions].[partition], [dbo].[stocktransactions].[sampleproteinqty], [dbo].[stocktransactions].[sampletestweight], [dbo].[stocktransactions].[sampleretentionqty], [dbo].[stocktransactions].[samplescreeningsqty], sum([dbo].[stocktransactions].[unshrunktonnes]), [dbo].[stocktransactions].[sampleskinningsqty], [dbo].[vw_oms_sampleresults].[testcode], [dbo].[vw_oms_sampleresults].[result] [dbo].[stocktransactions] left outer join [dbo].[vw_oms_sampleresults] on ([dbo].[stocktransactions].[stocktransactionsomsid]=[dbo]. [vw_oms_sampleresults].[stocktransactionsomsid]) (([dbo].[stocktransactions].[activitydate]>'1/10/2016' , [dbo].[stocktransactions].[transactiontype]='grower receival ' , [dbo].[stocktransactions].[businessunitcode]='ausbulk' , (not [dbo].[stocktransactions].[ownername]='shrink') , [dbo].[stocktransactions].[commoditycode]='wh' , [dbo].[stocktransactions].[seasonlongcode]='2016/2017' , [dbo].[vw_oms_sampleresults].[testcode] in ('ff', 'fr', 'fs', 'snl') , [dbo].[stocktransactions].[sitecode] in ('arn', 'buc', 'cow', 'cum', 'cun', 'dar', 'edi', 'ell', 'kie', 'kim', 'kpi', 'kya', 'lin', 'loc', 'man', 'mda', 'min', 'nei', 'nun', 'pen', 'pnt', 'poo', 'rud', 'stb', 'the', 'too', 'tum', 'ung', 'wad', 'war', 'wha', 'wit', 'wrl', 'wud', 'yan', 'yee'))) group [dbo].[stocktransactions].[transactionnumber], [dbo].[stocktransactions].[activitydate], [dbo].[stocktransactions].[sitecode], [dbo].[stocktransactions].[commoditycode], [dbo].[stocktransactions].[commodityvarietycode], [dbo].[stocktransactions].[bingradecode], [dbo].[stocktransactions].[sampleretentionqty], [dbo].[stocktransactions].[samplemoistureqty], [dbo].[stocktransactions].[sampleskinningsqty], [dbo].[stocktransactions].[partition], [dbo].[stocktransactions].[sampleproteinqty], [dbo].[stocktransactions].[sampletestweight], [dbo].[stocktransactions].[samplescreeningsqty], [dbo].[vw_oms_sampleresults].[testcode], [dbo].[vw_oms_sampleresults].[result], [dbo].[stocktransactions].[partitionstoragetype]
any why throwing error?
Comments
Post a Comment