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.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2004-06-14 : 07:17:39
|
| yaip writes "I come from an environment where, if we had to add common fields to a file, like address, time-stamps, etc., we would define a structure and then include the structure in all the files. That saved us a lot of typing and was much less error prone. Can you do something similar in SQL Server? If yes, how?Also, if we had "Utility functions", we would define a dummy file (which we would never compile) and have all our common functions over that file. How would you do something similar in SQL Server. Say I want to have common SPs in one place. What would I do? Just create a dummy table and have all the SPs there?" |
|
|
mtomeo
Starting Member
30 Posts |
Posted - 2004-06-14 : 09:31:38
|
| All UDFs (User Defined Functions) and Stored Procedures are available to all Users if you set the permissions that way (public). There is no need to "include" them in your scripts. Just reference them as needed... |
 |
|
|
nr
SQLTeam MVY
12543 Posts |
Posted - 2004-06-14 : 09:54:45
|
| You are getting confused between storing and accessing data.Define a table (or tables) to hold the entities and relate it to other entities via a foreign key. Hence the term relational database.Tables and SPs are different objects - you don't include one in the other.Have a look at bol and the examples stored with sql server.Do a search for Codd and normalisation.Think you have a lot of learning to do to understand relational databases.==========================================Cursors are useful if you don't know sql.DTS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
derrickleggett
Pointy Haired Yak DBA
4184 Posts |
Posted - 2004-06-14 : 10:20:51
|
| Sounds like they're talking about hierarchy keys and data reporters doesn't it Nigel. :) Relational databases are radically different by their very nature. Buy a good relational database design book. Research what Nigel told you to. You also might want to look at the SQL Server books here to understand the architecture and internals of SQL Server and it's language. This might answer some of your questions.http://www.sqlteam.com/store.aspMeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA. |
 |
|
|
|
|
|