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)
 create procedure in sqlserver

Author  Topic 

AskSQLTeam
Ask SQLTeam Question

0 Posts

Posted - 2004-06-10 : 08:18:26
Guduu writes "I am enable to create procedure from some other language written SQL query. i will be very glad if u help me out ..
Thanx in Advance
Nick
Function createintall
If TableExist("table_int_all") = True Then
SQL = "DROP TABLE table_int_all;"
DB.Execute (SQL)
End If
'Create new table_intransit_all.
SQL = "SELECT HDR.header_number, "
SQL = SQL & "DTL.detail_number, "
SQL = SQL & "DTL.request_type, "
SQL = SQL & "HDR.site_id, "
SQL = SQL & "HDR.name, "
SQL = SQL & "DTL.CON_title AS condition, "
SQL = SQL & "DTL.ELM_title AS status, "
SQL = SQL & "REF.from_loc, "
sQL = SQL & "REF.to_loc, "
SQL = SQL & "REF.creation_date, "
SQL = SQL & "DES.part_number, "
SQL = SQL & "DES.part_serial_no, "
SQL = SQL & "REF.quantity, "
SQL = SQL & "SDT.carrier2vendor, "
SQL = SQL & "SDT.ship_date, "
SQL = SQL & "SDT.waybill, "
SQL = SQL & "HDR.priority, "
SQL = SQL & "REF.trans_type, "
SQL = SQL & "HDR.x_ce_name, "
SQL = SQL & "HDR.header_case_no, "
SQL = SQL & "HDR.request_notes "
SQL = SQL & "INTO table_intransit_all "
SQL = SQL & "FROM ((table_loc_ref AS REF INNER JOIN (table_demand_dtl AS DTL INNER JOIN table_demand_hdr AS HDR "
SQL = SQL & "ON DTL.demand_dtl2demand_hdr = HDR.objid) "
SQL = SQL & "ON REF.part_trans2demand_dtl = DTL.objid) INNER JOIN table_part_desc AS DES "
SQL = SQL & "ON REF.from_inst2part_inst = DES.objid) LEFT JOIN table_ship_dtl AS SDT ON DTL.objid = SDT.ship_dtl2demand_dtl;"
DB.Execute (SQL)
DB.Close
End Function"

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2004-06-10 : 13:13:19
You haven't asked a question. What problem are you having?

Tara
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2004-06-10 : 16:16:18
He doesn't have to...SQL Server development should be done with sql server client tools...

What you're doing will make your head explode...

Are we talking MSDE Here?

And I haven't specifically said it, but...

Don't do it that way...



Brett

8-)
Go to Top of Page
   

- Advertisement -