Forum Replies Created

Viewing 15 posts - 3,991 through 4,005 (of 5,590 total)

  • RE: STRINGS - Common portion of a string within a group....

    Since you're on 2008, and dealing with file system paths, I'm wondering if you can do something with the new hierarchyid data type.

  • RE: OpenRowSet csv 64 bit error

    Hmm, I just did something similiar.

    The way I did this was to use the BULK INSERT command to put the file into a staging table. I then get the first...

  • RE: How to split the column into sql data

    -- See how this starts off with a table and data in it?

    -- If you had provided us the data in this format,

    -- it would have made things easier...

  • RE: What, When, Where, How, Who2

    Good article Jason! 😉

  • RE: Converting multiple tables to CSV

    Unless all the tables have the same structure, you'll probably be better off doing this dynamically. SSIS loads the column mappings for the export, and if they're changing, it will...

  • RE: Single SQL Stored Procedure for Select/Insert/Update/delete

    What was only mentioned in passing was the performance mess that this would cause. The reason for this is that each stored procedure creates an execution plan based on what...

  • RE: How to replace in sql

    This solution requires the DelimitedSplit function:

    CREATE FUNCTION [dbo].[DelimitedSplit] (

    @list varchar(max),

    @Delimiter char(1)

    )

    RETURNS TABLE

    AS

    RETURN

    -- first, need to break down into separate items. See Jeff Moden's article: -- The...

  • RE: get count from count query

    CirquedeSQLeil (6/9/2010)


    Here is a SQL 2000 version

    Declare @CounterTable Table (Table_Name Varchar(50), NumOccurrences int)

    Insert into @CounterTable (Table_Name, NumOccurrences)

    SELECT Table_Name

    ,COUNT(Table_Name) AS NumOccurrences

    FROM INFORMATION_SCHEMA.Columns

    GROUP BY Table_Name

    HAVING ( COUNT(Table_Name) >= 0 )

    Select Count(Table_Name) as...

  • RE: removing random characters

    Here's a set-based method that can be adapted into a table-valued function (Lowell's solution utilizes a scalar function). A TVF can be utilized with CROSS APPLY to get pretty dramatic...

  • RE: Is the MVP Worth It?

    CirquedeSQLeil (6/9/2010)


    Is it worthwhile to increase your personal knowledge (a common side effect of helping others)

    This is the reason I do it... not only do I learn (from researching...

  • RE: copy the select results into text file

    I'm not sure what you're after:

    1. Are you running the procedure from SSMS, and you want to put the results into a text file with this delimiter?

    2. Or do you...

  • RE: Help needed!!!

    Dan.Humphries (6/9/2010)


    Without seeing any sample data it would be pretty hard to tell why the first query is not returning any results. I could only offer that you might want...

  • RE: CTE Help - I Think I'm Close

    nfs_john (6/9/2010)


    I surely can script out my tables etc. I figured you geniuses wouldn't need anything more than to see it to know where I am wrong.:-)

    I think you're the...

  • RE: Revenue per month report — cross tab with tally

    The first thing I see that I'm confused by is that your query is actually doing a clustered index seek... with the DateAdd and DateDiff functions being used around the...

  • RE: Select from Table Containing Ranges

    Great. Glad that I could help you out.

Viewing 15 posts - 3,991 through 4,005 (of 5,590 total)