Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

cursor or case statement?

$
0
0

PartyTypeID FunctionType 4 Display Name 5 Organization Name 6 Band Name 7 Alias 8 Venue Name 9 Legal Name 10 Abbreviated Name

I have table like above in Relational database form, I am working on store PROC. My

task is to modify proc in such a way that---One condition if there is existing Organization Name

in other reference table then insert as an Alias--another condition if organization name

is noted by venue name, Band Name or Legal name then insert all the records as below

party Id Function Type

5 Organization Name

5 Venue Name

5 Band name

5 legal Name and so on-----

Party Type ID 4 and 5 can not come together combination can be like 4,6,7,8,9 or 5,6,7,8,9

Why 4 and 5 can not come together is both are separate eg

Buyer 1 (display name individual person) and Buyer 2 (Org)i.e

company






Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>