Forum Replies Created

Viewing 15 posts - 8,011 through 8,025 (of 8,731 total)

  • RE: SQL Server T-SQL Boot Camp 3-5 days anywhere in the United States

    I suppose that you're searching for something different than the Microsoft course 2778

    http://www.microsoft.com/learning/en/us/course.aspx?ID=2778A#fbid=EN0FHZ0dEvf

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Need Help putting a Join to this Query

    An error I made when copying and pasting on the last line.

    Change it like this

    GROUP BY a.hostname) AS l ON i.ip < INET_ATON( l.hostname )

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Need Help putting a Join to this Query

    That's because you're making a CROSS JOIN instead of an INNER JOIN.

    To give te correct output for a single IP address you need to chage the query.

    At least, that's what...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Need Help putting a Join to this Query

    There are a few issues here and I will try to help you as much as I can, but I'm not sure that I can give you a final solution.

    First...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: need help with using data in a certain way

    I used a similar code at work a few weeks ago and I just adapted to your problem, so if someone has something better it will be benefitial for both...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: need help with using data in a certain way

    Something like this?

    ;WITH Ordered AS(

    SELECTDISTINCT

    CASE WHEN l.Col1 <= l.Col2 THEN l.Col1 ELSE l.Col2 END AS Col1,

    CASE WHEN l.Col1 <= l.Col2 THEN l.Col2 ELSE l.Col1 END AS Col2

    FROM Links l

    ),

    rCTE AS(

    SELECT...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Changing the Time of a field under a certain condition

    I'm sorry, I edited my response because I saw a rule when I was checking my post.

    I'm sure you don't need an extra case, just the correct set of conditions....

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: How to exclude rows that have a specific column blank

    Sean Lange (6/21/2013)


    Or maybe this?

    where ISNULL(firstname, '') > ''

    This will exclude NULL and empty strings.

    Sean,

    there's no need for the ISNULL as NULL > '' won't return true. 🙂

    where firstname >...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Changing the Time of a field under a certain condition

    Would this help you?

    SELECT CASE WHEN DateEnd = MAX(DateEnd) OVER( PARTITION BY ID)

    AND DateStart > DateEnd

    THEN DATEADD( dd, DATEDIFF( dd, 0,DateEnd),0)

    ELSE DateStart END,

    CASE WHEN...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: How will work with(nolock) option in select queries

    DiverKas (6/21/2013)


    GilaMonster (6/19/2013)


    bslchennai (6/19/2013)


    can we use WITH(NOLOCK) option in select queries for these tables. how it will work.

    Will the users be happy if the data that the queries return...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: roll up the data as per period between start and enddate

    I'm glad you could solved, I was working on a possible solution but I'm not sure that it will work for you. I'll share it anyway.

    ;with Vol_Factdata as

    (

    Select CASE WHEN...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: roll up the data as per period between start and enddate

    Unfortunately, there's not much we can do without more details, DDL, sample data and expected results based on that sample data. These things will allow us to give you a...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: SQL express how many databases of 10 GB of space

    Does this help you?

    http://msdn.microsoft.com/en-us/library/cc645993.aspx#Reporting

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: convert int int to date

    Would this give you a clue?

    SELECT CONVERT( date, CONVERT( char(8), NULLIF( Someintdate, 0)))

    FROM (VALUES(20130601), (0), (20130515))x(Someintdate)

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Which one of the below operator takes the most time for execution?

    Is not easy to answer as they're not equivalent and can't be measured against each other.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2

Viewing 15 posts - 8,011 through 8,025 (of 8,731 total)