Click here to Skip to main content
15,896,557 members
Home / Discussions / Database
   

Database

 
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

QuestionHow to get Connection.GetSchema("columns",restrictions) in order by ordinal position Pin
ashish bhakhar20-Mar-08 1:27
ashish bhakhar20-Mar-08 1:27 
QuestionHow to get connection.schema("columns",restrictions) in order by ordinal position Pin
ashish bhakhar20-Mar-08 0:58
ashish bhakhar20-Mar-08 0:58 
AnswerRe: How to get connection.schema("columns",restrictions) in order by ordinal position Pin
Mark J. Miller20-Mar-08 11:06
Mark J. Miller20-Mar-08 11:06 
GeneralRe: How to get connection.schema("columns",restrictions) in order by ordinal position Pin
ashish bhakhar20-Mar-08 19:57
ashish bhakhar20-Mar-08 19:57 
Generaldata tables for a job site Pin
AbhishekAgarwal1519-Mar-08 22:04
AbhishekAgarwal1519-Mar-08 22:04 
GeneralRe: data tables for a job site Pin
Ashfield19-Mar-08 22:43
Ashfield19-Mar-08 22:43 
GeneralRe: data tables for a job site Pin
Pete O'Hanlon22-Mar-08 9:31
mvePete O'Hanlon22-Mar-08 9:31 
GeneralRe: data tables for a job site Pin
KrisnNala25-Mar-08 9:09
KrisnNala25-Mar-08 9:09 
QuestionOCP Pin
KambojR19-Mar-08 21:56
KambojR19-Mar-08 21:56 
GeneralRe: OCP Pin
Ashfield20-Mar-08 3:20
Ashfield20-Mar-08 3:20 
Questionhow do I use sql triggers to replicate update changes across two different databases Pin
GDMFSOB19-Mar-08 20:56
GDMFSOB19-Mar-08 20:56 
GeneralRe: how do I use sql triggers to replicate update changes across two different databases Pin
andyharman20-Mar-08 0:26
professionalandyharman20-Mar-08 0:26 
AnswerRe: how do I use sql triggers to replicate update changes across two different databases Pin
GDMFSOB20-Mar-08 1:58
GDMFSOB20-Mar-08 1:58 
Generallooping in SQL Server2005 Pin
salon19-Mar-08 20:32
salon19-Mar-08 20:32 
GeneralRe: looping in SQL Server2005 Pin
N a v a n e e t h19-Mar-08 20:44
N a v a n e e t h19-Mar-08 20:44 
GeneralRe: looping in SQL Server2005 Pin
salon19-Mar-08 21:00
salon19-Mar-08 21:00 
GeneralRe: looping in SQL Server2005 Pin
Tobias Schoenig20-Mar-08 0:26
Tobias Schoenig20-Mar-08 0:26 

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.