User Profile

Collapse

Profile Sidebar

Collapse
ranees ras
ranees ras
Last Activity: Dec 5 '13, 07:04 AM
Joined: Nov 13 '13
Location: tirur
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • ranees ras
    started a topic Example of joining two tables in sql

    Example of joining two tables in sql

    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...
    See more | Go to post

  • did you got it ? @ck9663
    See more | Go to post

    Leave a comment:


  • ranees ras
    replied to Example Of Sql Joining
    It wont work...itz just an example of sql left outer joining
    See more | Go to post

    Leave a comment:


  • ranees ras
    started a topic Example Of Sql Joining

    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...
    See more | Go to post

  • ma question is.....how to find days between two dates using sql ??
    See more | Go to post

    Leave a comment:


  • ranees ras
    started a topic query to find days between two dates.

    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 dates
    See more | Go to post
    Last 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
Working...