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

Database

 
QuestionHelp with Calculations Pin
Vimalsoft(Pty) Ltd21-Mar-12 21:44
professionalVimalsoft(Pty) Ltd21-Mar-12 21:44 
AnswerRe: Help with Calculations Pin
Blue_Boy21-Mar-12 22:42
Blue_Boy21-Mar-12 22:42 
AnswerRe: Help with Calculations Pin
PIEBALDconsult22-Mar-12 3:16
mvePIEBALDconsult22-Mar-12 3:16 
GeneralRe: Help with Calculations Pin
Vimalsoft(Pty) Ltd22-Mar-12 6:13
professionalVimalsoft(Pty) Ltd22-Mar-12 6:13 
Questionasp.net Pin
smart5521-Mar-12 19:39
smart5521-Mar-12 19:39 
AnswerRe: asp.net Pin
Mycroft Holmes21-Mar-12 20:19
professionalMycroft Holmes21-Mar-12 20:19 
AnswerRe: asp.net Pin
solutions@ashish21-Mar-12 22:47
solutions@ashish21-Mar-12 22:47 
QuestionSQL queries for multiple columns depends on same column of another table Pin
AhmedMasum19-Mar-12 8:21
AhmedMasum19-Mar-12 8:21 
See the following scenario:

Tables for the question:

SQL
Table : T1
c10  c12
---  ----
e1   A
e2   B
e3   C

Table: T2

c1  c2  c3  c4  c5   C6
--- -- --- ---  ---  ---
1   P  e1  e2   null  X
2   Q  e3  null null  Y
3   R  e2  e1   null  X
4   S  e3  e1   e2    Z


The c3, c4 and c5 columns of T2 table depends on c12 column of T1 table.

I want the following output:


c1  c2  c3  c4  c5
--- -- --- ---  ---
1   P   A   B   null
2   Q   C  null null
3   R   B   A   null
4   S   C   A   B



Can you help me to write an SQL to retrieve the above output from the table T1 and T2?

The SQL may be like:

SQL
Select c1, c2, t1.c12 as c3....... from t1, t2 where join condition


But I am not getting the actual sql in my mind.
So please help me regarding this.
AnswerRe: SQL queries for multiple columns depends on same column of another table Pin
JOAT-MON19-Mar-12 13:57
JOAT-MON19-Mar-12 13:57 
AnswerRe: SQL queries for multiple columns depends on same column of another table Pin
Blue_Boy20-Mar-12 3:20
Blue_Boy20-Mar-12 3:20 
QuestionHow to do insertion automatically Pin
siddisagar18-Mar-12 23:23
siddisagar18-Mar-12 23:23 
AnswerRe: How to do insertion automatically Pin
Chris Meech19-Mar-12 2:30
Chris Meech19-Mar-12 2:30 
GeneralRe: How to do insertion automatically Pin
ZurdoDev19-Mar-12 6:04
professionalZurdoDev19-Mar-12 6:04 
AnswerRe: How to do insertion automatically Pin
PIEBALDconsult19-Mar-12 3:28
mvePIEBALDconsult19-Mar-12 3:28 
AnswerRe: How to do insertion automatically Pin
Jörgen Andersson19-Mar-12 8:03
professionalJörgen Andersson19-Mar-12 8:03 
QuestionDatabase Replication Pin
snouto18-Mar-12 19:19
snouto18-Mar-12 19:19 
AnswerRe: Database Replication Pin
Corporal Agarn19-Mar-12 4:45
professionalCorporal Agarn19-Mar-12 4:45 
AnswerRe: Database Replication Pin
UNCRushFan19-Mar-12 5:41
UNCRushFan19-Mar-12 5:41 
Questionproblem in writing query for particular problem.. Pin
pankaj308618-Mar-12 7:48
pankaj308618-Mar-12 7:48 
AnswerRe: problem in writing query for particular problem.. Pin
PIEBALDconsult18-Mar-12 8:53
mvePIEBALDconsult18-Mar-12 8:53 
AnswerRe: problem in writing query for particular problem.. Pin
Mycroft Holmes18-Mar-12 14:20
professionalMycroft Holmes18-Mar-12 14:20 
GeneralRe: problem in writing query for particular problem.. Pin
pankajots18-Mar-12 17:36
pankajots18-Mar-12 17:36 
GeneralRe: problem in writing query for particular problem.. Pin
Mycroft Holmes18-Mar-12 19:33
professionalMycroft Holmes18-Mar-12 19:33 
Questionhow to insert mathematical symbols in database Pin
pankaj308617-Mar-12 20:45
pankaj308617-Mar-12 20:45 
AnswerRe: how to insert mathematical symbols in database Pin
Shameel18-Mar-12 6:04
professionalShameel18-Mar-12 6:04 

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.