Posted by Bruce A. Julseth on 05/01/07 19:36
I'm new to having to write stored procedures and would appreciate some good
books I can use to learn. I searched Amazon and really wasn't happy with
what I found, but maybe I really didn't know what to look for. My first case
that I'm looking into is updating a relationship. What I am doing now is
straight SQL!!
I have Table A that has a link field in it pointing to Table B. So, I first
"INSERT" into table B, then do a SELECT on MAX(Key) where Key is an auto
incremented field. I then include the value of "Key" in the data when I do
the INSERT into Table A. Make sense??
- Does this make for writing a stored procedure?
- Is there a better way to do it in SQL?
Thanks.....
Navigation:
[Reply to this message]
|