Click here to Skip to main content
14,356,706 members
   

Database

 
GeneralRe: Clarification on SQL Server Function? Pin
Shameel13-Mar-13 0:01
professionalShameel13-Mar-13 0:01 
AnswerRe: Clarification on SQL Server Function? Pin
Mycroft Holmes12-Mar-13 21:44
memberMycroft Holmes12-Mar-13 21:44 
GeneralRe: Clarification on SQL Server Function? Pin
Mycroft Holmes13-Mar-13 22:20
memberMycroft Holmes13-Mar-13 22:20 
AnswerRe: Clarification on SQL Server Function? Pin
uspatel13-Mar-13 3:00
professionaluspatel13-Mar-13 3:00 
QuestionArithmetic overflow error converting expression to data type nvarchar. Pin
Vimalsoft(Pty) Ltd12-Mar-13 11:19
professionalVimalsoft(Pty) Ltd12-Mar-13 11:19 
AnswerRe: Arithmetic overflow error converting expression to data type nvarchar. Pin
Mycroft Holmes12-Mar-13 13:35
memberMycroft Holmes12-Mar-13 13:35 
AnswerRe: Arithmetic overflow error converting expression to data type nvarchar. Pin
Richard Deeming13-Mar-13 3:18
mveRichard Deeming13-Mar-13 3:18 
Questionput a condition in join query Pin
demoninside912-Mar-13 2:38
memberdemoninside912-Mar-13 2: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 3:19
protectorJörgen Andersson12-Mar-13 3:19 
GeneralRe: put a condition in join query Pin
demoninside912-Mar-13 19:47
memberdemoninside912-Mar-13 19:47 
GeneralRe: put a condition in join query Pin
Mycroft Holmes12-Mar-13 21:40
memberMycroft Holmes12-Mar-13 21:40 
GeneralRe: put a condition in join query Pin
demoninside912-Mar-13 21:49
memberdemoninside912-Mar-13 21:49 
GeneralRe: put a condition in join query Pin
Mycroft Holmes12-Mar-13 23:23
memberMycroft Holmes12-Mar-13 23:23 
GeneralRe: put a condition in join query Pin
demoninside912-Mar-13 23:39
memberdemoninside912-Mar-13 23:39 
QuestionHow to Recover the Data if the Delete Query is Fire?? Pin
Anubhava Dimri11-Mar-13 23:11
memberAnubhava Dimri11-Mar-13 23:11 
AnswerRe: How to Recover the Data if the Delete Query is Fire?? Pin
Mycroft Holmes11-Mar-13 23:40
memberMycroft Holmes11-Mar-13 23:40 
GeneralRe: How to Recover the Data if the Delete Query is Fire?? Pin
Anubhava Dimri12-Mar-13 0:44
memberAnubhava Dimri12-Mar-13 0:44 
Questiondatabase design for a self food ordering system? Pin
suryakanthithommy11-Mar-13 7:40
membersuryakanthithommy11-Mar-13 7:40 
AnswerRe: database design for a self food ordering system? Pin
Sandeep Mewara11-Mar-13 8:04
mentorSandeep Mewara11-Mar-13 8:04 
Questionwhy i am unable to retrieve holiday name Pin
Member 870181310-Mar-13 23:35
memberMember 870181310-Mar-13 23:35 
AnswerRe: why i am unable to retrieve holiday name Pin
Mycroft Holmes11-Mar-13 0:20
memberMycroft Holmes11-Mar-13 0:20 
GeneralRe: why i am unable to retrieve holiday name Pin
Member 870181311-Mar-13 5:31
memberMember 870181311-Mar-13 5:31 
QuestionBCP - Exported files (docx, xlsx & pptx) are corrupted Pin
ragasai10-Mar-13 17:52
memberragasai10-Mar-13 17:52 
QuestionDatabase design for E commerce web site Pin
subbaraogaddam8-Mar-13 20:44
membersubbaraogaddam8-Mar-13 20:44 
AnswerRe: Database design for E commerce web site Pin
gvprabu8-Mar-13 21:04
membergvprabu8-Mar-13 21:04 

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.