Click here to Skip to main content
15,887,214 members
Home / Discussions / Database
   

Database

 
GeneralRe: Convert date formate 4th april 2008 to default date formate Pin
Paddy Boyd16-Apr-08 23:23
Paddy Boyd16-Apr-08 23:23 
GeneralView verses Table-Values Function Pin
Werries16-Apr-08 19:53
Werries16-Apr-08 19:53 
GeneralRe: View verses Table-Values Function Pin
Ashfield16-Apr-08 21:03
Ashfield16-Apr-08 21:03 
GeneralGetting Top 5 from table of same category Pin
honeyss16-Apr-08 19:23
honeyss16-Apr-08 19:23 
GeneralRe: Getting Top 5 from table of same category Pin
ChandraRam16-Apr-08 20:08
ChandraRam16-Apr-08 20:08 
GeneralRe: Getting Top 5 from table of same category Pin
honeyss16-Apr-08 22:38
honeyss16-Apr-08 22:38 
GeneralRe: Getting Top 5 from table of same category Pin
ChandraRam17-Apr-08 1:33
ChandraRam17-Apr-08 1:33 
QuestionSql Query Pin
~V~16-Apr-08 1:44
~V~16-Apr-08 1:44 
I m facing a problem in this query


select a.eventid,b.name,convert(nvarchar,c.assigndate,106)as assigndate,<br />
convert(nvarchar,a.eventdate,106)as eventdate,a.event,a.details,a.eventtype from event as a left outer join emp <br />
as c on a.eventid=c.eventid left outer join user_info as b on b.userid=c.userid <br />
where(a.eventtype='Single Month' or(a.eventtype='All Month' and <br />
(select substring(convert(nvarchar,edate,102),9,4) from event where eventtype='All Month')>( select substring(convert(nvarchar,getdate(),102),9,4)) ))order by a.eventdateselect * from event<br />
<br />


In event table there are some fields like eventid,eventdate,eventtype n etc
In user_info there are userid, name n etc fields

i wanna get all record when
1> eventtype is Single Month and the eventdate is in current month n eventdate is heigher than currentdate
2> eventype is All Month and eventdate is heigher than current date


eventid -----eventdate ------- eventtype
1 -----2008-04-15 00:00:00 ----- All Month

2 -----2008-04-20 00:00:00 ----- Single Month

3 -----2008-04-16 00:00:00 ----- Single Month

4 -----2008-04-16 00:00:00 ----- All Month



The answer shd be eventid 2,3,4

The Great Pleasure In Doing That Things That Other People Say U Can't By Doing This U Can Shut Their Mouth

GeneralRe: Sql Query Pin
Ashfield16-Apr-08 4:43
Ashfield16-Apr-08 4:43 
QuestionFetch DB2 table data into MS-Excel Pin
Jay_se15-Apr-08 22:57
Jay_se15-Apr-08 22:57 
GeneralRe: Fetch DB2 table data into MS-Excel Pin
ChandraRam16-Apr-08 1:27
ChandraRam16-Apr-08 1:27 
GeneralRe: Fetch DB2 table data into MS-Excel Pin
Jay_se16-Apr-08 19:49
Jay_se16-Apr-08 19:49 
QuestionRegarding sum of a column Pin
mrcsn15-Apr-08 21:41
mrcsn15-Apr-08 21:41 
AnswerRe: Regarding sum of a column Pin
Mycroft Holmes15-Apr-08 22:21
professionalMycroft Holmes15-Apr-08 22:21 
GeneralRe: Regarding sum of a column Pin
mrcsn21-Apr-08 19:56
mrcsn21-Apr-08 19:56 
GeneralRe: Regarding sum of a column Pin
Pete O'Hanlon15-Apr-08 23:24
mvePete O'Hanlon15-Apr-08 23:24 
GeneralRe: Regarding sum of a column Pin
ChandraRam16-Apr-08 1:23
ChandraRam16-Apr-08 1:23 
QuestionRe: Regarding sum of a column Pin
mrcsn17-Apr-08 2:51
mrcsn17-Apr-08 2:51 
QuestionRe: Regarding sum of a column Pin
mrcsn21-Apr-08 20:00
mrcsn21-Apr-08 20:00 
GeneralRe: Regarding sum of a column Pin
ChandraRam21-Apr-08 20:10
ChandraRam21-Apr-08 20:10 
GeneralRe: Regarding sum of a column Pin
mrcsn21-Apr-08 20:27
mrcsn21-Apr-08 20:27 
GeneralRe: Regarding sum of a column Pin
ChandraRam21-Apr-08 20:53
ChandraRam21-Apr-08 20:53 
Questionsqldmo backup issue (Cannot open backup device) Pin
JoZ CaVaLLo15-Apr-08 21:36
JoZ CaVaLLo15-Apr-08 21:36 
GeneralRe: sqldmo backup issue (Cannot open backup device) Pin
SimulationofSai16-Apr-08 1:24
SimulationofSai16-Apr-08 1:24 
GeneralConnection of MS-Access 2007 to VC++2005 Pin
Le@rner15-Apr-08 19:56
Le@rner15-Apr-08 19:56 

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.