none
Dateadd producing no results in Declaration Start

    Question

  • The sql below returns null in the Declaration Start allias

    The value of TaxYearDate.StartDate date/time is 6/04/2015

    SELECT "SMS_" & sms_remittance.[Transaction ID] AS ImportID, sms_remittance.[Transaction ID], [sms_remittance.Transaction Date], sms_remittance.Title, sms_remittance.[First Name], sms_remittance.Surname, sms_remittance.[Address 1], sms_remittance.[Address 2], sms_remittance.Town, sms_remittance.Postcode, sms_remittance.Country, "Mobile" As [Phone Type], sms_remittance.Mobile, "Mail Type" AS MailType, IIf([gad dpa]=-1,'All',IIf([gad dpa]=0,'Do Not Contact','')) AS MailTypeDesc,
    [sms_remittance.Transaction Date] AS MailTypeDate, [sms_remittance.Payment Date] AS [Gift Date], sms_remittance.Keyword,sms_remittance.Amount,sms_remittance.Mobile AS [Gift Reference Number], "No" AS [Gift Anonymous], "Electronic" AS DeclarationIndicator, "R-R050-1503-ST01" AS DeclarationSource,[sms_remittance.Transaction Date] AS DeclarationMade, DateAdd("yyyy",-4,TaxYearDate.StartDate) AS [Declaration Start] ,"Yes" AS PaysUKTax

    FROM sms_remittance,TaxYearDate

    • Changed type ParkinsonsDB Sunday, August 02, 2015 12:40 PM
    • Moved by litdev Monday, August 03, 2015 10:49 AM
    • Changed type ParkinsonsDB Wednesday, August 05, 2015 8:35 PM remove
    Sunday, August 02, 2015 12:37 PM

Answers

All replies