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 |
|
ExLondoner
Starting Member
1 Post |
Posted - 2005-09-20 : 11:53:58
|
| I am trying to create a general test stored procedure that does the following:Contains two parameters: first and last nameFrom entering these, I should be able to obtain the person id from the person table and obtain the address.Hope this makes sense, TIA! |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2005-09-20 : 13:03:11
|
Hi Tia, your words make sense I just don't know what your question is :)here is some sample code to create a simple stored procedure. You'll need to provide some DDL for us to help you with the actual sql statement that pulls data from your table(s). DDL: The scripts necessary to create your sql objects. You can use query analyzer or enterprise manager to generate them.if object_id('dbo.generalTestSP') > 0 drop proc dbo.generalTestSPgocreate proc dbo.generalTestSP @lastname varchar(30) ,@firstname varchar(30)asselect personidfrom dbo.peoplewhere lastname = @lastnameand firstname = @firstnamegogrant exec on dbo.generalTestSP to <someAccount>goBe One with the OptimizerTG |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2005-09-20 : 13:28:48
|
| Homework question alert.Tara |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2005-09-20 : 14:06:29
|
BTW TG... TIA = thanx in advance Go with the flow & have fun! Else fight the flow |
 |
|
|
TG
Master Smack Fu Yak Hacker
6065 Posts |
Posted - 2005-09-20 : 14:40:05
|
>>BTW TG... TIA = thanx in advance Ah! Thank you. So does that mean that Kristen's nickname isn't IMHO ???btw did you know my last name is IF? Be One with the OptimizerTG |
 |
|
|
spirit1
Cybernetic Yak Master
11752 Posts |
Posted - 2005-09-20 : 14:45:12
|
In My Humble Opinion... no IF?? i really hope that stands for something...Go with the flow & have fun! Else fight the flow |
 |
|
|
|
|
|