Click here to Skip to main content
15,913,773 members
Home / Discussions / Database
   

Database

 
QuestionJoining columns from two tables into one column Pin
RossouwDB1-Jul-10 22:05
RossouwDB1-Jul-10 22:05 
AnswerRe: Joining columns from two tables into one column Pin
David Skelly1-Jul-10 22:32
David Skelly1-Jul-10 22:32 
AnswerRe: Joining columns from two tables into one column Pin
Mycroft Holmes1-Jul-10 22:43
professionalMycroft Holmes1-Jul-10 22:43 
GeneralRe: Joining columns from two tables into one column Pin
RossouwDB1-Jul-10 22:54
RossouwDB1-Jul-10 22:54 
GeneralRe: Joining columns from two tables into one column Pin
Mycroft Holmes1-Jul-10 23:19
professionalMycroft Holmes1-Jul-10 23:19 
GeneralRe: Joining columns from two tables into one column Pin
Jörgen Andersson1-Jul-10 23:00
professionalJörgen Andersson1-Jul-10 23:00 
GeneralRe: Joining columns from two tables into one column Pin
Mycroft Holmes1-Jul-10 23:15
professionalMycroft Holmes1-Jul-10 23:15 
Questionreplace the value with different text in Select Pin
indian14330-Jun-10 15:30
indian14330-Jun-10 15:30 
I have a select statement which joins various tables. But there are two tables which specify nearly same thing but values are different. Because of which when joining its giving more rows than expected. Now I want these two tables to be included in join.
like for example QCV_Values table it has Type column as "Oxygen", "NEB" and "Sleep". In another table (arusers) these values are as "HME" and "SLP" in the column "GroupName". "Oxygen" and "NEB" comes under samething "HME".
I need to add these tables in to join to avoid duplicacy in the rows. Can any body please help me in achiving this. Except that everything is working fine.
Can anybody please help me in that.
I am putting my query here
And I have to join the Type with the GroupName, but there is no specific table to relate these two.

SELECT InstanceKey, Category, v.QCDesc, oi.CustCenterName, au.MgrName, oi.InsName1, oi.InsName2, 
oi.InsName3, oi.TherapyId, oi.PhysNum, oi.TherapyIdSlp, oi.PhysNumSlp, SalesPersonName
 FROM dbo.QCV_Instances i
JOIN dbo.vw_OrderIntake oi ON i.InstanceKey=oi.CustNum
--JOIN dbo.Center c ON oi.CustCenterId=c.CenterID 
JOIN dbo.arusers au ON oi.CustCenterId=au.CenterID
JOIN dbo.QCV_Values v ON v.QCID=i.QCValueId 

Thanks & Regards,

Md. Abdul Aleem
NIIT technologies

AnswerRe: replace the value with different text in Select Pin
Mycroft Holmes30-Jun-10 17:37
professionalMycroft Holmes30-Jun-10 17:37 
GeneralRe: replace the value with different text in Select Pin
CitrusTech30-Jun-10 19:41
CitrusTech30-Jun-10 19:41 
GeneralRe: replace the value with different text in Select Pin
indian14330-Jun-10 19:41
indian14330-Jun-10 19:41 
QuestionGet child table rows in parent column using sql server 2005 Pin
alisolution30-Jun-10 8:44
alisolution30-Jun-10 8:44 
AnswerRe: Get child table rows in parent column Pin
Jörgen Andersson30-Jun-10 9:54
professionalJörgen Andersson30-Jun-10 9:54 
AnswerRe: Get child table rows in parent column using sql server 2005 Pin
i.j.russell30-Jun-10 10:52
i.j.russell30-Jun-10 10:52 
QuestionFOR XML Path is giving error [modified] Pin
indian14329-Jun-10 13:55
indian14329-Jun-10 13:55 
AnswerRe: FOR XML Path is giving error Pin
Md. Marufuzzaman29-Jun-10 20:15
professionalMd. Marufuzzaman29-Jun-10 20:15 
QuestionRe: FOR XML Path is giving error Pin
i.j.russell29-Jun-10 23:06
i.j.russell29-Jun-10 23:06 
AnswerRe: FOR XML Path is giving error Pin
indian14330-Jun-10 7:34
indian14330-Jun-10 7:34 
GeneralRe: FOR XML Path is giving error Pin
i.j.russell30-Jun-10 10:39
i.j.russell30-Jun-10 10:39 
QuestionUnable to Connect to Sybase DB in Word 2007 Pin
MWRivera29-Jun-10 11:10
MWRivera29-Jun-10 11:10 
Questionsql functon Pin
Thanusree Duth29-Jun-10 0:01
Thanusree Duth29-Jun-10 0:01 
AnswerRe: sql functon PinPopular
Mycroft Holmes29-Jun-10 3:07
professionalMycroft Holmes29-Jun-10 3:07 
GeneralRe: sql functon Pin
Chris Meech29-Jun-10 6:56
Chris Meech29-Jun-10 6:56 
GeneralRe: sql functon Pin
Mycroft Holmes29-Jun-10 12:57
professionalMycroft Holmes29-Jun-10 12:57 
AnswerRe: sql functon Pin
Md. Marufuzzaman29-Jun-10 4:54
professionalMd. Marufuzzaman29-Jun-10 4:54 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.