1. Saravanakumar Thangapandian
  2. PowerServer
  3. Tuesday, 23 November 2021 11:06 AM UTC

If the SQL query is having more than one table, then SyntaxFromSQL is returning the syntax with columnname only in thick client verion.

But the web version returns with tablename_columnname.

I want only the column names in the DW syntax.

Please suggest, Is there any way, I can avoid tablename prefix?

Matt Balent Accepted Answer Pending Moderation
  1. Wednesday, 24 November 2021 16:10 PM UTC
  2. PowerServer
  3. # 1

Is your datawindow sql in 'graphic' or 'syntax' mode?

Comment
  1. mike S
  2. Wednesday, 24 November 2021 16:51 PM UTC
OP is creating datawindow at runtime, not via the ide
  1. Helpful
There are no comments made yet.
mike S Accepted Answer Pending Moderation
  1. Wednesday, 24 November 2021 15:27 PM UTC
  2. PowerServer
  3. # 2

PowerServer is correct and PB is wrong.  Also, PB uses table_columnname when creating the dw via the IDE, so PB is only wrong with syntaxfromsql.

this is my submission to appeon on this subject: 

https://www.appeon.com/standardsupport/search/view?id=3860

 

 

it should always return table_columnname - if you have 2 tables with the same column name then you have no clue which table it is linked to without the prefix.   it needs to be consistent for every column it creates.  Even with only 1 table in use it would be easier if it consistent and always used  table_columnname. 

The way it is now makes it difficult to know when to use just the column name and when to use both regardless of PS vs PB.  

What i do is to check if a column exists via describe - i use tablename_columnanme.  if it exists, then i know to use the prefix and if it doesn't i don't....

 

 

Comment
There are no comments made yet.
Sivaprakash BKR Accepted Answer Pending Moderation
  1. Wednesday, 24 November 2021 11:26 AM UTC
  2. PowerServer
  3. # 3

Hi Saravanakumar

Can you try your SQL like this

Select (a.field1) as field1, (a.field2) as field2, (b.field3) as field3
From  table1 a
Join    table2 b
On     b.key = a.key
Where somefield = somevalue ;

 

Comment
  1. mike S
  2. Wednesday, 24 November 2021 15:32 PM UTC
use an inline view to have a single virtual table
  1. Helpful
There are no comments made yet.
Saravanakumar Thangapandian Accepted Answer Pending Moderation
  1. Wednesday, 24 November 2021 00:56 AM UTC
  2. PowerServer
  3. # 4

My power server version is PowerServer (PB Edition) 2020 Build 2703.00

Comment
  1. Armeen Mazda @Appeon
  2. Wednesday, 24 November 2021 01:11 AM UTC
Can you reproduce the problem on 2021 version?
  1. Helpful
  1. Saravanakumar Thangapandian
  2. Wednesday, 24 November 2021 01:41 AM UTC
Hi Armeen, I dont want to upgrade my power server/power builder to 2021 version and test.

We were all using same power server/power builder version for our development and deployment. Upgrading to higher version, requires additional testing.

I have used the work around suggested in the link (get the column thru describe)

https://www.appeon.com/standardsupport/search/view?id=4638

But, I would like to see the original issue addressed, instead of this workaround.

Let me know, if you want support ticket to address the issue. I can raise it.
  1. Helpful
  1. Chris Pollach @Appeon
  2. Wednesday, 24 November 2021 02:00 AM UTC
Hi Saravanakumar;

You cannot upgrade anyway as your using Appeon Web and/or Mobile features in PS2020. Both of those features are discontinued in PS2021

FYI...

https://www.appeon.com/developers/discontinued-features-in-powerserver-2021

I think that the best way forward is to open a support ticket & supply a Test Case for this issue. Hopefully, Appeon can then address this in a MR for PS2020.

Regards ... Chris
  1. Helpful 2
There are no comments made yet.
Armeen Mazda @Appeon Accepted Answer Pending Moderation
  1. Tuesday, 23 November 2021 16:25 PM UTC
  2. PowerServer
  3. # 5

What version of PowerServer are you using?

Comment
  1. Miguel Leeuwe
  2. Wednesday, 24 November 2021 04:47 AM UTC
yes, it's a shame I don't know exactly how to reproduce it, since it happened to one of my managers. I don't remember which Oracle driver he was using (probably some old 11g client) but there was definitely inconsistent behavior of preceding the fieldnames with the table name or not. The way he "fixed" it was by simply stripping out the tableName_ part if it was found. Not very ideal, but seemed to work for our particular case.
  1. Helpful
  1. Miguel Leeuwe
  2. Wednesday, 24 November 2021 04:48 AM UTC
Instead of being a difference in the client, it might also have been a different oracle version on the SERVER. We have several copies of the same database, but on different versioned servers. Sorry, cannot give any more useful info.
  1. Helpful
  1. Armeen Mazda @Appeon
  2. Wednesday, 24 November 2021 05:07 AM UTC
Saravanakumar said he is using PowerServer. PowerServer uses different driver than client/server. Probably best to provide test case and open support ticket so our team can analyze if the existing tickets aren't exactly same problem that you experienced.
  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.