Click here to Skip to main content
15,901,035 members
Home / Discussions / Database
   

Database

 
AnswerRe: Persisted Primary Key? Pin
Mycroft Holmes13-Mar-13 21:18
professionalMycroft Holmes13-Mar-13 21:18 
GeneralRe: Persisted Primary Key? Pin
H JJ13-Mar-13 23:14
H JJ13-Mar-13 23:14 
AnswerRe: Persisted Primary Key? Pin
Eddy Vluggen14-Mar-13 1:20
professionalEddy Vluggen14-Mar-13 1:20 
GeneralRe: Persisted Primary Key? Pin
Jörgen Andersson14-Mar-13 7:21
professionalJörgen Andersson14-Mar-13 7:21 
QuestionWant to get data on weekly basis Pin
VishwaKL12-Mar-13 23:07
VishwaKL12-Mar-13 23:07 
AnswerRe: Want to get data on weekly basis Pin
Mycroft Holmes13-Mar-13 2:15
professionalMycroft Holmes13-Mar-13 2:15 
AnswerRe: Want to get data on weekly basis Pin
Davidduraisamy13-Mar-13 20:44
Davidduraisamy13-Mar-13 20:44 
GeneralRe: Want to get data on weekly basis Pin
VishwaKL14-Mar-13 22:16
VishwaKL14-Mar-13 22:16 
GeneralRe: Want to get data on weekly basis Pin
Davidduraisamy14-Mar-13 22:23
Davidduraisamy14-Mar-13 22:23 
GeneralRe: Want to get data on weekly basis Pin
VishwaKL17-Mar-13 23:02
VishwaKL17-Mar-13 23:02 
QuestionClarification on SQL Server Function? Pin
H JJ12-Mar-13 19:34
H JJ12-Mar-13 19:34 
AnswerRe: Clarification on SQL Server Function? Pin
Shameel12-Mar-13 20:26
professionalShameel12-Mar-13 20:26 
GeneralMessage Closed Pin
12-Mar-13 22:54
H JJ12-Mar-13 22:54 
GeneralRe: Clarification on SQL Server Function? Pin
Shameel12-Mar-13 23:01
professionalShameel12-Mar-13 23:01 
AnswerRe: Clarification on SQL Server Function? Pin
Mycroft Holmes12-Mar-13 20:44
professionalMycroft Holmes12-Mar-13 20:44 
GeneralMessage Closed Pin
12-Mar-13 22:55
H JJ12-Mar-13 22:55 
GeneralRe: Clarification on SQL Server Function? Pin
Mycroft Holmes13-Mar-13 21:20
professionalMycroft Holmes13-Mar-13 21:20 
AnswerRe: Clarification on SQL Server Function? Pin
uspatel13-Mar-13 2:00
professionaluspatel13-Mar-13 2:00 
QuestionArithmetic overflow error converting expression to data type nvarchar. Pin
Vimalsoft(Pty) Ltd12-Mar-13 10:19
professionalVimalsoft(Pty) Ltd12-Mar-13 10:19 
AnswerRe: Arithmetic overflow error converting expression to data type nvarchar. Pin
Mycroft Holmes12-Mar-13 12:35
professionalMycroft Holmes12-Mar-13 12:35 
AnswerRe: Arithmetic overflow error converting expression to data type nvarchar. Pin
Richard Deeming13-Mar-13 2:18
mveRichard Deeming13-Mar-13 2:18 
Questionput a condition in join query Pin
demoninside912-Mar-13 1:38
demoninside912-Mar-13 1:38 
<pre>hi all below is my Store Proc

SELECT vb.Sno,
vb.Vehicle_Number,
vb.Vehicle_Booking_Date,
vb.Time_From,
vb.Time_To,
vb.Vehicle_Used_By,
vb.Cost_Code,
vb.Budget_Line,
lb.Vehicle_Number,
lb.Vehicle_Booking_Date,
lb.Time_From,
lb.Time_To,
lb.KM_Start,
lb.KM_End,
lb.Vehicle_Used_By,
lb.Cost_Code,
lb.Budget_Line
FROM mtblVehicle_Booking vb
LEFT JOIN mtblLog_Book lb
ON vb.Sno = lb.Sno
where vb.Vehicle_Number = @Vehicle_Number
AND DATEPART(MONTH,vb.Vehicle_Booking_Date) = MONTH(getdate())

it is working fine. But here I need to put a condition, it should give priority to mtblLog_Book means if mtblLog_Book having data then it should show from mtblLog_Book table otherwise it should shows data from mtblVehicle_Booking for a particular Sno.

Actually firstly on the behalf of mtblVehicle_Booking I am binding a Gridview after updating the data it should show the data from mtblLog_Book.

So let me know please how to put a condition in my sp.

Thanks</pre>
AnswerRe: put a condition in join query Pin
Jörgen Andersson12-Mar-13 2:19
professionalJörgen Andersson12-Mar-13 2:19 
GeneralRe: put a condition in join query Pin
demoninside912-Mar-13 18:47
demoninside912-Mar-13 18:47 
GeneralRe: put a condition in join query Pin
Mycroft Holmes12-Mar-13 20:40
professionalMycroft Holmes12-Mar-13 20:40 

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.