Click here to Skip to main content
15,914,905 members
Home / Discussions / Database
   

Database

 
GeneralRe: @@IDENTITY and OleDbType Pin
andyharman7-Jul-03 8:39
professionalandyharman7-Jul-03 8:39 
GeneralRe: @@IDENTITY and OleDbType Pin
andyharman7-Jul-03 8:43
professionalandyharman7-Jul-03 8:43 
GeneralSQL server problem Pin
Shah Shehpori1-Jul-03 7:08
sussShah Shehpori1-Jul-03 7:08 
GeneralRe: SQL server problem Pin
basementman1-Jul-03 7:43
basementman1-Jul-03 7:43 
GeneralRe: SQL server problem Pin
Shah Shehpori1-Jul-03 18:08
sussShah Shehpori1-Jul-03 18:08 
GeneralRe: SQL server problem Pin
Daniel Turini3-Jul-03 9:41
Daniel Turini3-Jul-03 9:41 
GeneralMaxDate Pin
sardinka30-Jun-03 7:32
sardinka30-Jun-03 7:32 
GeneralRe: MaxDate Pin
basementman1-Jul-03 6:13
basementman1-Jul-03 6:13 
If this is against SQL Server or Oracle, you could create a stored proc to do this in two passes or get real complex using subqueries in one pass.

TWO PASS:
create procedure GetLastModDate
AS

declare @tStidDates (stid int NULL,
LastModDate smalldatetime NULL)

set nocount on

insert @tStidDates
(
stid,
LastModDate
)
select
A.stid,
MAX(A.Wid)
from
table2 a,
table 3 b
where
a.stid = b.stid
group by
a.stid

insert @tStidDates
(
stid,
LastModDate
)
select
A.stid,
MAX(A.eid)
from
table1 a,
table 3 b
where
a.stid = b.stid
group by
a.stid

select
stid,
MAX(LastModDate)
from
@tStidDates
group by
stid
order by 1



 onwards and upwards... 
GeneralRe: MaxDate Pin
sardinka1-Jul-03 9:39
sardinka1-Jul-03 9:39 
GeneralRe: MaxDate Pin
basementman1-Jul-03 9:41
basementman1-Jul-03 9:41 
GeneralEasy question ADO.net in VS .net Pin
Taylor Allen Software30-Jun-03 4:33
Taylor Allen Software30-Jun-03 4:33 
GeneralODBC connection question Pin
-- NA --29-Jun-03 21:54
-- NA --29-Jun-03 21:54 
GeneralRe: ODBC connection question Pin
-- NA --29-Jun-03 22:16
-- NA --29-Jun-03 22:16 
GeneralRe: ODBC connection question Pin
basementman30-Jun-03 5:58
basementman30-Jun-03 5:58 
GeneralUsing ADO, how to detect a table exists.. Pin
IrishSonic29-Jun-03 7:38
IrishSonic29-Jun-03 7:38 
GeneralRe: Using ADO, how to detect a table exists.. Pin
Jason McBurney30-Jun-03 4:33
Jason McBurney30-Jun-03 4:33 
GeneralRe: Using ADO, how to detect a table exists.. Pin
Gaurav Bindlish8-Jul-03 9:49
Gaurav Bindlish8-Jul-03 9:49 
GeneralRobust Remote Connections Pin
Roger Wright27-Jun-03 8:49
professionalRoger Wright27-Jun-03 8:49 
GeneralRe: Robust Remote Connections Pin
basementman27-Jun-03 10:26
basementman27-Jun-03 10:26 
GeneralRe: Robust Remote Connections Pin
Roger Wright27-Jun-03 10:57
professionalRoger Wright27-Jun-03 10:57 
GeneralFiltering Distinct information from a DataSet Pin
Jason McBurney27-Jun-03 7:48
Jason McBurney27-Jun-03 7:48 
GeneralRe: Filtering Distinct information from a DataSet Pin
Joshua Nussbaum27-Jun-03 8:42
Joshua Nussbaum27-Jun-03 8:42 
GeneralRe: Filtering Distinct information from a DataSet Pin
Jason McBurney27-Jun-03 9:15
Jason McBurney27-Jun-03 9:15 
GeneralRe: Filtering Distinct information from a DataSet Pin
Joshua Nussbaum27-Jun-03 9:19
Joshua Nussbaum27-Jun-03 9:19 
GeneralCUBE, PIVOT and my head Pin
Paul Watson26-Jun-03 4:58
sitebuilderPaul Watson26-Jun-03 4:58 

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.