Here Is my code
select DISTINCT(A.Prod uctId),A.Regist rationDetailsId , ProductName+' '+B.Manufacture r+' '+B.ModelNo as ProductName,A.S erviceId, 0 AS ScheduleDetails Id,ServiceName, convert(varchar (20),A.Delivery Date,110) DeliveryDate, 0 AS EmployeeId, '' AS EmployeeName from TBL_ServiceRegi stration_Detail s A
JOIN TBL_ProductMast er B ON A.ProductId = B.ProductId
JOIN TBL_ServiceEntr y C ON A.ServiceId...
User Profile
Collapse
Profile Sidebar
Collapse
ranees ras
Last Activity: Dec 5 '13, 07:04 AM
Joined: Nov 13 '13
Location: tirur
-
Example of joining two tables in sql
-
did you got it ? @ck9663 -
-
Example Of Sql Joining
select A.RegistrationI d,B.CustomerNam e,ServiceNo as ServiceNo,conve rt(varchar(20), OrderDate,110) OrderDate,
D.ProductName,E .ServiceName,co nvert(varchar(2 0),C.DeliveryDa te,110) DeliveryDate
from TBL_ServiceRegi stration A
left OUTER JOIN TBL_CustomerMas ter B on A.CustomerId=B. CustomerId
left outer JOIN TBL_ServiceRegi stration_Detail s C on A.RegistrationI d=C.Registratio nId
left outer JOIN TBL_ProductMast er D ON C.ProductId=D.P roductId... -
ma question is.....how to find days between two dates using sql ??Leave a comment:
-
query to find days between two dates.
Code:DECLARE @startDate DATETIME DECLARE @endDate DATETIME SET @startDate = '2013-10-23' SET @endDate = '2013-10-31' ;WITH dates AS ( SELECT @startdate as Date,DATENAME(Dw,@startdate) As DayName UNION ALL SELECT DATEADD(d,1,[Date]),DATENAME(Dw,DATEADD(d,1,[Date])) as DayName FROM dates WHERE DATE < @enddate ) SELECT Date,DayName frOM datesLast edited by Rabbit; Nov 13 '13, 04:36 PM. Reason: Please use [CODE] and [/CODE] tags when posting code or formatted data.
No activity results to display
Show More
Leave a comment: