Jump to content
We've recently updated our Privacy Statement, available here ×

Can i change my fields name?


demusniko12
Go to solution Solved by jgust,

Recommended Posts

Hello everyone,

I just wanna ask one answers and i hope you guys can answer my question.

I queries some lines to call coloumns at posgreSql and i pulled several tables ( Joins) to call my tables.

my question is, if i have several same name like for example my query is

select employee.name,
    project.name,
    department.name
from table employee join project on project.id=employee.id

and in the box of Dataset and Query Dialog the employee.name and project.name shows Coloumn_6 and Coloumn_7 and i changed it to Employee and Department. will it effect later in my html and javascript to change the name like that?

Thanks In advance
 

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

  • Solution

I don't know the answer to your specific question if it will effect in html and javascript.  I will say that in my experience that it is always better to bring in the data correctly and clearly if you can help it.  You can do this by assigning an alias in SQL.

SELECT      employee.name   AS EMP_NAME    ,project.name    AS PROJ_NAME    ,department.name AS DEPT_NAMEFROM employeeINNER JOIN project ON project.id = employee.idINNER JOIN department ON department.id = employee.dept_id[/code]

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...