Re: Simple Query Question



Yes, you do not have the column names that you posted in your original post. Here is adjusted query (just replace 'Network Name' in the WHERE filter with the network name you are looking for):

SELECT E.enquiryID,
E.introducerID,
COALESCE(E.firstName + ' ', '') + COALESCE(E.lastName, '') AS enquiry,
E.enquiryDateTime,
I.networkName,
COALESCE(I.firstName + ' ', '') + COALESCE(I.lastName, '') AS introducerName,
I.companyName
FROM dbo.Enquiries AS E
JOIN dbo.Introducers AS I
ON E.introducerID = I.introducerID
WHERE I.networkName = 'Network Name'
AND E.enquiryDateTime >= DATEADD(DAY, DATEDIFF(DAY, 0, CURRENT_TIMESTAMP) - 30, 0);

HTH,

Plamen Ratchev
http://www.SQLStudio.com

.



Relevant Pages

  • Re: Blocking SMTP Port 25
    ... The original post does say "outbound from the network". ... Are you suspecting he is an open relay? ...
    (microsoft.public.backoffice.smallbiz2000)
  • Re: WTF - replies to old posts?
    ... >> network might be fun. ... > I think you may be on to something Phil. ... original post with this very witty piece. ... Really Fish, unless you've got money in the bank, conducting a conversation ...
    (alt.guitar.amps)
  • Re: Master Browser problem
    ... As I said in my original post, ... I can see where our network guys are going wrong. ... I think there is some confusion with DMB and SMB; ... because one of our network guys says we have a DMB for each of our locations. ...
    (microsoft.public.windows.server.networking)
  • Re: 8.04 networking seems awfully broken.
    ... What kind of WiFi are you stealing? ... The original post is still there, ... manually restarted the network and then manually set the ... troublshoot the network manager's inability to set the WPA ...
    (Ubuntu)
  • Re: sharing a flatbed scanner in the same way you share a printer.
    ... "insulting appears to be their commodity") does nothing to enhance a ... Actually there are very good reasons for NOT networking a scanner - see my ... original post. ... therefore not incorporated network capability into their designs. ...
    (microsoft.public.windowsxp.hardware)