SQl

Datetime difference between two timestamps excluding weekend(sat,sun) in SQL

I am currently taking the difference between two date time field to calculate the time taken in between the two steps.
Now I need to calculate the time difference excluding the weekend...IN SQL
Please help on this....

How to insert values into table based on condition from another table

Hi,

Can anyone help me in inserting a value into table based on values from another table.

for Example
____________________________________________________________

i want to insert value "a" if value a particular value in the other table is "c" and i want to insert value "b" if value in the others table is "d"

i hope i am not making it too complex

Thanks in advance!!!

SQL Question on Full Outer Join

Hi, I am writing a sql select statement. First, I need to get all courses and if they have textbooks, include the textbooks. (this is my new data extract). That's the first select and it works great. Then I need to take this file and do a full outer join with another file. (this is my previous old data extract, it does contain some extra fields, so not the exact same table layout). I should get a mixture of some records are only in the first select, others in both files and some only in the file I'm joining with.

Help me with this SQL

Hi I have a table called EMPDET with Emplid and Deptid as keys and values are as shown below.

Emplid Deptid Desc
1 A TEST
2 A TEST
3 A ABC
4 A TEST
5 B XYZ
6 B XYZ
7 B xyz
8 C TEST2
9 C STH
10 C TEST2
11 D STG
12 D STG
13 D STG

I need to write a query which will fetch below results. It should pick only dupilcate combination

Expected results:

A TEST
A ABC
C STH
C TEST2

Thanks,
Kris

How to view the employees from particular country in peoplesoft?

HI

How to view the employees from particular country in peoplesoft?
The employess should be the hired in that particular country only. Please give me the query if anybody have idea on that.

Thanks in advance

Regards,
Tammy

Help with Security Script

I could really use someone's expertise knowledge, regarding security in PeopleSoft.

compare data from two identical tables

hi guys i am tryin to compare data from two identical tables E6900 and M9000 and this my DBlink ops$mis_exec.mis_sub_prof@prod
so my query is as follows i am not sure whether i am on the right track

select * from ops$mis_exec.mis_sub_prof@prod minus select * from ops$mis_exec.mis_sub_prof;