Concatenating 3 fileds into a new field

G

Guest

I have a table :

ID Name Faculty Department Year_entered Output
1 allen 4 103 07
2 Sarah 4 102 07
3 Steve 3 103 07
4 Kris 2 107 06
5 Dove 1 109 05

------------------------------------------------------------------------------------------

when i manually key in SQL, i need to concatenate "Faculty", "Department"
and "Year_Entered"

so the "output" should be:
For Allen --> 41037
for Sarah --> 410207
For Steve --> 410307
For dove --> 110905
 
S

Stefan Hoffmann

hi Ali,
ID Name Faculty Department Year_entered Output
1 allen 4 103 07
2 Sarah 4 102 07
3 Steve 3 103 07
when i manually key in SQL, i need to concatenate "Faculty", "Department"
and "Year_Entered"
so the "output" should be:
For Allen --> 41037
for Sarah --> 410207
Create a new selection query, add a new column:

Key: [Faculty] & [Department] & [Year_Entered]


mfG
--> stefan <--
 
G

Guest

Dear Stefan,

Could you please type the SQL for me, this is hard to understand..! NOw i
can only do this:

SELECT ID, Name, Faculty, Department, Year_entered, Output
from table1
?????????


i dont know what to do next !!, Please advise me, thank you !


--
---------


Stefan Hoffmann said:
hi Ali,
ID Name Faculty Department Year_entered Output
1 allen 4 103 07
2 Sarah 4 102 07
3 Steve 3 103 07
when i manually key in SQL, i need to concatenate "Faculty", "Department"
and "Year_Entered"
so the "output" should be:
For Allen --> 41037
for Sarah --> 410207
Create a new selection query, add a new column:

Key: [Faculty] & [Department] & [Year_Entered]


mfG
--> stefan <--
 
G

Guest

oh thank Stefan ! , i've figured it out just now!!

SELECT ID, Name, Faculty, Department, Year_entered,[Faculty] & [Department]
& [Year_Entered] as expr1
from table3


you rock !

--
---------


Stefan Hoffmann said:
hi Ali,
ID Name Faculty Department Year_entered Output
1 allen 4 103 07
2 Sarah 4 102 07
3 Steve 3 103 07
when i manually key in SQL, i need to concatenate "Faculty", "Department"
and "Year_Entered"
so the "output" should be:
For Allen --> 41037
for Sarah --> 410207
Create a new selection query, add a new column:

Key: [Faculty] & [Department] & [Year_Entered]


mfG
--> stefan <--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top