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

Database

 
QuestionAudti triggers - How to get the user name into the audit table [modified] Pin
Simon P Stevens24-Mar-09 1:54
Simon P Stevens24-Mar-09 1:54 
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 
I am trying to select data from tables A and B

SELECT A.* , B.*
FROM A INNER JOIN B ON A.Id = B.Id
WHERE (A.Id=@id) AND(A.Date BETWEEN B.Date1 AND B.Date2)

the problem appears that fields B.Date1 and B.Date2 are not necessary containing data,
they can be null. so, my solution is

WHERE (A.Id=@id) AND
(A.Date BETWEEN CASE B.Date1 WHEN null THEN @DateMin ELSE B.Date1 END
AND CASE B.Date2 WHEN null THEN @DateMax ELSE B.Date2 END)

when i run this select i get error:
"The version of sql server in use does not support datatype 'udt'"

i can't figure out why i get this error. is there something to do with
@DateMin and @DateMax format ?? i think i am using the right format

can anybody help me,
thanks
AnswerRe: Problem with CASE statement in WHERE clause Pin
Ashfield24-Mar-09 2:27
Ashfield24-Mar-09 2:27 
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 

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.