Click here to Skip to main content
15,885,155 members
Home / Discussions / Database
   

Database

 
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 
GeneralRe: put a condition in join query Pin
demoninside912-Mar-13 20:49
demoninside912-Mar-13 20:49 
GeneralRe: put a condition in join query Pin
Mycroft Holmes12-Mar-13 22:23
professionalMycroft Holmes12-Mar-13 22:23 
GeneralRe: put a condition in join query Pin
demoninside912-Mar-13 22:39
demoninside912-Mar-13 22:39 
QuestionHow to Recover the Data if the Delete Query is Fire?? Pin
Anubhava Dimri11-Mar-13 22:11
Anubhava Dimri11-Mar-13 22:11 
AnswerRe: How to Recover the Data if the Delete Query is Fire?? Pin
Mycroft Holmes11-Mar-13 22:40
professionalMycroft Holmes11-Mar-13 22:40 
GeneralRe: How to Recover the Data if the Delete Query is Fire?? Pin
Anubhava Dimri11-Mar-13 23:44
Anubhava Dimri11-Mar-13 23:44 
Questiondatabase design for a self food ordering system? Pin
suryakanthithommy11-Mar-13 6:40
suryakanthithommy11-Mar-13 6:40 
AnswerRe: database design for a self food ordering system? Pin
Sandeep Mewara11-Mar-13 7:04
mveSandeep Mewara11-Mar-13 7:04 
Questionwhy i am unable to retrieve holiday name Pin
Member 870181310-Mar-13 22:35
Member 870181310-Mar-13 22:35 
AnswerRe: why i am unable to retrieve holiday name Pin
Mycroft Holmes10-Mar-13 23:20
professionalMycroft Holmes10-Mar-13 23:20 
GeneralRe: why i am unable to retrieve holiday name Pin
Member 870181311-Mar-13 4:31
Member 870181311-Mar-13 4:31 
QuestionBCP - Exported files (docx, xlsx & pptx) are corrupted Pin
ragasai10-Mar-13 16:52
ragasai10-Mar-13 16:52 
QuestionDatabase design for E commerce web site Pin
subbaraogaddam8-Mar-13 19:44
subbaraogaddam8-Mar-13 19:44 
AnswerRe: Database design for E commerce web site Pin
gvprabu8-Mar-13 20:04
gvprabu8-Mar-13 20: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.