Forum Replies Created

Viewing 15 posts - 796 through 810 (of 1,245 total)

  • RE: how to get data from last two month to current date

    Have a look at this page[/url] it'll point you in the right direction. We can't do much else without some input from you though. Can you post some...

  • RE: Comparing Report World Database using Red Gate Data Compare

    The script file works fine and exporting to a csv works fine for the other columns I tried it on, it just seems not to like the binary data for...

  • RE: Comparing Report World Database using Red Gate Data Compare

    Grant Fritchey (12/5/2014)


    You should be able to set a switch that outputs as a report. Here's the documentation showing how that works. You would want /Report.

    I didn't know we had...

  • RE: SQL Date Parameters not working

    It all makes total sense now. The biggest problem I had was missing the bit about setting the date one day forward. As soon as I spotted that...

  • RE: SQL Date Parameters not working

    Thanks Don, I'm completely with you now. We do a lot of date\time queries here and most of the time we either include the time or cast values as...

  • RE: SQL Date Parameters not working

    I'm really not following you here.

    declare @startdate datetime = '2014-12-04'

    declare @enddate datetime = '2014-12-05'

    create table #EventHeader(

    HistoryIDint primary keynot null

    ,DateTimeHappened datetimenot null

    )

    insert into #EventHeader

    select 100001, '2014-12-01' union all

    select 100002, '2014-12-01'...

  • RE: Stored procedure creation

    Thanks Grant. It's not massively obvious but you need to generate an interactive html report to see the differences. It's actually pretty straightforward when you know that!

  • RE: Stored procedure creation

    I've just returned to a project I was working on some months ago about comparing stored procs and everything I found brought me to Red Gate Compare.

    @Grant, seeing...

  • RE: SQL Date Parameters not working

    ScottPletcher (12/3/2014)


    BWFC (11/27/2014)


    You're welcome.

    One other thing, be careful using BETWEEN for date range queries. You're usually better using

    where

    [Date] >= @startdate

    and

    [Date] <= @enddate

    Have a look at ...

  • RE: Your Best Work

    Gary Varga (12/3/2014)


    ccd3000 (12/2/2014)


    I put a premium on passion but not over talent. Take Joe DiMaggio for example, he hated baseball and never liked it, but was one of it's...

  • RE: Today's Random Word!

    Ed Wagner (12/3/2014)


    Jim_K (12/2/2014)


    djj (12/2/2014)


    Ed Wagner (12/2/2014)


    djj (12/2/2014)


    Ed Wagner (12/2/2014)


    whereisSQL? (12/2/2014)


    Ed Wagner (12/2/2014)


    SQLRNNR (12/2/2014)


    Ed Wagner (12/2/2014)


    SQLRNNR (12/2/2014)


    Stuart Davies (12/2/2014)


    Ed Wagner (12/2/2014)


    crookj (12/1/2014)


    SQLRNNR (12/1/2014)


    Sean Lange (12/1/2014)


    Steve Jones - SSC Editor (12/1/2014)


    Work

    Avoidance

    No...

  • RE: Class not registered error when attempting to browse a cube

    I'm using BIDS but I probably should have said before that I'm actually working on a jumpbox. Everything's hunky-dory when I build cubes locally but I'm trying to build...

  • RE: Update within/after Union

    Are you modifying the view or updating the source tables?

    If you're just modifying the results returned in the view, and assuming the the phone column is a varchar the code...

  • RE: How can I pivot results of query?

    Fair enough, I was just wondering if'd missed something 🙂 I think that QUOTENAME is going to be something that will make my life easier though.

  • RE: How can I pivot results of query?

    select yearMonth

    ,BariatricSurgery

    ,BISurgeries

    ,EDTransfersToBI

    ,GYNOncProcedures

    ,GYNOncVisits

    ,InpatientTransfersToBI

    ,OPVisitsByBI

    ,PercentAdmitsFromED

    ,ThoracicSurgery

    from

    (

    select

    YearMonth

    ,metric

    ,data

    from

    dbo.test t

    ) p

    pivot

    (

    max(data)

    for metric

    in (

    BariatricSurgery

    ,BISurgeries

    ,EDTransfersToBI

    ,GYNOncProcedures

    ,GYNOncVisits

    ,InpatientTransfersToBI

    ,OPVisitsByBI

    ,PercentAdmitsFromED

    ,ThoracicSurgery

    )

    ) pvt

    A common or garden pivot will do the same too. As a genuine question on...

Viewing 15 posts - 796 through 810 (of 1,245 total)