1 Replies - 771 Views - Last Post: 19 July 2012 - 06:04 AM

#1 G_rose42  Icon User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 51
  • Joined: 15-December 10

problem SQL select Query with some coditions

Posted 19 July 2012 - 05:41 AM

i have 5 tables, i want to update one field in table5 after all my conditions got true with tables-1,2,3 and 4.
i want to do all these in single stored procedure.

condition 1:table 1 contains a field Hid=1 (partno)
table 2 should have min 2 records for that id [like head table line table relationship]
ex(table-2):
no Hid part_name value
------------------------
11 1 a 52
12 1 b 62
condition 2:
table3 should have minimum 2 records for each table-2 values

ex:(table-3 )
-----------------------
111 11 mk 0.12
112 11 hk 0.13
113 12 rr 0.45
114 12 tr 0.32

condition 3:
table 4 must contains min 1 records for each table 3 values

ex:(table-4)
----------------------
1111 111 name1
1112 112 name2
1113 113 name3
1114 114 name4

after all the above conditions satisfied i want to update one field in table 5
:helpsmilie:
Thank you in advance

Is This A Good Question/Topic? 0
  • +

Replies To: problem SQL select Query with some coditions

#2 DarenR  Icon User is offline

  • D.I.C Lover

Reputation: 463
  • View blog
  • Posts: 3,175
  • Joined: 12-January 10

Re: problem SQL select Query with some coditions

Posted 19 July 2012 - 06:04 AM

can you show us what you have written so far? put it in a [code] tag
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1