-
This would work in Oracle, maybe it can help you in the rigth direction?
[vba]
CREATE OR REPLACE PROCEDURE AddAlbum(in_ArtistName VARCHAR(50), in_Title VARCHAR(50)) IS
v_counter INT;
v_artistid INT;
BEGIN
SELECT COUNT (1)
INTO v_counter
FROM Artists
WHERE ArtistName = in_ArtistName;
IF v_counter >= 1 THEN
SELECT ArtistId
INTO v_artistid
FROM Artists
WHERE ArtistName = in_ArtistName;
ELSE
/* do other stuff */
END IF;
/* rest of coding */
END;
[/vba]
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules