Forum Replies Created

Viewing 15 posts - 46 through 60 (of 66 total)

  • RE: SELECT FROM SUBQUERYS

    Thanks for your reply.

    Can't get it to work.

    I think a MERGE will to the trick.

    Cheers,

    Julian

  • RE: SQL server newbie

    Thank you for pointing this out to me.

    Express version does not have the Agent.

    Cheers,

    Julian

  • RE: SQL server newbie

    I have moved from Access, as the back end, to SQLServer Express. (Excel as front end to generate reports and to enter data).

    Access started giving many errors when serveral users...

  • RE: SQL doesn't see .bak file?

    I am having the same issue.

    Some .bak files are not visible to Restore/Select file. (2008 R2)

    Pasting the path and file name works though.

  • RE: UNION followed by IF ELSE

    Great, thank you Lutz.

    Cheers,

    Julian

  • RE: StoredProcedure, Temp tables, Multiple users

    Thank you.

    Cheers,

    Julian

  • RE: StoredProcedure, Temp tables, Multiple users

    Great,

    Thank you!

    J.

    PS: why do I need

    SET NOCOUNT ON

    in this Procedure? Ommitting it from other sprocs didn't cause any problems. Only difference is that they do not use temp...

  • RE: COUNT items within a result set

    @gbritton1, thank you for pointing me in the right direction.

    Ended up with using the code below.

    Cheers,

    Julian

    -- JJR 20140508 ADDED UPDATE USING OVER PARTITION, MUCH FASTER

    ;WITH Updater AS

    (

    SELECT...

  • RE: COUNT items within a result set

    I am half Dutch...

    The result set looks like the table below.

    Now I would like to sum the Hrs for each Niveau.

    Any ideas?

    Thanks,

    Julian

    NIVHRS

    37

    37

    37

    37

    39

    39

    39

    39

    34

    34

    34

    34

    34

    34

    34

    34

    27,5

    27,5

    27,5

    27,5

    23,11111111111111

    23,11111111111111

    23,11111111111111

    23,11111111111111

    23,11111111111111

    23,11111111111111

    23,11111111111111

    23,11111111111111

    23,11111111111111

    2+6

    2+6

    2+6

    2+6

    2+6

    218

    218

    2+3

    2+3

    2+3

    2+3

    2+3

    2+3

    2+3

    38

    38

    38

    38

    28

    23,33333333333333

    310,6666666666667

    310,6666666666667

    310,6666666666667

    35,33333333333333

    35,33333333333333

    35,33333333333333

    95,14285714285714

    95,14285714285714

    95,14285714285714

    29,33333333333333

    29,33333333333333

    29,33333333333333

    23,5

    23,5

    23,5

    23,5

    23,5

  • RE: COUNT items within a result set

    @gbritton1: thanks that worked!

    The code below gives me the correct results.

    How do you get the sum of Hrs for each NiveauZPT?

    An aggregate cannot be used on a Windowed...

  • RE: Slow self join

    Hello Chris,

    Thank you very much!

    It is ligthning fast (4 sec a.o.t. 1.5 min).

    Cheers,

    Julian

    ChrisM@home (5/6/2014)


    Without sample data to test against...

    Try this.

    ;WITH Updater AS (

    SELECT

    FTEHrsAVG,

    NewFTEHrsAVG = AVG(CASE WHEN FlexVast...

  • RE: Slow self join

    The code is part of a stored procedure which bulk inserts data from a csv file, using a Staging table.

    Thanks for the hint. Job for later.

    Cheers,

    Julian

    gbritton1 (5/6/2014)


    Some other things to...

  • RE: Slow self join

    Hello Lowell,

    Thanks for your response.

    For some reason the original code is 15 seconds faster (2.25 min iso 2.5 min)....

    Cheers,

    Julian

  • RE: Error in Drop Create stored procedure.

    I might strip out the "-" to prevent issues.

    See this post, last message.

    Here I get consistant results:

    Declare @myDate varchar(50)

    Set @myDate = '20141210' --yyyymmdd

    SELECT CONVERT( char(20), CONVERT( datetime, @myDate))

    select (convert(datetime, @myDate,111))+22

    select...

  • RE: Error in Drop Create stored procedure.

    Am I correct to assume that @myDate is our starting point?

    And that CONVERT only changes the display of the date string according to the added parameter (111 or 105).

    Then...

Viewing 15 posts - 46 through 60 (of 66 total)