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?

mike S Accepted Answer Pending Moderation
  1. Wednesday, 24 November 2021 15:27 PM UTC
  2. PowerServer
  3. # 1

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.
Javier Garcia Martin Accepted Answer Pending Moderation
  1. Tuesday, 15 February 2022 09:32 AM UTC
  2. PowerServer
  3. # 2
Hello,

I am using pb2019 R3 version and I have the same problem.

I use multiple databases and I only have the problem in one of them and with the owner user.

If you do the following it works OK:

SELECT TABLE1.NAME1 AS 'NAME1' , TABLE2.NAME2 AS 'NAME2' FROM TABLE1,TABLE2.

That is, if you put the aliases in quotes, the syntaxfromsql statement works correctly and when creating a datastore dynamically it does NOT 
create the fields in the TABLE_NAME way. This leads me to think that it may be a configuration parameter user / BBDD.

do you consider any solution?



Thanks
 
Comment
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. # 3

What version of PowerServer are you using?

Comment
  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
  1. Miguel Leeuwe
  2. Tuesday, 15 February 2022 14:30 PM UTC
Yes I think the behavior might be different using different clients or drivers.
  1. Helpful
  1. Miguel Leeuwe
  2. Tuesday, 22 February 2022 16:51 PM UTC
If I remember well, there's been support tickets for similar issue quite some time ago.
  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.
Sivaprakash BKR Accepted Answer Pending Moderation
  1. Wednesday, 24 November 2021 11:26 AM UTC
  2. PowerServer
  3. # 5

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 1
There are no comments made yet.
Matt Balent Accepted Answer Pending Moderation
  1. Wednesday, 24 November 2021 16:10 PM UTC
  2. PowerServer
  3. # 6

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.
René Ullrich Accepted Answer Pending Moderation
  1. Tuesday, 15 February 2022 09:49 AM UTC
  2. PowerServer
  3. # 7

I found this: https://docs.appeon.com/ps2021/bk06ch03s01s02.html

But it describes the problem vice versa!?

Comment
  1. mike S
  2. Tuesday, 15 February 2022 14:42 PM UTC
thats powerserver 2021, so it is different than the old powerserver which does things inconsistently with powerbuilder. i believe whether or not the table name was included in pb was based on the number of tables, plus it depended on how it was being generated - IDE vs sql from syntax.



What would be great is if there was a definition of what it should do and then have powerbuilder and powerserver 2021+ both work that way for both the IDE and sqlfromsyntax





  1. Helpful 1
There are no comments made yet.
Javier Garcia Martin Accepted Answer Pending Moderation
  1. Tuesday, 22 February 2022 15:05 PM UTC
  2. PowerServer
  3. # 8

syntax

Comment
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.