Forum Replies Created

Viewing 15 posts - 1,231 through 1,245 (of 2,894 total)

  • RE: Puzzle : Generating two unique numbers from an array of numbers (repetation not allowed)

    As said before, you don't need to guess the last digit of the second number as it can be only 3!

    Saves one cross-apply...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Puzzle : Generating two unique numbers from an array of numbers (repetation not allowed)

    Also, you don't need to check if the same digits from different joins are not equal (eg. if checked a.num<>b.num in one "join" you don't need to check it again...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Puzzle : Generating two unique numbers from an array of numbers (repetation not allowed)

    You don't really need last join as the last digit of the second number can only be '3'

    with a(num) as

    (select 1 union select 2 union select 4 union select...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: DataType confusion

    ...

    "I learned that if you are not doing math with a number then it should be stored as character data."

    ...

    The man was in a wrong school :hehe:

    There are...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Query for treeview

    Welcome to the forum!

    In order to help you we will need a bit more details from you.

    Please spend some time to read the following:

    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Need Help In Query .

    Looks like homework to me...

    What have you tried so far?

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: UPDATE when the values are the same

    ...

    I tend to agree, but I am not certain the debugger output proves it beyond all doubt.

    ...

    It's hard to see what will "prove it beyond all doubt" for Sergiy....

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Assemblies in SQL server 2005

    List of assemblies can be found in SSMS under [Database]/Programmability/Assemblies. You can right-click and generate CREATE script or else.

    Also, you can "select * from sys.assemblies" to see all registered assemblies...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Union Query with 'duplicates'

    bleroy (9/11/2012)


    well I think you are both winners 😉

    I'm only joking, really. The "winner" here is not paid much... (I would say no paid at all :-))

    I wonder which query...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Union Query with 'duplicates'

    Luis Cazares (9/11/2012)


    Eugene Elutin (9/11/2012)


    bleroy (9/11/2012)


    Thanks amillion guys - went for the code from Luis Cazares ... works like a charm as far as I can tell 🙂

    B

    It does, after...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Union Query with 'duplicates'

    bleroy (9/11/2012)


    Thanks amillion guys - went for the code from Luis Cazares ... works like a charm as far as I can tell 🙂

    B

    It does, after he fixed it to...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Reformat Phone Number

    Brandie Tarvin (9/11/2012)


    Eugene Elutin (9/11/2012)


    The best and easiest would be creating CLR function which will remove all non-digits from string using RegEx.Replace.

    Forgive me a moment, Eugene, while I poo-poo your...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Reformat Phone Number

    The best and easiest would be creating CLR function which will remove all non-digits from string using RegEx.Replace.

    Also, you can create UDF in T-SQL (you will use PATINDEX and REPLACE...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: UNION Help

    CELKO (9/11/2012)


    I have a database that contains a number of individual tables for each sales agents.

    This design flaw is called attribute splitting. Would you have “Male_Personnel” and...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

  • RE: Union Query with 'duplicates'

    Luis Cazares (9/11/2012)


    What about?

    SELECT f1, COUNT( Q6_BRANCH) AS CountOfQ6_BRANCH

    FROM (

    SELECT format(WEEK_DATE, "YYYYMM") as f1,

    TBL_AML_ERRORS.Q6_BRANCH

    ...

    _____________________________________________
    "The only true wisdom is in knowing you know nothing"
    "O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!":-D
    (So many miracle inventions provided by MS to us...)

    How to post your question to get the best and quick help[/url]

Viewing 15 posts - 1,231 through 1,245 (of 2,894 total)