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
 General SQL Server Forums
 New to SQL Server Programming
 Triggers and cocatenate

Author  Topic 

gkav
Starting Member

2 Posts

Posted - 2006-12-20 : 15:20:23
Hi,

I'm totally new to SQL and have been trying to design a simple DB.

The DB has two tables, I want to replicate some of the information from the first in the second table(using a trigger), then coconate these values with some other fields stored in the second table. The coconate will be between two different data types (char and Int)

Ideally the entry would all be into the first table, then everythnig would happen automatically in the second table, for when its needed.

Thanks in advance
G

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2006-12-20 : 15:23:32
Coconate! Is that a dessert made with coconuts? Alright, so you mean concatenate.

Could you show us with data and table structure exactly what you want to do?

Why don't you want your application or a stored procedure handle updating the second table?

Tara Kizer
Go to Top of Page

gkav
Starting Member

2 Posts

Posted - 2006-12-20 : 15:31:42
The structure would be:

Table1 Table2

Name Address index Name fakename fakeadd

In table1 the real details would be added, then somehow the name would be copied into the name column in table 2. The index would be autogenerated. Fakename/address would be generated by combining the index with some text i.e faketext. to give a list of fakenames i.e fakename1/2/3...

The DB is to create a translation for confidential information. I was using triggers because I could understand how they operated, if a stored procedure would be easier I could go that route.

Thanks
Garret
Go to Top of Page
   

- Advertisement -