Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
ngreddy1982
Contributor III
Contributor III

Blank field name not allowed

Hi,

I am trying to load script, but it's saying blank field name not allowed. Same script running fine in SQL.

This is the error message.

Here is my script. Untitled.png

Select 

  ih.[Order GuID],

  sum(il.[Gross Weight]) as ShipWeight,

  cn.[Actual Packaging], itm.[Description],

  count(il.No_)

  FROM [TBW_BI].[dbo].[dreams$Sales Invoice Line] as il

  inner join [TBW_BI].[dbo].[dreams$Sales Invoice Header] as ih

  on il.[Document No_]=ih.No_

  inner join [TBW_BI].[dbo].[dreams$Consignment] as cn

  on ih.[Consignment ID]=cn.[id]

  left join [TBW_BI].[dbo].[dreams$Item] as itm

  on cn.[Actual Packaging]=itm.[No_]

  where ih.[Ship-to Country_Region Code]='HK'

  and ih.[Shipment Date]>='2016-10-01' and ih.[Shipment Date]<'2017-03-31'

  group by  ih.[Order GuID],itm.Description, cn.[Actual Packaging]

9 Replies
Anonymous
Not applicable

Can you try giving the alias for count()?? and others too.

Anonymous
Not applicable

Hi,

I am agree with Shiva, you should give alias to you calculate field but also to others.

And it will help you for you data model (to avoid sync table for example)

buzzy996
Master II
Master II

just try by placing the field name in between `` and see, pls note those are not single codes.

exmple,

`ih.[Order GuID]`,

  sum(il.[Gross Weight]) as `ShipWeight`,

  `cn.[Actual Packaging]`,

  `itm.[Description]`,

  count(il.No_) as 'cntno'

  FROM [TBW_BI].[dbo].[dreams$Sales Invoice Line] as il

ngreddy1982
Contributor III
Contributor III
Author

Alias worked Shiva.

Thank you

ngreddy1982
Contributor III
Contributor III
Author

Now I have the table , I have to classify them and how many orders under each category ?

         

Orders/Mth 2016Under250gC250to500gC500to750gc750gto1Kgc1Kgto1.25Kgc1.25Kgto1.5Kgc1.5kgto1.75Kgc1.75kgto2KgOver2kg
Oct-16
Nov-16
Dec-16
Jan-17
Feb-17
Mar-17
Anonymous
Not applicable

Could you attach your application in order to propose you a solution?

Anonymous
Not applicable

Giridhar, To classify your data you can defiine the intervls and use an intervalmatch() function to categorize your data.

Anonymous
Not applicable

Look at this topic about IntervalMatch(). it may be will help you.

IntervalMatch

yevgeniy
Creator
Creator

Hi

You need  count(il.No_) change:

  count(il.No_) as No