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

Database

 
AnswerRe: Audti triggers - How to get the user name into the audit table Pin
Pete O'Hanlon24-Mar-09 2:15
mvePete O'Hanlon24-Mar-09 2:15 
GeneralRe: Audti triggers - How to get the user name into the audit table Pin
Simon P Stevens24-Mar-09 2:35
Simon P Stevens24-Mar-09 2:35 
QuestionCalling oracle stored procedure for crystal report Pin
Girish48124-Mar-09 0:32
Girish48124-Mar-09 0:32 
QuestionHow to store an image in PostGresDB? Pin
sunilsb23-Mar-09 22:58
sunilsb23-Mar-09 22:58 
QuestionSome Oracle Question Pin
E_Gold23-Mar-09 8:26
E_Gold23-Mar-09 8:26 
AnswerRe: Some Oracle Question Pin
scottgp23-Mar-09 10:20
professionalscottgp23-Mar-09 10:20 
GeneralRe: Some Oracle Question Pin
E_Gold23-Mar-09 10:51
E_Gold23-Mar-09 10:51 
GeneralRe: Some Oracle Question Pin
scottgp23-Mar-09 15:21
professionalscottgp23-Mar-09 15:21 
Questionwhat is mean by transaction in database? Pin
Ali_10023-Mar-09 7:04
Ali_10023-Mar-09 7:04 
Answertransaction as defined in Wikipedia Pin
David Mujica23-Mar-09 7:54
David Mujica23-Mar-09 7:54 
GeneralRe: transaction as defined in Wikipedia Pin
Ali_10023-Mar-09 10:26
Ali_10023-Mar-09 10:26 
GeneralROLLBACK Pin
David Mujica23-Mar-09 11:00
David Mujica23-Mar-09 11:00 
QuestionItem Stock detail using sale and purchase table [modified] Pin
adeelidrees23-Mar-09 2:36
adeelidrees23-Mar-09 2:36 
QuestionSqlDataReader Number of Rows Pin
Jasmine Pomelo23-Mar-09 2:05
Jasmine Pomelo23-Mar-09 2:05 
AnswerRe: SqlDataReader Number of Rows Pin
Eddy Vluggen23-Mar-09 2:20
professionalEddy Vluggen23-Mar-09 2:20 
GeneralRe: SqlDataReader Number of Rows Pin
Jasmine Pomelo23-Mar-09 2:28
Jasmine Pomelo23-Mar-09 2:28 
GeneralRe: SqlDataReader Number of Rows Pin
Eddy Vluggen23-Mar-09 2:55
professionalEddy Vluggen23-Mar-09 2:55 
GeneralRe: SqlDataReader Number of Rows Pin
Jasmine Pomelo23-Mar-09 3:10
Jasmine Pomelo23-Mar-09 3:10 
GeneralRe: SqlDataReader Number of Rows Pin
Pete O'Hanlon24-Mar-09 2:20
mvePete O'Hanlon24-Mar-09 2:20 
AnswerRe: SqlDataReader Number of Rows Pin
tech60324-Mar-09 13:24
tech60324-Mar-09 13:24 
QuestionProblem with CASE statement in WHERE clause Pin
marijus523-Mar-09 1:49
marijus523-Mar-09 1:49 
AnswerRe: Problem with CASE statement in WHERE clause Pin
Ashfield24-Mar-09 2:27
Ashfield24-Mar-09 2:27 
As far as I know, there is no such ptredefined variables as @DateMin and @DateMax - assuming you are using sql server.


Something like this should get you what you want

WHERE (A.Id=@id) AND 
(A.Date BETWEEN coalesce(B.Date1,A.Date) AND coalesce(B.Date2,A.Date))


The coalesce means take the first non-null value

Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP

GeneralRe: Problem with CASE statement in WHERE clause Pin
marijus524-Mar-09 5:33
marijus524-Mar-09 5:33 
GeneralRe: Problem with CASE statement in WHERE clause Pin
Ashfield24-Mar-09 10:31
Ashfield24-Mar-09 10:31 
GeneralRe: Problem with CASE statement in WHERE clause Pin
marijus524-Mar-09 13:24
marijus524-Mar-09 13:24 

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.