|
Home > Archive > SQL server exams > June 2002 > Stored Procedure
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
|
|
| cocolocopolo 2002-06-25, 1:23 am |
| Follow the instruction from "MCSE MS SQL Server 2000 Database Design and Implementation Training Kit" page 300, I tried:
Use Pubs
Go
Execute au_info
@latname='Green', @firstname='Majorie'
But got error:
Server: Msg 2812, Level 16, State 62, Line 1
Could not find stored procedure 'au_info'.
So, where is au_info stored procedure ??? | |
| baruugh 2002-06-25, 4:25 pm |
| Hi,
Open SQL Server Enterprise Manager, open the PUBS database hierarchy and have a look at the stored procedures for that database.
If it is not listed - I am not in front of mine right now - have another look at the book and see if you need to actually create it first (au_info may not be one that shipped with SQL 2000)
If it is, then check that you have the correct name (could it be sp_au_info?)
Good luck! | |
| cocolocopolo 2002-06-28, 12:12 pm |
| Thanks baruugh.
It seems that au_info is not listed.
I am following instruction to create it and
see what's going on.
Thanks again. | |
|
| quote: Originally posted by cocolocopolo
Follow the instruction from "MCSE MS SQL Server 2000 Database Design and Implementation Training Kit" page 300, I tried:
[...]
So, where is au_info stored procedure ???
Maybe it was created in a previous lesson?
Anyway, I find this i BoL:
CREATE PROC au_info @lastname varchar(40), @firstname varchar(20)
AS
SELECT au_lname, au_fname, title, pub_name
FROM authors INNER JOIN titleauthor ON authors.au_id = titleauthor.au_id
JOIN titles ON titleauthor.title_id = titles.title_id
JOIN publishers ON titles.pub_id = publishers.pub_id
WHERE au_fname = @firstname
AND au_lname = @lastname
GO |
|
|
|
|