Forum Replies Created

Viewing 15 posts - 1,201 through 1,215 (of 3,544 total)

  • RE: Are the posted questions getting worse?

    Jeff Moden (11/22/2010)


    Hmmm... reminds me... why did I work 71 hours last week? :blink:

    Because you're a dedicated professional 😀

    And you should know better 😛

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Need a Help in Importing CSV file into DB

    Ooops!

    Thanks Wayne, forgot about that in my haste. :blush:

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Need a Help in Importing CSV file into DB

    CREATE TABLE #header (Data varchar(max))

    CREATE TABLE #result (dummycolumn int)

    BULK INSERT #header FROM 'C:\TEMP\CSV1.csv' WITH (DATAFILETYPE = 'char',ROWTERMINATOR = '',LASTROW = 1)

    DECLARE @sql varchar(max)

    SELECT @sql = COALESCE(@sql+',['+SUBSTRING(Data, N, CHARINDEX(',', Data +...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Table Value Function

    GSquared (10/29/2010)


    To answer the original question, yes, wrapping a script into a UDF does usually cause a performance hit all by itself. But, it's usually in terms of about...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Ordering by month, show name

    Grant Fritchey (10/28/2010)


    Jeff Moden (10/28/2010)


    Task complete. Submitted article via "Write For Us".

    Over-achiever.

    Meh! Jeff probably hasn't heard the saying 'Nobody likes a smart a$$' 😛

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Using a query to return the next Sunday

    doug 40899 (10/27/2010)


    David,

    Then can you give me an example of max being used? This query is being included in an application that's being built and if I can improve it...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Using a query to return the next Sunday

    doug 40899 (10/26/2010)


    G,

    It might but since I already have this in place and I'm going to be using the variable anyway, why not use it for this as well.

    Doug

    Notwithstanding...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: BCP in

    jez.lisle (10/26/2010)


    David Burrows (10/26/2010)


    Do you have a proxy set up for xp_cmdshell?

    If so does it have access to the file?

    Sorry I dont know what you mean, how would this be...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: BCP in

    Do you have a proxy set up for xp_cmdshell?

    If so does it have access to the file?

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Are the posted questions getting worse?

    Wow! All these negative vibes :pinch:

    I come in this morning and the thread has gone serious :angry:

    Now I have to find a dark room to lay down and contemplate a...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Split unique record into multiple records.

    Try using DelimitedSplit8K function described here and the following query

    SELECT test.CuS_id, split.ItemNumber, split.Item

    FROM test

    CROSS APPLY

    (

    ...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Compare 2 fields in the same table Using LIKE '%[fieldname]%'

    askquestions (10/8/2010)


    This is why I was thinking of something to check each “fullname” against the corresponding “surname” - if the surname does not exist as a string in the fullname,...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Parameter in select statement

    Another alternative (although will cause a scan)

    SELECT VendorId

    FROM Vendors

    WHERE CountryId = @CountryId

    AND CHARINDEX(','+CAST(CityId as nvarchar(10))+',',','+@CityId+',') > 0

    ORDER BY CreatedDate

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: ORDER BY based on condition

    UMG Developer (9/30/2010)


    scott.pletcher (9/30/2010)


    Technically you don't have to manipulate the date in the table. For a million+ row table, you save a million+ calcs 🙂 :

    Duh. I was so...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: ORDER BY based on condition

    Or...

    ORDER BY SIGN(DATEDIFF(day,GETDATE(),EventDate)) & 0x80000000 DESC,EventDate ASC

    Far away is close at hand in the images of elsewhere.
    Anon.

Viewing 15 posts - 1,201 through 1,215 (of 3,544 total)