Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
Gray_Wolf
Starting Member
2 Posts |
Posted - 2011-06-09 : 17:08:36
|
| I am wondering if someone can help me out here. I am trying to create a query that will use the same column twice based about different criteria from another column in the same table.Here is what I have, but it isn't working. Any help would be great appreciated! Thanks.SELECT Job_Operation.Job AS "Job No.",Job_Operation.Sched_Start AS "Material Scheduled Start"(WHERE Job_Operation.Work_Center = 'MATERIAL'),Job_Operation.Sched_Start AS "Cutting Scheduled Start"(WHERE Job_Operation.Work_Center = 'CUTTING'),FROM Job_OperationINNER JOIN Job ON Job_Operation.Job = Job.JobWHERE Job.Status = 'Active'AND DATEDIFF (d, "Material Scheduled Start", "Cutting Scheduled Start") > 7 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
Gray_Wolf
Starting Member
2 Posts |
Posted - 2011-06-09 : 17:51:21
|
| I am new to this SQL queries.Can you help me out with the CASE THEN?Thanks. |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|
|