Skip to main content
Solved

Lobby Data source view table alias

  • September 7, 2021
  • 6 replies
  • 617 views

Forum|alt.badge.img+10

Hello all,

I am trying to save my lobby data source but i have and error when I hit the save button like “Please enter a one view name”

 

But I can preview my query and it works fine.

What i need to to is just save may data source but i can’t.

Any hep would be appreciated.

 

Best answer by Tomas Ruderfelt

Here is an example of how you can change a part of your sub-select:

FROM &AO.TRREP_SATIS_ANALIZ b WHERE b.PERIOD2 <= TRREP_SATIS_ANALIZ.PERIOD2

 

Or you could try to replace the sub-select with:

SUM(amount) OVER(ORDER BY period2 RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)

 

View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

6 replies

william.klotz
Superhero (Customer)
Forum|alt.badge.img+21
  • Superhero (Customer)
  • 479 replies
  • September 7, 2021

Hi @Ozgun BAL ,

 

I believe if you remove the b from the field where you’ve entered the view name and change your inline query to include the b after the view name you’ll be able to successful save your data source.   

 

Regards,

William Klotz


Forum|alt.badge.img+10
  • Author
  • Hero (Customer)
  • 101 replies
  • September 8, 2021
william.klotz wrote:

Hi @Ozgun BAL ,

 

I believe if you remove the b from the field where you’ve entered the view name and change your inline query to include the b after the view name you’ll be able to successful save your data source.   

 

Regards,

William Klotz

Hello @william.klotz  ,

 

Thanks for your answer,

 

If I remove the alias names from the query, result will be incorrect.

I actually need to give a name to the view table. If i dont give an alias,  query result won’t be correct.

 

Isn’t there any way to give an alias name to view table in this situtation?

 

The query preview works fine but IFS doesen’t let me save my lobby data source element.

 

Thanks in advence.

 

Regards 

Ozgun BAL

 

 


Forum|alt.badge.img+5
  • 26 replies
  • September 8, 2021

Hello Ozgun,

Why you need to use Alias? If you query one view and not join two or more views/tables, you dont have to use alias. But if you cant do it you can create a view or an IAL instead. 

Regards.

Servet


Forum|alt.badge.img+10
  • Author
  • Hero (Customer)
  • 101 replies
  • September 8, 2021

Hello Servet, thanks for reply.

 

My aim is to calculate running total value of SUM(AMOUNT) cloumn.

So I added a new column with using subquery which sums running total values.

 

Please inspect following screenshots;

And If I remove alias result is like that;

 

Maybe someone can help me about other ways to calculate the running total value?

My logic to calculate running value of SUM(AMOUNT) may be wrong but query results seems correct.

 

What I only need is to save this data source design but IFS doesen’t allow.

 

Kind Regards

Ozgun BAL

 

 


Forum|alt.badge.img+20
  • Superhero (Employee)
  • 488 replies
  • Answer
  • September 8, 2021

Here is an example of how you can change a part of your sub-select:

FROM &AO.TRREP_SATIS_ANALIZ b WHERE b.PERIOD2 <= TRREP_SATIS_ANALIZ.PERIOD2

 

Or you could try to replace the sub-select with:

SUM(amount) OVER(ORDER BY period2 RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)

 


Forum|alt.badge.img+10
  • Author
  • Hero (Customer)
  • 101 replies
  • September 8, 2021
Tomas Ruderfelt wrote:

Here is an example of how you can change a part of your sub-select:

FROM &AO.TRREP_SATIS_ANALIZ b WHERE b.PERIOD2 <= TRREP_SATIS_ANALIZ.PERIOD2

 

Or you could try to replace the sub-select with:

SUM(amount) OVER(ORDER BY period2 RANGE BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW)

 

Hello @Tomas Ruderfelt ,

Thanks for your help!

First option solved my problem.

It helped a lot and I learnt something, thanks for that.

 

Kind Regards

Ozgun BAL


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings