Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Help to get record for MAX REV ID Expand / Collapse
Author
Message
Posted Tuesday, April 16, 2013 1:07 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Thursday, April 10, 2014 1:38 PM
Points: 90, Visits: 181
Hi friends,

I ave 3 tables-
1) JP,
2) WO,
the JP and WO are rellated by column : JP ID

Now the problem Im facing is that a JP can have mutiple WOs example-

JP1234 , WO67,WO69 and each WO has a revision # - say REV#1, and REV#2 and per my business requirement I want to get the WO with the highest REV# FROM JP -when I join these tables but that is not happening-
below is the Left Inner Join I'm using-

--

FROM JP
-join on [WO] with [JP]
left outer join [WorkForce_WorkOrder]
on [JP].[JP_ID] = [WO].[JP_JP]
THANKS
dHANANJAY
Post #1442964
Posted Tuesday, April 16, 2013 1:14 PM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Yesterday @ 9:02 PM
Points: 20,734, Visits: 32,515
Sorry, but there really isn't anything in your post with which to work with here. We can't see what you see.

Pleasse read the first article I reference below in my signature block. It will walk you through what you need to post and how to post it to get the best possible answers quickly. In return for the extra work you do up front to help us help you, you get tested code in return.



Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Post #1442967
Posted Tuesday, April 16, 2013 2:01 PM
SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Thursday, April 10, 2014 1:38 PM
Points: 90, Visits: 181
No worries Lynn i was able to resolve it.
Sorry I bothered you for this

thanks
DJ
Post #1442996
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse