Forum Replies Created

Viewing 15 posts - 3,736 through 3,750 (of 4,085 total)

  • RE: Generating XML from the Column containing characters like < < > >

    I think what you are looking for is the following

    SELECT LogText as [*]

    FROM LogFile

    FOR XML PATH(''), TYPE

    The [*] tells SQL that the data represents XML, so it should retain the...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Debug SSIS

    ramadesai108 (5/12/2011)


    I hope I am posting this in the right forum.

    The correct forum is here: http://www.sqlservercentral.com/Forums/Forum148-1.aspx

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: foreign key constraint issues

    There are a number of ways that you can approach this. I tend to use the system views, because they have some of the necessary joins already set up...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: CHARINDEX - 1

    It's actually very simple, but if you have any records that are missing a comma, you will get an index out of range error message. You can fix this...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Query to insert MonthID in a table

    frfernan (5/5/2011)


    I'm curious about the use of this field; I never designed a table with a field like that (or don't remember), and when I worked with fields like that...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Split durations in a half hourly report

    I used a calendar table fragment for this, because dynamically generating half-hour intervals would be a bit of a mess. Also the conditions under which two time intervals overlap...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Query to insert MonthID in a table

    frfernan (5/5/2011)


    You can do it following this code

    declare @Temp table(MonthID char(6))

    insert INTO @Temp values ('201010')

    insert INTO @Temp values ('201011')

    insert INTO @Temp values ('201012')

    INSERT INTO @TEMP

    select convert(char(6), dateadd(m, 1, cast(max(MonthID) +...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Execute a store procedure when the table is modified

    Ken Jr. (5/4/2011)


    Do you want the stored procedure to execute after each row updated, inserted, deleted or after each transaction? Example: If a user inserts 10 rows in a transaction...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Execute a store procedure when the table is modified

    That's exactly what triggers are for. You can look up triggers in BOL to find out more.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Better way to filter/check data?

    Pam Brisjar (4/28/2011)


    It's not ASCII, it's Unicode. Values go up to 65533 (decimal). Which, by the way, we do get.

    Random sampling via PATINDEX is no good.

    PATINDEX is NOT...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Query to insert MonthID in a table

    Let me be clear.

    * It's best to use a datetime field to store and manipulate datetime data.

    * Adding a month is manipulating datetime data.

    * Your MonthID is...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Better way to filter/check data?

    Do you really need to do a character by character review of the given column or just find columns that contain invalid characters? Perhaps you just need to return...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Query to insert MonthID in a table

    First, you say that you want a monthID, but your formula actually calculates a WEEK ID.

    Second, you don't say how the timestamp field relates to the month ID, if at...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Error

    It's just what it says, "The package failed validation." Presumably there is some other error message that gives more information about how it failed. We would need that...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

  • RE: Need to match a number in SQL

    I think what you are looking for is

    WHERE field NOT LIKE '%[^0-9]%'

    The square brackets specify a subset of characters determined by the contained expression.

    The caret (^) at the beginning of...

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA

Viewing 15 posts - 3,736 through 3,750 (of 4,085 total)