Forum Replies Created

Viewing 15 posts - 4,846 through 4,860 (of 6,036 total)

  • RE: Parse data for recurring value?

    Sriram, I'm afraid, value '7104' is not given, you must to retrive duplicated values from the string inside your script.

    And it may be not a single duplication in the string....

  • RE: Table Column as Variable

    SELECT *

    INTO #deleted

    FROM deleted

    -- you may wish to work out data some way here, e.g. delete duplications, apply trims for char values, etc.

    SELECT @tcolname = ('SELECT '+@colname+' FROM #deleted')

    EXEC (@tcolname)

  • RE: Parse data for recurring value?

    There is no data model. Neither yours nor anybody's else. Noone just biult one.

    I answered your question, you just did not bother to read.

    Lets try again:

    convert string into single column table...

  • RE: Parse data for recurring value?

    You should not.

    What you have is not data and storage of it is not a database.

    To make it data convert all those strings into a column in some table (you...

  • RE: Problem with XP_CMDSHELL ''''DIR .....''''

    When you execute command EXEC master..XP_CMDSHELL 'DIR ....\*.*' in query analyzer you run DIR from CMD shell opened from Server, when you execute DIR command in CMD window you must have opened it...

  • RE: Strip off year from date field

    Guys, there is a rule - if it becomes too complex then you've chosen wrong direction.

    SELECT BirthDate,

    CASE

    WHEN DATEADD(YY, DATEDIFF(YY, BirthDate, GETDATE()),...

  • RE: searching for whole words in text fields

    Jeff, make @Word2Find = 'what' and run it.

    It cannot find "what" because there is no space after it.

    Same problem with dots, commas, etc.

  • RE: splitting a string

    Don't tell me about what they send.

    I deal with it every day.

    But it does not mean I let this mess into my database....

  • RE: BCP command

    And this "Header" row will eventually end up at the end of the file or somwhere betwen the lines.

  • RE: splitting a string

    Does not matter.

    Whatever whoever sends to you turn it into actual data when INSERT, not when SELECT.

    If you (with your code) cannot understand how to convert this s..t they sent...

  • RE: Strip off year from date field

    Hope it will help:

    declare @d TABLE (BirthDate datetime)

    INSERT INTO @d (BirthDate)

    SELECT '1955-10-25'

    UNION

    SELECT '1960-11-25'

    UNION

    SELECT '1965-11-05'

    UNION

    SELECT '1970-11-15'

    UNION

    SELECT '1970-12-20'

    UNION

    SELECT '1970-11-01'

    UNION

    SELECT '1970-10-31'

    UNION

    SELECT '1970-11-30'

    SELECT BirthDate, DATEADD(YY, DATEDIFF(YY, BirthDate, GETDATE()), BirthDate) NextBirthday

    FROM @d

  • RE: Import errors

    Which wizard?

  • RE: splitting a string

    Jeff,

    I did not ask about born name of Pele.

    Bill,

    All he needs to do is:

    1) store all parts of names in database separately;

    2)...

  • RE: How do the cursors work?

    What do you mean by "var tables have more chache enables than a temporal table"?

  • RE: How do you use a variable for the table name in SET IDENTITY_INSERT?

    If you rely on "well-known identity" then yes, entire design is definitely wrong.

Viewing 15 posts - 4,846 through 4,860 (of 6,036 total)