Click here to Skip to main content
15,902,112 members
Home / Discussions / Database
   

Database

 
GeneralRe: Get Data Type of field/column? Pin
myNameIsRon25-Mar-08 9:18
myNameIsRon25-Mar-08 9:18 
Questionhow to add 7 days to my date filter Pin
hassanasp24-Mar-08 9:35
hassanasp24-Mar-08 9:35 
AnswerRe: how to add 7 days to my date filter Pin
Pete O'Hanlon24-Mar-08 10:42
mvePete O'Hanlon24-Mar-08 10:42 
AnswerRe: how to add 7 days to my date filter Pin
Sankar Komma 27-Mar-08 8:19
Sankar Komma 27-Mar-08 8:19 
GeneralComplicated query issue: need to specify strict return Pin
Vodstok24-Mar-08 8:49
Vodstok24-Mar-08 8:49 
GeneralRe: Complicated query issue: need to specify strict return Pin
Pete O'Hanlon24-Mar-08 10:45
mvePete O'Hanlon24-Mar-08 10:45 
GeneralRe: Complicated query issue: need to specify strict return Pin
A Wong25-Mar-08 5:11
A Wong25-Mar-08 5:11 
GeneralRe: Complicated query issue: need to specify strict return Pin
Vodstok25-Mar-08 6:01
Vodstok25-Mar-08 6:01 
your code is a thing of beauty Smile | :)

i modified it to run against the table i was using and was getting the same results i was getting before, whihc confused me because looking at it, it definatley said exaclty what i needed. so i opened a new view and plugged it in and started playing with it. the first thing i did was change it to show the results from a and b, and bingo, there it was. with this, i dont need the top 2 rows, just the top 1 with the nd date set to order by desc, and tada, i had the exact results i was looking for. so here is what i used:

SELECT     TOP (1) a.nvarchar, b.nvarchar AS nvarchar2, b.int, a.int AS int2, a.StartDate, b.StartDate AS StartDate2, <br />
                      a.EndDate, b.EndDate AS EndDate2<br />
FROM         [table] AS a INNER JOIN<br />
                      [table] AS b ON a.int = b.int AND a.nvarchar <> b.nvarchar AND <br />
                      b.EndDate < getdate() AND a.EndDate < GETDATE() <br />
ORDER BY int2 DESC


Thank you very much for this, you saved me a massive headache. And thank you to everyone that replied, i appreciate any input Big Grin | :-D

______________________
Mr Griffin, eleventy billion is not a number...WTF | :WTF:

QuestionVBA Access 2003 Error 2749 Pin
cyberE-gor24-Mar-08 6:40
cyberE-gor24-Mar-08 6:40 
Generalnewbee ado.net Pin
Mogaambo24-Mar-08 4:08
Mogaambo24-Mar-08 4:08 
GeneralRe: newbee ado.net Pin
pmarfleet24-Mar-08 4:36
pmarfleet24-Mar-08 4:36 
GeneralHandling Uncommited transanction when system terminated abnormally ! ( Please reply, it`s urgent) [modified] Pin
Member 470820224-Mar-08 2:53
Member 470820224-Mar-08 2:53 
GeneralRe: Handling Uncommited transanction when system terminated abnormally ! ( Please reply, it`s urgent) Pin
Mark J. Miller24-Mar-08 6:58
Mark J. Miller24-Mar-08 6:58 
GeneralRe: Handling Uncommited transanction when system terminated abnormally ! ( Please reply, it`s urgent) Pin
Member 470820224-Mar-08 18:08
Member 470820224-Mar-08 18:08 
GeneralRe: Handling Uncommited transanction when system terminated abnormally ! ( Please reply, it`s urgent) Pin
Pete O'Hanlon24-Mar-08 11:18
mvePete O'Hanlon24-Mar-08 11:18 
GeneralRe: Handling Uncommited transanction when system terminated abnormally ! ( Please reply, it`s urgent) Pin
Member 470820224-Mar-08 18:01
Member 470820224-Mar-08 18:01 
GeneralRe: Handling Uncommited transanction when system terminated abnormally ! ( Please reply, it`s urgent) Pin
Pete O'Hanlon24-Mar-08 23:09
mvePete O'Hanlon24-Mar-08 23:09 
QuestionHow can I ????????????? Pin
Mogaambo24-Mar-08 2:51
Mogaambo24-Mar-08 2:51 
AnswerRe: How can I ????????????? Pin
sarvesh.upadhyay24-Mar-08 3:15
professionalsarvesh.upadhyay24-Mar-08 3:15 
AnswerRe: How can I ????????????? Pin
hassanasp24-Mar-08 9:39
hassanasp24-Mar-08 9:39 
Generalquestion about retrieving Pin
johland24-Mar-08 2:21
johland24-Mar-08 2:21 
GeneralInsertion in table Pin
Syed Mujtaba Hassan23-Mar-08 22:37
Syed Mujtaba Hassan23-Mar-08 22:37 
GeneralRe: Insertion in table Pin
N a v a n e e t h23-Mar-08 23:20
N a v a n e e t h23-Mar-08 23:20 
GeneralRe: Insertion in table Pin
Syed Mujtaba Hassan23-Mar-08 23:24
Syed Mujtaba Hassan23-Mar-08 23:24 
GeneralRe: Insertion in table [modified] Pin
SimulationofSai23-Mar-08 23:32
SimulationofSai23-Mar-08 23:32 

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.