Forum Discussion

edhans's avatar
edhans
Icon for Community Champion rankCommunity Champion
8 years ago
Solved

Any pitfalls in using Text.Upper before selecting a table in Power Query?

We've been using our ERP package for decades. It runs on SQL Server. Sometime since our original databases were created for a given company (database in SQL) and last week when I needed to create a new company, they changed the case of about 90% of the table names, so simply changing the database doesn't work, as selecting the table is case sensitive in Power Query.

 

But it seems that I can take the table listing SQL Server initailly passes and do Text.Upper, nothihng changes in the native query that is sent to the SQL Server. I just have an extra step. 

 

select [trx_type]
from [dbo].[APADJTRX_SQL] as [$Table]

Before I change my templates though to force upper case on table names, I wanted to see if anyone knew of a pitfall of doing any kind of modeling before actual table selection.

  • Hi edhans,

     

    Based on my test, Text.Upper function returns the uppercase of each row value for a specific column. It cannot convert the case of table name.

     

    Regards,

    Yuliana Gu 

2 Replies

  • v-yulgu-msft's avatar
    v-yulgu-msft
    Icon for Microsoft Employee rankMicrosoft Employee

    Hi edhans,

     

    Based on my test, Text.Upper function returns the uppercase of each row value for a specific column. It cannot convert the case of table name.

     

    Regards,

    Yuliana Gu 

    • edhans's avatar
      edhans
      Icon for Community Champion rankCommunity Champion

      Hrm... you are right. I can change the case of the table name in the [Name] column when browsing tables, but when I actually select the table, the 

      = #"Uppercased Text"{[Schema="dbo",Item="AWBuildVersion"]}[Data]

      statement pulls the original name case. Thanks.