Forum Replies Created

Viewing 15 posts - 436 through 450 (of 2,458 total)

  • RE: SQL Server 2014 Developer edition

    I, too, had a real hard time with this, it took me a long time to find where/how to download Dev Edition. I remember that that key was to be...

  • RE: Daily working Hours

    Provided you can get away with up to 2 clock_in's and clock_out's per person/date you can do this:

    WITH Prep AS

    (

    SELECT

    creation_date = CAST(creation_date...

  • RE: Daily working Hours

    This should not be hard, I'm looking at this now.

    In the meantime, in case people want easily consumable sample data...

    SELECT * INTO dbo.test

    FROM

    (

    VALUES ('168780','10148','16477','7/21/2016 15:00','CLOCK_OUT','1','DAY','RICHAR'),

    ...

  • RE: Adding Windows Function causes very bad performance (help plz!)

    Eirikur beat me to it on the POC index - that's always the first thing I look for when a window function makes a query much slower.

    I would add...

  • RE: make over columns using comma seperated and select in query

    What you are doing does not make much sense. Perhaps you could post some sample data and your desired results and we can point you in the right direction.

    a...

  • RE: The Christmas CROSS APPLY

    Yay. I got one right.

    Personally I'd simplify this one like this:

    SELECT

    DATEADD(YEAR, N, CONVERT(DATE, v.HolidayDate)) AS HolidayDate,

    HolidayName

    FROM (VALUES ('12/25/2016', 'Christmas Day')) AS v (HolidayDate, HolidayName)

    CROSS...

  • RE: Dynamically creating a @table Table from a current table

    Lynn Pettis (9/27/2016)


    mister.magoo (9/27/2016)


    Lee Hopkins (9/27/2016)


    I have a script that gives me a string of the columns and types.

    I wan to use this result to create a declared table

    DECLARE @listStr...

  • RE: How to Upgrade T-SQL Skills

    A lot of good advice here, especially

    The best way to get better at writing T-SQL is to write a lot of T-SQL.

    Over the years I have created dozens of...

  • RE: PLEASE HELP ****** Stripping #s from one column to update 2 columns *******

    I have no idea what you're trying to do but it seams simple. Please post your desired results. On a side note -

    This:

    and (cm.Original like'6%' or cm.Original like '7%' or...

  • RE: Dynamically creating a @table Table from a current table

    Building off of what Scott said - a table variable is not the best choice for what you are doing because it can't be referenced outside of the dynamic SQL...

  • RE: SQL question

    For fun, here's another option. This is a function I created a couple months ago which uses NGrams8K[/url]. The function allows you to grab everything between the mth and nth...

  • RE: Staging area best practice

    So having 3 schemas in one database? is this the right thing to do or should I have a 3 separate database completely?

    It depends.

    I have seen this done both...

  • RE: Rows to Columns

    erouse (9/21/2016)


    Jeff Moden (9/16/2016)


    erouse (9/16/2016)


    Can somebody please help? Is there a fairly simple way to do this?

    This is my data now.

    LABORLC

    152685A B C D E

    152969A B

    This is what...

  • RE: How do I get a substring out from a string?

    What Nicholas proposed will work provided that CN= always comes before OU=. Working with AD, I've see that this is not always the case. If this is how it is...

  • RE: what affects the time it takes to create an index?

    dbodell (9/20/2016)


    You know that is an interesting comment because I recently changed the code to use MERGE instead of separate INSERT and UPDATE processes. Removing and rebuilding the indexes was...

Viewing 15 posts - 436 through 450 (of 2,458 total)