Forum Replies Created

Viewing 15 posts - 6,376 through 6,390 (of 8,731 total)

  • RE: big query

    So there's nothing we can do to help as you can't control the query?

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Data import when a file is dropped to a folder

    Using a script task inside a loop you could check if the file exists and end the loop when the file is found to continue with the package execution.

    I...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Comma Separated in a single result (interesting request)

    That's a really weird requirement. I can't see why would you want to do this but here's an option.

    WITH ConcValues AS(

    SELECT ROW_NUMBER() OVER( ORDER BY Name)...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Getting first and last value for every group.

    At first sight, I though you needed just MAX and MIN, but looking at the expected results I found out that it was a little more complicated.

    Here's an option:

    WITH CTE...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: big query

    You might need to post more information to get good advice. Check the following article to know how to do it.

    http://www.sqlservercentral.com/articles/SQLServerCentral/66909/

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: uses of string splitters

    Another use is to work with parameters that work as arrays contained in strings.

    I know that this can be done using table-valued parameters but some might like the splitter option...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: uses of string splitters

    I added that thread to my briefcase because I'm sure it might get handy some time. I use a digital camera for my photographic memory but from time to time...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: uses of string splitters

    Something like this?

    CREATE FUNCTION [dbo].[ProperCaseWithNumbers]

    (

    @StrIn VARCHAR(255)

    )

    RETURNS TABLE WITH SCHEMABINDING

    AS

    RETURN

    SELECT STUFF(

    ----Start of first parameter

    (SELECT CASE

    WHEN split.Item LIKE '%[0-9]%'

    THEN ' ' + split.Item

    ELSE ' ' + Upper(LEFT(split.Item, 1)) + Lower(Substring(split.Item, 2, 255))

    END...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: uses of string splitters

    SQLRNNR (5/29/2014)


    KoldCoffee (5/29/2014)


    it's a no good link

    link works for me

    It might have been a problem with the site. It seems to be intermitence due to maintenance.

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Error Converting Datetime to String

    In other words.

    This:

    WHERE (dbo.TCDaily.Kind <> 'A02') AND (dbo.TCDaily.Kind <> 'J02') AND (dbo.TCDaily.Kind <> 'J04') AND (dbo.TCDaily.Kind <> 'J06')

    Is exactly the same as this:

    WHERE NOT( (dbo.TCDaily.Kind = 'A02') OR (dbo.TCDaily.Kind...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: uses of string splitters

    KoldCoffee (5/29/2014)


    I know that STUFF takes 3 parameters: (the string, the starting position, the number of characters to delete) but I can't break Luis's TVF into those three. Can...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: uses of string splitters

    Sean Lange (5/29/2014)


    Here is an example of a real world case for using a splitter. This iTVF will return a string with the proper case. I did not write this...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Unable to figure out SQL Script

    You're welcome.

    I hope that you could understand it and learn something new. 😉

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Just curious, what are your SQL pet peeves ?

    I'm not in favor of "sprocs" but I prefer them over "store procedures". AFAIK, we're not selling anything.

    At work we have DTS that simply call an SP or even better,...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2
  • RE: Select statement to only return records where joined records all meet condition

    You shouldn't compare cost percentages on query plans against 2 different queries. They are just estimates and can lead to wrong assumptions.

    Run your queries against a large number of rows,...

    Luis C.
    General Disclaimer:
    Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?

    How to post data/code on a forum to get the best help: Option 1 / Option 2

Viewing 15 posts - 6,376 through 6,390 (of 8,731 total)