I made a table within sql server, there's a field call "linkID", and basically what i want it to do is automatically filled with some kind of value everytime when that row is inserted.
for example, whenever a row is inserted, i want to take the birthdate field from the same table- e.g. 01/01/2001 mix with last 4 digit from ssn field at the same table - e.g. 1234. and concatenates them together into 1 string -e.g: 010120011234
i dunno much about sql server, but after done some reading, i think they call that "trigger". But i don't know what language and how is used to program dbms (part of the major problem i don't know how to solve is to deal with leading zero from the date field).
I know I can accomplish the smiliar task from the software programming level (e.g. if writing program in java, concatenate the string first, and insert that row alone with sql statment), but the problem with that is, i have to write that code everytime when i create a application that is talking to the same table. So it'll be nice if I can handle that at a dbms level.
thank you for your time



Help
Back to top









