Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 Other Topics
 Concatenate two fields

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-09-27 : 09:09:24
Michael Ngobeni writes "Hi guys!

I need your help!

I have MYSQL table called employee
The fields are:
EMPID- (auto increment)
EMPNO
EMP_NAME
EMP_SURNAME
.... and so on

I am using ASP,VBScript...
I want to insert into the employee table
The thing is I want the EMPNO field to be automatically created by concatenating the EMPID (auto increment) with the first 3 characters of EMP_NAME.

Please help me"

AndrewMurphy
Master Smack Fu Yak Hacker

2916 Posts

Posted - 2004-09-27 : 09:31:14
MYSQL???....this is mainly a MSSQL Server area....however in MSSQL .... you would be looking at a "computed column".

search here for examples of same....including (http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=32525&SearchTerms=computed,column)
Go to Top of Page
   

- Advertisement -