Forum Replies Created

Viewing 15 posts - 61 through 75 (of 2,894 total)

  • RE: Digits only

    Alan.B (12/10/2014)


    I'm curious (general question to everyone)...

    Wouldn't this be faster?

    -- the function

    CREATE FUNCTION dbo.DIGITSONLYAB(@pstring varchar(8000))

    RETURNS TABLE WITH SCHEMABINDING AS

    RETURN SELECT ISALLDIGITS = CASE PATINDEX('%[^0-9]%',@pstring) WHEN 0 THEN 1...

    _____________________________________________
    "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: CAST or Convert

    Luis Cazares (10/8/2014)


    That's weird, I'm sure that integers would be implicitly converted into strings as shown on the examples from BOL.

    You are absolutely right, CONCAT works without any conversion. So,...

    _____________________________________________
    "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: CAST or Convert

    TSQL Tryer (10/8/2014)


    I'm trying to cast/Convert the whole of the concatenation result. I take it you cant' do that?

    You can, but in your case it will fail before getting there...

    _____________________________________________
    "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: Only some charts have no lines

    mballentine (10/8/2014)


    This is the URL for the screenshot of the rdl file

    http://i62.tinypic.com/f9mxi1.jpg

    This is the URL for the screenshot of the report

    http://i60.tinypic.com/16av09k.jpg

    Thank You

    Cool links, thank you!

    Guys, you will love these...

    _____________________________________________
    "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: CAST or Convert

    nto very clear what exactly you want to CAST or CONVERT, but lets assume it;'s a ROW_NUMBER...

    CONCAT(PER.[PERSON-REF]

    ,CAST(ROW_NUMBER()...

    _____________________________________________
    "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: calculate time in minutes

    select StudentID

    ,ClassId

    ,StartTime

    ,EndTime

    ...

    _____________________________________________
    "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: Why CROSS APPLY in the below scenario returning records from Left recordset even when there is no matching record in the Right one??

    pkjsh13 (10/7/2014)


    Thanks Eugene, I think that explains it perfectly.

    @Eirikur yes a join would have been more efficient but I was trying to understand this particular behavior and not focus on...

    _____________________________________________
    "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: Only some charts have no lines

    XML is not a code...

    _____________________________________________
    "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: calculate time in minutes

    Looks like course work to me...

    So, would you post whatever you alreday tried so far, and we will help you to learn other than give you straight answer which will...

    _____________________________________________
    "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: Why CROSS APPLY in the below scenario returning records from Left recordset even when there is no matching record in the Right one??

    That is very easy to explain, try:

    select max(sal) as sal from b where id = 99999

    over

    select sal as sal from b where id = 99999

    See the difference?

    The first...

    _____________________________________________
    "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: Item Sales Batch Allocation

    Untill you clearly and accurately specify what is your input sample and what is expected output based on that exact input sample, it is really hard to understand what you...

    _____________________________________________
    "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: Conditionally select table names from sys.tables

    you can try:

    DECLARE @sql NVARCHAR(MAX) = ''

    CREATE TABLE #tResults (TableName VARCHAR(50))

    SELECT @sql = @sql + 'INSERT #tResults SELECT ''' + st.name + ''' WHERE ' +

    ...

    _____________________________________________
    "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: Conditionally select table names from sys.tables

    Herpington_McDerpington (10/7/2014)


    Apologies for the lack of clarity folks.

    In the simplest of terms I am trying to retrieve a list of tables, but only tables that meet a condition.

    DB1 has 13,000...

    _____________________________________________
    "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: building groups out of references / eliminate cross references

    serg-52 (10/7/2014)


    Eugene Elutin (10/7/2014)

    UPDATE t1 SET CustomerLink = 0

    FROM @tmp t1

    JOIN @tmp t2

    ON t2.CustomerID = t1.CustomerLink...

    _____________________________________________
    "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: building groups out of references / eliminate cross references

    The problem with cross reference is that it leads to indefinite recurisvenes...

    So, solution would be to resolve corss reference before going to recursive query.

    I have added one more test...

    _____________________________________________
    "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 - 61 through 75 (of 2,894 total)