How do I include an ampersand in the column alias name in a Oracle query

HDM

I'm creating a query to send data to a vendor and need to set the column names to match their specs. I can set the column names for most of the columns; however, a few of the fields have '&' included in their column name. When running the query the ampersand character in the column alias name is causing a substitution variable dialog box to be displayed. While this is the normal behavior when using the ampersand character, are there any options to suppress the behavior if the ampersand is included in the column alias name?

Ideally, I would the query to run without displaying the dialog box and to include the ampersand character in the column name on the output.

Examples

PAY_DED_CODE as "AD&D CODE",

PAY_DED_CODE_EFF_DATE as "AD&D EFFECTIVE DATE",

PAY_DED_CODE_STATUS as "AD&D STATUS",

PAY_DED_CODE_AMOUNT as "AD&D DEDUCTION AMOUNT" 
DRapp

I would STRONGLY advise NOT doing it this way. Then you will be masking everywhere else you want to work with that column. Same with having embedded spaces in the column names, just not a good idea.

Instead, I would put that in the UI display output to the user and create your screen to show the titles pre-defined as you want them to appear. Or if the columns of the data output are auto-generated, I would have a routine that would fix them based on some naming convention / pattern.

Ex: If the column name has "AD_D", then change to "AD&D "

You could also code to handle "CamelCasingStrings" to for "Camel Case Strings" such as where the upper case character indicates there should be a space to provide natural readability to the end-user.

But special characters in column names and spaces would mean you always have to wrap in code with quotes in places the future might not play nice with, especially like web-based output using other languages doing the presentations.

이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.

침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제

에서 수정
0

몇 마디 만하겠습니다

0리뷰
로그인참여 후 검토

관련 기사

분류에서Dev

Mysql - How to Give Alias name for column

분류에서Dev

How do I sum column after count in mysql query

분류에서Dev

How do I execute this find command multiple times throughout many directories with the ampersand '&' command?

분류에서Dev

how to name the column same as records of column of another table in oracle

분류에서Dev

How do I refer to an outside alias from inside a piglatin macro?

분류에서Dev

How do I set up a bash alias for a common working folder?

분류에서Dev

How do I rewrite my SQL query to remove redundant values from a GROUP BY column?

분류에서Dev

Alias column name for Use in CASE Statement

분류에서Dev

How do i format Oracle Output for this Block?

분류에서Dev

How to solve my Laravel between query on same column name

분류에서Dev

How to query from Mysql DATETIME column based on day name

분류에서Dev

How to query from Mysql DATETIME column based on day name

분류에서Dev

Oracle select pivot query to put row adjacent to their counter part using generic column name

분류에서Dev

Can I use cd../.. as an alias name?

분류에서Dev

How do I find the glx library name?

분류에서Dev

Xcode: How do I include a framework in my application

분류에서Dev

How do I include both a left and right sidemenu in ionic?

분류에서Dev

How do I include the QtScript module in a Qt 5.4 application

분류에서Dev

How can I do this as 1 database query?

분류에서Dev

How can I do this LINQ query in BreezeJS?

분류에서Dev

Include non-column value in sqlalchemy query

분류에서Dev

How do I insert column into table?

분류에서Dev

How do I create a "rank" column in Excel?

분류에서Dev

MYSQL select same column name as alias in union not working

분류에서Dev

How can i get number of entries and column name in a unique select?

분류에서Dev

How can I give a table column name as "limit" in Postgres

분류에서Dev

How do I convert a date timestamp in oracle to a date?

분류에서Dev

How do I run Oracle VM VirtualBox on Ubuntu 13.04

분류에서Dev

How do I install the Sun/Oracle Java SDK on Ubuntu?

Related 관련 기사

  1. 1

    Mysql - How to Give Alias name for column

  2. 2

    How do I sum column after count in mysql query

  3. 3

    How do I execute this find command multiple times throughout many directories with the ampersand '&' command?

  4. 4

    how to name the column same as records of column of another table in oracle

  5. 5

    How do I refer to an outside alias from inside a piglatin macro?

  6. 6

    How do I set up a bash alias for a common working folder?

  7. 7

    How do I rewrite my SQL query to remove redundant values from a GROUP BY column?

  8. 8

    Alias column name for Use in CASE Statement

  9. 9

    How do i format Oracle Output for this Block?

  10. 10

    How to solve my Laravel between query on same column name

  11. 11

    How to query from Mysql DATETIME column based on day name

  12. 12

    How to query from Mysql DATETIME column based on day name

  13. 13

    Oracle select pivot query to put row adjacent to their counter part using generic column name

  14. 14

    Can I use cd../.. as an alias name?

  15. 15

    How do I find the glx library name?

  16. 16

    Xcode: How do I include a framework in my application

  17. 17

    How do I include both a left and right sidemenu in ionic?

  18. 18

    How do I include the QtScript module in a Qt 5.4 application

  19. 19

    How can I do this as 1 database query?

  20. 20

    How can I do this LINQ query in BreezeJS?

  21. 21

    Include non-column value in sqlalchemy query

  22. 22

    How do I insert column into table?

  23. 23

    How do I create a "rank" column in Excel?

  24. 24

    MYSQL select same column name as alias in union not working

  25. 25

    How can i get number of entries and column name in a unique select?

  26. 26

    How can I give a table column name as "limit" in Postgres

  27. 27

    How do I convert a date timestamp in oracle to a date?

  28. 28

    How do I run Oracle VM VirtualBox on Ubuntu 13.04

  29. 29

    How do I install the Sun/Oracle Java SDK on Ubuntu?

뜨겁다태그

보관