Stored Procedure in T-SQL (Logic)

I am writing a SPOC and need help with the logic portion; please show examples

I need it to

1.Need a Stored Procedure that will scan the Item table for negtest items.

 2.Once they are found look up the Itemloc record and find any negative quantity on Hand records.  

3. Once found place into the test table for review in the negtest Error Processing screen.
Who is Participating?
Jim HornConnect With a Mentor Microsoft SQL Server Developer, Architect, and AuthorCommented:
>in the negtest Error Processing screen.
SP's do SQL, not UI objects such as screens, so this will likely not happen.

Also, without knowing the schema for these tables this is going to involve a lot of assumptions.

Something like...

CREATE PROC sp_foo() as

INSERT INTO YourTestTable (item_id, itemloc_id)
INNER JOIN Itemloc il ON = il.item_id
WHERE i.negtest = True

December2000Author Commented:
Thank you
Jim HornMicrosoft SQL Server Developer, Architect, and AuthorCommented:
Thanks for the grade.  Good luck with your project.  -Jim
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.