Forum Replies Created

Viewing 15 posts - 196 through 210 (of 231 total)

  • RE: Ages and Age Ranges

    Oh my lord thats worked.

    THANK YOU!!!!

    I can understand the logic from this now.

    Out of intrest at the very end of the SELECT statement you have a )d

    What...

  • RE: Ages and Age Ranges

    Hello again,

    Thanks for your response.

    But due to me being almost a novice when it comes to TSQL I am really strugging with the multiple age ranges and the...

  • RE: Ages and Age Ranges

    Hi there,

    I am trying to write some code that will let me pull back multiple age ranges, if an age falls into a particular bracket.

    What I've got is below...

  • RE: Ages and Age Ranges

    How would I incorporate multiple age ranges?

    So take it a bit further and say if between age 25 and 48 then "25-48" and add more if I need too?

    Thanks

  • RE: Ages and Age Ranges

    Perfect. Thanks so much

  • RE: Ages and Age Ranges

    SELECT COMM.[comm-reference] AS 'Communication Reference',

    COMM.[crt-date] AS 'Created Date',

    COMM.[main-code] AS 'Main Code',

    COMM.[sub-code] AS 'Sub Code',

    COMM.[current-officer-code] AS 'Current Officer Code',

    PERSON.[PERSON-TITLE],

    PERSON.[FORENAMES],

    PERSON.[SURNAME],

    PERSON.[D-O-B],

    (SELECT DATEDIFF(year, PERSON.[D-O-B], GETDATE())

    - CASE

    WHEN MONTH(GETDATE()) > MONTH(PERSON.[D-O-B])

    THEN 0

    WHEN MONTH(GETDATE()) =...

  • RE: Multiple Initials

    Thank you very much. Just what I was after

  • RE: Adding a new instance of SQL2005

    Trying to install a second instance of SQL SERVER 2005.

    The current instance is at SP3.

    Running the install from command prompt of the SQL Server 2005 disk. As below

    D:\Tools>setup.exe skuupgrade=1

    This fires...

  • RE: Adding a new instance of SQL2005

    If I am installing another instance on a live production server (after testing) will it have any effect on the current instance that is running on there?

    Do I need...

  • RE: Just pull back the MAX Date

    Still the two results?? I just can't see why none of the code will pull back the one result?

    SELECT DISTINCT dbo.DW_SALESINVOICES_F.Reference AS [Sih.Reference],

    dbo.DW_SALESINVOICES_F.InvoiceDate AS [Sih.InvoiceDate],

    DATEPART(YYYY, dbo.DW_SALESINVOICES_F.InvoiceDate) AS [Sih.InvoiceYear],

    DATEPART(MM, dbo.DW_SALESINVOICES_F.InvoiceDate) AS...

  • RE: Just pull back the MAX Date

    Oh....my mistake. So sorry.

    Is it posible for an admin to move my post to the correct area.

    Just to be clear this is SQL 2000 not 2005 that I...

  • RE: Just pull back the MAX Date

    Got the following result back -

    Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05 Copyright (c) 1988-2003 Microsoft Corporation Enterprise...

  • RE: Just pull back the MAX Date

    Sorry for the late reply on this.

    When I run that last query I get the following errors -

    Server: Msg 170, Level 15, State 1, Line 33

    Line 33: Incorrect syntax...

  • RE: Just pull back the MAX Date

    Morning Guys,

    Ok I am now down to two results -

    Results as follows (I'm just including the Bolded options in my Select statement below)

    Result 1

    sih.Reference = 4980586

    EventDateTime = 2008-01-15 15:12:25

    Result...

  • RE: Just pull back the MAX Date

    If Afraid i'm getting the following error when I run that code -

    Server: Msg 156, Level 15, State 1, Line 1

    Incorrect syntax near the keyword 'order'.

    Being a bit crap...

Viewing 15 posts - 196 through 210 (of 231 total)