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.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Help For Store Procedure

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2006-02-14 : 09:25:42
Braja writes "i am developing web based order monitoring system , i have to write a store procedure to find out pending order, i am giving you table detail below.

CREATE TABLE tbl_order (orderid char(10) ,orderno char(20),orderdt datetime, Status char (4))


CREATE TABLE tbl_orderdtl (orderid char (10) , itemcd char (5) , size char (3) ,orderqty int)


CREATE TABLE tbl_despatch (despid char(10), despno char(20),despdt datetime ,orderid char(10))

CREATE TABLE tbl_despdtl (despid char(10) ,itemcd char(5),size char(3),despatchqty int)

now i also give you data detail.
data in tbl_order

Orderid orderno orderdt status
======= ====== ======= =======
0000000001 ord/0001 01/01/2006 P
When user enterd order then default of order status is P for pending

data in tbl_orderdtl
Orderid itemcd size orderqty
======= ====== ==== ========
0000000001 FG001 32 150
0000000001 FG001 34 120
0000000001 FG001 36 180

data in tbl_despatch

despid despno despdt orderid
====== ====== ====== =======
0000000001 dsp/00001 05/01/2006 0000000001

data in tbl_despatch
despid itemcd size despatchqty
======= ====== ==== ========
0000000001 FG001 32 100
0000000001 FG001 34 75
0000000001 FG001 36 120"

robvolk
Most Valuable Yak

15732 Posts

Posted - 2006-02-14 : 09:27:39
If you are "developing" this stored procedure, why are you making us do all the work? Perhaps you should hire a consultant who has SQL experience, or look in Books Online under "SELECT" and "JOIN" and "CREATE PROCEDURE".
Go to Top of Page
   

- Advertisement -