Click here to Skip to main content
15,920,508 members
Home / Discussions / Database
   

Database

 
GeneralRe: Insertion in table [modified] Pin
SimulationofSai23-Mar-08 23:32
SimulationofSai23-Mar-08 23:32 
GeneralRe: Insertion in table Pin
Syed Mujtaba Hassan24-Mar-08 0:47
Syed Mujtaba Hassan24-Mar-08 0:47 
GeneralRe: Insertion in table Pin
Andy_L_J24-Mar-08 20:07
Andy_L_J24-Mar-08 20:07 
GeneralRe: Insertion in table Pin
Syed Mujtaba Hassan24-Mar-08 20:16
Syed Mujtaba Hassan24-Mar-08 20:16 
GeneralRe: Insertion in table Pin
Andy_L_J24-Mar-08 22:40
Andy_L_J24-Mar-08 22:40 
GeneralRe: Insertion in table Pin
Syed Mujtaba Hassan24-Mar-08 23:32
Syed Mujtaba Hassan24-Mar-08 23:32 
GeneralRe: Insertion in table Pin
Pete O'Hanlon25-Mar-08 11:35
mvePete O'Hanlon25-Mar-08 11:35 
GeneralRe: Insertion in table Pin
Syed Mujtaba Hassan25-Mar-08 18:31
Syed Mujtaba Hassan25-Mar-08 18:31 
GeneralRe: Insertion in table Pin
Pete O'Hanlon25-Mar-08 22:37
mvePete O'Hanlon25-Mar-08 22:37 
GeneralSQL CE 3.5 Install Pin
Jammer21-Mar-08 7:14
Jammer21-Mar-08 7:14 
QuestionBulk Copy one table data to other Pin
www.Developerof.NET21-Mar-08 2:08
www.Developerof.NET21-Mar-08 2:08 
QuestionHow to pass parameters into sql jobs using a stored procedure? Pin
ashish bhakhar21-Mar-08 0:07
ashish bhakhar21-Mar-08 0:07 
QuestionStructure of data relationship - which direction? Pin
Andy_L_J20-Mar-08 23:56
Andy_L_J20-Mar-08 23:56 
Questionstored porcedure ? Pin
Vijayitsb20-Mar-08 23:14
Vijayitsb20-Mar-08 23:14 
GeneralRe: stored porcedure ? Pin
John_Adams20-Mar-08 23:39
John_Adams20-Mar-08 23:39 
GeneralRe: stored porcedure ? Pin
ashish bhakhar21-Mar-08 0:15
ashish bhakhar21-Mar-08 0:15 
GeneralRetrieve and change an Identity column value... Pin
anderslundsgard20-Mar-08 22:30
anderslundsgard20-Mar-08 22:30 
GeneralRe: Retrieve and change an Identity column value... Pin
N a v a n e e t h20-Mar-08 23:08
N a v a n e e t h20-Mar-08 23:08 
GeneralRe: Retrieve and change an Identity column value... Pin
anderslundsgard21-Mar-08 1:41
anderslundsgard21-Mar-08 1:41 
GeneralRe: Retrieve and change an Identity column value... Pin
N a v a n e e t h21-Mar-08 1:46
N a v a n e e t h21-Mar-08 1:46 
GeneralRe: Retrieve and change an Identity column value... Pin
anderslundsgard25-Mar-08 5:12
anderslundsgard25-Mar-08 5:12 
GeneralRe: Retrieve and change an Identity column value... Pin
ashish bhakhar21-Mar-08 0:27
ashish bhakhar21-Mar-08 0:27 
GeneralSELECT SCOPE_IDENTITY() & INSERT Problems Pin
munklefish20-Mar-08 2:19
munklefish20-Mar-08 2:19 
GeneralRe: SELECT SCOPE_IDENTITY() & INSERT Problems Pin
Declan Bright20-Mar-08 2:36
Declan Bright20-Mar-08 2:36 
GeneralNeed sql query Pin
Exelioindia20-Mar-08 1:58
Exelioindia20-Mar-08 1:58 
Hi,

Any one suggest me how to write a sql query to execute the following.

I am having three tables as show below:

Table 1:

EmpID Name
1 aaa
2 bbb
3 ccc

Table 2:

SalID EmpID DesigID Salary
1 1 000000 000000
2 3 000000 000000

Table 3:
DesigID SalID DesigID Left
1 1 000000 false
2 2 000000 True


In the above i have to get the SalID,Salary details, based on the below condition

1. Based on the EmpId
2. The DesigID from table 3 should be retireved, but that DesigID should not be presented in Table 2(only those rows not presented in table 2 should be retrieved from table 3) based on the DesigID in both tables, also with one more condition.
3.Also i have to retrieve the rows from table 3 if the boolean value is true based on the SalID.

Am i clear with the above process? If no please kindly excuse me.

Any one please suggest me

Thanks in advance

Know is Drop, Unknown is Ocean

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.