Forum Replies Created

Viewing 15 posts - 5,071 through 5,085 (of 8,731 total)

  • RE: Weird issue with unicode and pattern matching

    Maybe you could do this to find offending rows.

    select fieldname

    from tablename

    EXCEPT

    select fieldname

    from tablename

    where fieldname

    NOT LIKE N'%[^'+nchar(0x9)+nchar(0xA)+nchar(0xD)+nchar(0x20)+N'-'+nchar(0xD7FF)+N']%'

    The NOT LIKE N'%[^Pattern]%' will return non-offending 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
  • RE: How to group the total count of similar items?

    Quick question.

    Can the packages contain packages?

    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: does the databases actually update

    That's right and wrong at the same time. :hehe:

    Every modification to a database (in SQL Server) is part of a transaction. Each transaction (which can contain several statements) will be...

    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: If Celko was a rock star, which one would he be?

    I've been told that Celko's personality in the forums isn't at all his real self. It's just a persona created to make people learn.

    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: Left Function and CHARINDEX

    That happens when the backslash doesn't exist in the string and generates 0-1=-1 which is invalid for the parameter.

    Use a safety net to prevent this and remove the spaces (unless...

    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: Display dates between two dates

    It would be easier if you have a calendar table.

    SELECT DISTINCT r.VisitID, c.cal_Date

    FROM #Results r

    JOIN Calendar c ON c.cal_Date BETWEEN r.DateFrom AND r.DateTo

    You could build one using a tally table.

    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: If Celko was a rock star, which one would he be?

    I would think of Ozzy Osbourne. They're both precursors on their genres (SQL & heavy metal) and they appear to be more frightening than they really are. They both have...

    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: CTE Syntax

    Stephanie Giovannini (3/30/2015)


    Instead of inventing the word "beginnator" as the opposite of terminator, how about "initiator"? It's already an English word. Statement initiator vs. statement terminator--I think that sounds reasonable.

    Just...

    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: split value into two columns

    I'm just adding a safety net.

    if OBJECT_ID('tempdb.dbo.#names', 'u') is not null drop table #names;

    create table #names (

    FullName varchar(100));

    insert into #names(FullName)

    values('Ed Wagner'),

    ...

    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: split value into two columns

    For 2 columns, a splitter such as the Delimited8k would be too much.

    This thread might give you an idea on how to do it.

    http://www.sqlservercentral.com/Forums/Topic1670877-391-1.aspx

    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: CTE Syntax

    Eirikur Eiriksson (3/30/2015)


    ;With due respect, additional and extra semicolons between statements will not cause any problems and CTE statements will run, without the semicolon it will not.

    😎

    I beg to differ.

    IF...

    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: split value into two columns

    What happens if you have full names with more than one space in them?

    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: concatinating string without cursor

    ABAS101 (3/27/2015)


    This may help also

    ;WITH DiagWithRowNum AS

    (

    SELECT

    VisitGuid,

    DiagnosisText,

    ROW_NUMBER() OVER (Partition...

    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: concatinating string without cursor

    This article should help you get what you need.

    http://www.sqlservercentral.com/articles/comma+separated+list/71700/

    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: Are the posted questions getting worse?

    Ed Wagner (3/27/2015)


    Sean Lange (3/27/2015)


    Luis Cazares (3/27/2015)


    In a different order of ideas, I want to share with you my happiness.

    Starting on April 21st I'll be working in the US. I'll...

    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 - 5,071 through 5,085 (of 8,731 total)