Is it possible to rename output data?

  • Hello,

    I'm retrieving data using where statement, and do get data from table as expected. My question is, is it possible to rename that data?

    My table has list of IP addresses, and I want to either add name or completely rename what is displayed.

    Is it possible to do this using SQL queries?

    Thanks!

  • Could you give an example of what you mean by "rename output data"? Do you mean aliasing column names so they display as something other than their original names in the table?

    SELECT FName AS FirstName

    FROM MyTable;

    or did you mean to modify/overwrite column data?

  • Thanks for the reply.

    I'm queuing specific data from column called Node Alias, for example:

    NodeAlias = '101.101.101.101' or NodeAlias = '102.102.102.102' etc.

    So, my reporting works, but I want to rename what is viewed in report (if 101.101.101.101, then name is "UniqueName" or add to the name "101.101.101.101 - Unique Name).

    Hope it makes sense.

  • I'm queuing specific data from column called Node Alias, for example:

    NodeAlias = '101.101.101.101' or NodeAlias = '102.102.102.102' etc.

    So, my reporting works, but I want to rename what is viewed in report (if 101.101.101.101, then name is "UniqueName" or add to the name "101.101.101.101 - Unique Name).

    Rename what? a column? Or is this a new textbox that you want in your report? You can set the visibility of the textbox based on an expression, if you want.

  • Do you mean something like this:

    SELECT CASE NodeAlias WHEN '101.101.101.101' THEN 'UniqueName' ELSE 'Larry' END

    FROM MyTable

    or

    SELECT NodeAlias + ' - ' + CASE NodeAlias WHEN '101.101.101.101' THEN 'UniqueName' ELSE 'Larry' END

    FROM MyTable

Viewing 5 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic. Login to reply