Forum Replies Created

Viewing 15 posts - 7,126 through 7,140 (of 8,731 total)

  • RE: Mastering Dimensions of Time

    raulggonzalez (1/22/2014)


    Jeff Moden (1/21/2014)See the example code that Luis posted above for one possibility.

    I did and I read the article you published, and I really enjoyed reading it, thank...

    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 update the same column multiple times in an UPDATE statement?

    I can't remember if it's true, or maybe my mind is playing tricks on me, but an update will only update rows once even if a correspondant select would show...

    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: T-SQL Sorting inside pivot

    ashok.theagarajan (1/22/2014)


    I did this. Now what happens is for a particular week when the year changes from 2013 to 2014 the data is displayed twice. The same will happen if...

    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: T-SQL Sorting inside pivot

    You need to add the year to your weekrange column (or add it in a different column). Even if you don't display it, you need the information so SQL Server...

    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: query time question

    It still depends on the time needed to display the results, possible table locks, disk speed, etc

    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: query time question

    It depends.

    What about possible network issues? Wil the query use functions? indexes?

    Many things can cause poor performance or great performance.

    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: Passing Wildcard parameters through Query

    sharonsql2013 (1/21/2014)


    Select *

    from SomeTable

    where table_id LIKE '%' + @ID+ '%' OR table_id LIKE '%'

    Well, it always give all values irrespective of parameter.

    That's because "OR table_id LIKE '%'" makes your WHERE...

    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: Passing Wildcard parameters through Query

    hisakimatama (1/21/2014)


    Luis, after a bit of tinkering in SSRS myself, I've clearly misspoken! I suppose I've got another complaint to lodge with our vendor, regrettably. Threw together 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: Passing Wildcard parameters through Query

    hisakimatama (1/21/2014)


    I'd be careful of using this sort of query, though; without the proper proofing, it's open to SQL injection, and all of its assorted security risks.

    Can you explain how...

    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: Mastering Dimensions of Time

    steven.ensslen (1/21/2014)


    I agree strongly with peter-757102 and raulggonzalez.

    However the point of a date dimension is not that is stores all of the days of a year. That's trivial. ...

    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 a cte to return all periods in a range of periods

    You could certainly use the new capabilities to avoid the temp table.

    I can't help you on that right now because I don't have an instance of 2012 to test...

    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: Joining master and detail tables

    Do you need something like this? I think I'm missing something.

    SELECT Id,

    dim0,

    dim1,

    dim2,

    value1,

    value2,

    description,

    UDF1

    FROM PTMaster

    UNION ALL

    SELECT M.Id,

    M.dim0,

    M.dim1,

    M.dim2,

    D.value AS value1,

    0 AS value2,

    D.description,

    M.UDF1

    FROM PTMaster M

    JOIN PTDetail D ON M.Id = D.FactId

    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 a cte to return all periods in a range of periods

    It might not be my day, because I might have overcomplicated myself with this. I haven't noticed that you needed a running total (balance). Here's an option using a fast...

    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: Mastering Dimensions of Time

    Jeff Moden (1/21/2014)


    aaaaaaaahhhhhhh.... I do wish you lived in the Detroit area.

    I wouldn't mind to change my address. Especially to a city that hosts an NFL team.:-D

    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 a cte to return all periods in a range of periods

    With no DDL or sample data, there's not much we can help.

    The usual method, would be to do a left join with your periods table.

    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 - 7,126 through 7,140 (of 8,731 total)