Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating SQL Views that automatically fill in the foreign key.

Status
Not open for further replies.

jcfrasco

IS-IT--Management
Apr 27, 2001
89
US
I'm used to developing queries in Access and I can create a link that automatically inputs the primary key value into the foreign key field when a new record is created. Can I do this same function in SQL Server 7 with views. If not, what are my alternatives?
 
In Access, queries can be used to view (select), update, append, and delete data. SQL Server Views are used to view (select) data.

Stored Procedures are the SQL equivalent to Access queries that update, append (insert) or delete. Stored Procedures (SP) can also do much more - import/export data, execute batch programs, call other SPs, create tables, send E-Mail, etc.

Triggers are essentially a special kind of Stored Procedure that execute (or fire) automatically when a table is updated. Hence we have update, insert and/or delete triggers.

Hope this helps you equate what you already know to the SQL world. Terry
 
Thanks tlbroadbent,

I've already started researching stored procedures and triggers and I'll try to put them in to use soon. Thank you for your assistance and if you have any recommendations of research material or any additional advice I would appreciate any thing you offer.

Thanks again,
jcfrasco
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top