Forum Replies Created

Viewing 15 posts - 301 through 315 (of 399 total)

  • RE: group by roll up

    solved syntax of adding pivot, am still analyzing results. At least this runs without error.

    SELECT yrOrdered, moOrdered, DayOrdered, [1], [2], [3]

    from

    (

    select YEAR(orderdate)as yrOrdered, MONTH(orderdate) as moOrdered, DAY(orderdate) as dayOrdered,...

    --Quote me

  • RE: group by roll up

    Still having problem adding pivot to group by with rollup sql query. Can anyone help?

    SELECT yrOrdered, moOrdered, DayOrdered, COUNT(orderid) as countofOrders

    from

    (

    select YEAR(orderdate)as yrOrdered, MONTH(orderdate) as moOrdered, DAY(orderdate) as dayOrdered, empid,...

    --Quote me

  • RE: group by roll up

    Lokesh, I have seen that information too, but it is the 'expansion into' pivot that is the problem and for which I can't find demo.

    EG, I see how to apply...

    --Quote me

  • RE: trimming a text string

    I don't see how the substitution of my actual column name would work in either dwain or ColdCoffee's case. 🙁

    SELECT MyStr=REVERSE(SUBSTRING(REVERSE(MyStr3), 1, CHARINDEX('_', REVERSE(MyStr3))-1))

    FROM TestData

    CROSS APPLY (SELECT LTRIM(REPLACE(MyStr +...

    --Quote me

  • RE: trimming a text string

    Gsquared, will you please show me how to use your "Here's something a bit flexible for this kind of thing:"?

    I have another example.

    Two things need to happen:

    1)remove everything after the...

    --Quote me

  • RE: trimming a text string

    Lynn, But, you helped me. You might admit, that one is logistically quite complicated ...and utilizing a function I have not run into yet. This worked. This was the answer....

    --Quote me

  • RE: trimming a text string

    The problem is complicated by this: the values I need to retain (before the first backslash) also have a prefix that needs to be removed.

    So two things need to...

    --Quote me

  • RE: trimming a text string

    thank you Lynn, that works great.

    --Quote me

  • RE: trimming a text string

    No, I am getting error:

    Msg 537, Level 16, State 2, Line 1

    Invalid length parameter passed to the LEFT or SUBSTRING function.

    even if I go

    SELECT CASE when CHARINDEX('/', ProdPath)...

    --Quote me

  • RE: trimming a text string

    This time, I'm trying to get everything in front of the first backslash of a field name. The values in ProdPath will never begin with a backslash, and may...

    --Quote me

  • RE: trimming a text string

    Jeff, rather uncanny that you would know I might need to...."Return a BLANK if there's no backslash after the 2nd character".

    I needed this today. Thanks again.

    --Quote me

  • RE: how to insert ID values into one table so that they match identity values of column in another table

    thanksk Know-It-All.

    that worked great. Let me apply what you just taught me to my real life scenario. Thanks a lot!

    Note*

    I had to correct my FK constraint to make...

    --Quote me

  • RE: how to insert ID values into one table so that they match identity values of column in another table

    yes, this will be one time and I am seperating the migrations into two batches. destination A is already populated, but destinationB is populated based on more complex...

    --Quote me

  • RE: an integrated reporting/business solution within Word utilizing TAQL and other technologies

    SoberCounsel

    Each time you call the PivotTableWizard it adds a new sheet (with a new pivottable on it), so if you want the pivot to appear on a specific sheet,...

    --Quote me

  • RE: an integrated reporting/business solution within Word utilizing TAQL and other technologies

    yes that did it.

    I realize I have a lot I'm going to have to learn on my own, which is why I am reading VB for Dummies. I plan...

    --Quote me

Viewing 15 posts - 301 through 315 (of 399 total)