Forum Replies Created

Viewing 15 posts - 7,621 through 7,635 (of 13,460 total)

  • RE: Complicated join...

    here's a potential version that doesn't use row_number;

    hopefully that will work as welll:

    SELECT

    cl.RecordStatus,

    cl.ActiveClient,

    cl.SystemEffective,

    cl.Firstname,

    cl.Lastname,

    cl.MiddleI,

    cl.SSN,

    cl.ClientID,

    ...

  • RE: query runs faster when connected locally using IP as opposed to hostname

    sounds like the delay might be related to WINS/ name resolution on a network;

    is the server a permanent server, or is it a laptop that joins the network occasionally? I've...

  • RE: Complicated join...

    with the addition of the FlagDate DESC that Ninja noticed to the row number's Order by, does this get you closer to what you wanted?

    SELECT

    cl.RecordStatus,

    cl.ActiveClient,

    ...

  • RE: Complicated join...

    mikeincape (5/9/2011)


    Sorry, didnt realize this would be a SQL 2000 since I have 80 compatibility on...

    And that is am awesome catch on the comma... I never would have found that.

    Should...

  • RE: Complicated join...

    Ninja's_RGR'us (5/9/2011)


    bg.FlagDate as EnteredDate,

    Missing the comma at the end of the line.

    I think Lowell's having issues with that today :hehe:.

    man that's for sure; i im flubbing up syntax a...

  • RE: Complicated join...

    the database compatibility is set to 80 instead of 90, or you posted a SQL2000 question in the 2005 forum;

    the ROW_NUMBER function was introduced in 2005, so i assumed you...

  • RE: Complicated join...

    ok just a slight variation:

    gotcha, i think this will do it: try the inner query witht he row number and see that it''s returning the client id and the...

  • RE: Complicated join...

    something like this, maybe?

    SELECT

    cl.RecordStatus,

    cl.ActiveClient,

    cl.SystemEffective,

    cl.Firstname,

    cl.Lastname,

    cl.MiddleI,

    cl.SSN,

    cl.ClientID,

    cl.City,

    cl.State,

    cl.Zip,

    cl.HomePhone,

    ...

  • RE: Server change

    for migrating logins, there's a script directly from microsoft you'll want to search for:

    sp_help_revlogin

    there are different versions for SQL 2000 and sql 2005, maybe a different one for 2008/2008R2, which...

  • RE: Delete Validation of Master Record

    you could define the optional ON DELETE CASCADE options of the foreign keys to do the delete (or setting to NULL) automatically for you, but i'm not sure what the...

  • RE: Hexadecimal value to Decimal value

    i don't get 287121 from the conversion.

    /*--Results

    0x4100014259841

    */

    select 0x410001,CONVERT(INT,0x410001)

    the problem is without the 0x to identify that it is HE, you'd need to know/infer that the 410001 is hex...

  • RE: SQLRally Orlando 2011!

    I'll be there as well;

    I'm also attending Grant's pre-conference sessions on Wednesday.

  • RE: Creating a new View - Combining columns

    Ninja's_RGR'us (5/9/2011)


    CASE

    WHEN axxia01.dbo.nmnomtrn.nt_addesc = 'N'

    THEN axxia01.dbo.nmnomtrn.nt_trdesc,

    Remove the comma at the end of that last line

    yep i created the SQL without testing...

  • RE: Creating a new View - Combining columns

    good job explaining what you wanted;

    try this SQL below adn see if this gets the data you were looking for:

    SELECT

    dbo.nominal_narratives.narr,

    dbo.nominal_narratives.nt_seqnum,

    dbo.nominal_narratives.nt_accode,

    axxia01.dbo.nmnomtrn.nt_addesc,...

  • RE: Custom Sort Order / Casting Date to Text

    i would order by datetime, and never convert.

    you could use the COALESCE function to get the order you want i think; that would be the easiest:

    ORDER BY COALESCE(ArrivalDate,BookingDate,DepositDate)

Viewing 15 posts - 7,621 through 7,635 (of 13,460 total)