Forum Replies Created

Viewing 15 posts - 1,846 through 1,860 (of 10,144 total)

  • RE: Loop through an IN() clause?

    There are some code gotcha's in your original query. Looking at the first CTE, and expanding the range of PartID to get a decent sample set for testing, shouldn't this:

    SELECT...

  • RE: Are the posted questions getting worse?

    Phantom forum post!

    Go to this thread

    Click on the Quote button

    Scroll down to view earlier posts (click on the [+] icon if necessary)

  • RE: How to insert data from localdb to amazon redshift?

    sqlbidev (7/7/2015)


    Hi,

    I have a populated table on my local machine, I have created the linked server and connection is working fine.

    I have also created the same table on redshift...

  • RE: Today's Random Word!

    Grumpy DBA (1/7/2016)


    Ed Wagner (1/7/2016)


    Stuart Davies (1/7/2016)


    Belated?

    Late

    Pregnant

    paws

  • RE: Longest Common Substring in an ITVF

    Eirikur Eiriksson (1/5/2016)


    For a laugh, I'm just going to post a query I wrote yesterday based on some work I did years ago

    Very fast code! It wouldn't take much tweaking...

  • RE: Longest Common Substring in an ITVF

    Hi Alan, nice job 🙂

    Here's a completely different take on the problem, loosely based on some fuzzy matching stuff I've worked on over the years. It looks promising and you...

  • RE: LEAP and LAG behind the scenes

    rs80 (12/23/2015)


    Sorry, there isn't any source code that I have. It's more of a theoretical question. What's the best way to learn how these functions work behind the scenes?...

  • RE: Are the posted questions getting worse?

    Brandie Tarvin (12/23/2015)


    Thank you, everyone for the sympathy. She's getting her surgical biopsies today and we'll know in a week. The SO is kind of moping around (she's his cat)...

  • RE: How to add record on linked server

    chris92mars (12/22/2015)


    I tried to add a new record on the linked server but it fail.

    The Errror is Column Name or number of supplied values does not match the table...

  • RE: Are the posted questions getting worse?

    Brandie Tarvin (12/22/2015)


    Sorry to interrupt a valuable discussion on posters, but I need some sympathy.

    Cancer cat (Formerly had a sarcoma removed) now needs to go back in for some surgical...

  • RE: Are the posted questions getting worse?

    Phil Parkin (12/22/2015)


    It seems that everyone in this thread spends their spare time shooting things :exclamationmark::-D

    Usually, yes

    >>>>>------------------->

  • RE: Calculating a Year Number and Sequence number using a date field

    Something along these lines should do the trick, however I'd recommend you don't do it. If the number you are storing with the date of the visit is of any...

  • RE: Duplicates After Self Join

    This should get you started:

    SELECT *

    FROM workorders i

    CROSS APPLY (

    SELECT *

    FROM workorders tc

    WHERE tc.JobType = 'TC'

    AND tc.AccountNumber = i.AccountNumber

    AND tc.ScheduledDate BETWEEN i.ScheduledDate AND DATEADD(DAY,30,i.ScheduledDate)

    ) x

    WHERE i.JobType...

  • RE: Pivot query using dates between 2 dates

    Tallboy (12/17/2015)


    Hi Chris,

    Wow, thank you so much... looks the business!

    I had been reading about the Tally Tables but can't claim to understand it!

    I copied and pasted you code into...

  • RE: Pivot query using dates between 2 dates

    -- make up some sample data to work with

    DROP TABLE #Sample;CREATE TABLE #Sample (NStartDate DATE, ApptTime TIME, Duration SMALLINT, Frequency SMALLINT, ClientID INT, NEndDate DATE)

    INSERT INTO #Sample (NStartDate, ApptTime, Duration,...

Viewing 15 posts - 1,846 through 1,860 (of 10,144 total)