Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 How to write Mapping for 3 master tables need to s
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Constraint Violating Yak Guru

252 Posts

Posted - 10/15/2012 :  08:37:24  Show Profile  Reply with Quote

hello all,

i had three master tables named (CsetProcedure,Csetloinc,Measures) and there PK Ids are there in 2 tables named ProcedureLoinCode and Loincode measure

Table columns like this for CsetProcedure and Csetloinc and Measures

ProcedureID, LoinCOdeId name

ProcedureCode, Description Description

Procedure name, StatusCode Sortorder

Description date

now the mapping of Csetprocedure and Csetloinc

for this table named ProcedureLoinCOde and LoinCodeMeasure

pk ProcedureLoinCOdeID PK LOinCodeMeasureID

ProcedureID, MeasureID

LoinCodeID LoinCOdeID

Description Description

Now i need to write store procedure like measuremapping_insertupdate and procedure mapping_insertupdate

here the criteria like csetloinc and Csetprocedure are for Procedureloincode table

and measures and csetloinc are for LoinCodemeasure table

output like

1 1

1 2

1 3

2 1


Very Important crosS Applying yaK Herder

52326 Posts

Posted - 10/15/2012 :  10:36:45  Show Profile  Reply with Quote
looks like an assignment
can we see what you tried yet?
Without seeing an attempt, we wont provide help in assignment questions

SQL Server MVP

Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.03 seconds. Powered By: Snitz Forums 2000