Forum Replies Created

Viewing 15 posts - 2,626 through 2,640 (of 2,894 total)

  • RE: Implicit conversion question

    mpdillon (6/30/2010)


    ...

    When I update a Decimal(18,6) field type by dividing two Int field types, SQL does not do an implicit conversion.

    ...

    I was astounded to find the the integer 2...

    _____________________________________________
    "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: CTE - Avoiding the cursor

    Brandie Tarvin (6/30/2010)


    Thanks, but your solution won't work. Even though my supplied data set only has one paired team, my actual database has multiple FranchiseIDs with multiple StoreIDs. Your update...

    _____________________________________________
    "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: CTE - Avoiding the cursor

    Actually, recursive CTE is not far from RBAR (can be even worse in performance)...

    What you need can be achieved by a single update:

    UPDATE Store SET FedTaxID = CAST(RAND(F.FranchiseID) * 1000000000...

    _____________________________________________
    "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: SQL Server Database Internals

    This is about internal structure of SQL Server and its internal operations..

    http://www.sqlmag.com/article/internals-and-architecture/sql-server-internals-viewer.aspx

    _____________________________________________
    "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: Can we have more than one identity columns in a table

    diva.mayas (6/30/2010)


    Thank you, its clear now why a table of a column can contain only one IDENTITY property.

    Actually, it is down to MS SQLServer implementation of AUTO INCREMENTING.

    You can find...

    _____________________________________________
    "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: Candidate Key Or Composite Key

    1. Using single numeric key (DocNo) will make join between your Master and Details table work faster!

    2. Getting FormulaID when just retrieving details will be slower as it will require...

    _____________________________________________
    "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: Replace single or multiple hyphen(-) with a space.

    Jeff Moden (6/29/2010)


    ...

    Actually, I have to admit, my really cool (or so I thought :blush: )method got the pants beat off it by simple nested replacements. Check out the...

    _____________________________________________
    "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: Getting RowCount of Large Table

    Jason Messersmith (6/29/2010)


    Eugene Elutin (6/29/2010)


    Have you ever updated statistics on this table? 😀

    That's a good call, I'll give that a try and let you know.

    Have you tried?

    _____________________________________________
    "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: Replace single or multiple hyphen(-) with a space.

    scott.pletcher (6/29/2010)


    The UPDATE below will replace the first occurence of -- and any number more dashes in a row, with a single space.

    Since you have multiple occurences within the string,...

    _____________________________________________
    "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: select distinct columns, nondistinct column from table

    rahulsony111 (6/29/2010)


    Thank you for the reply,

    the Sales_yr is a Year column it has values like 2009, 2010, 2011 etc,...

    Cool! It explains everything!

    So, you want an average value, isn't it?...

    _____________________________________________
    "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: Puzzler-Extra dbo

    Stefan_G (6/29/2010)


    Keith Underwood (6/29/2010)


    He was using the GUI, so all he did was put back in the name of the table "batch", not dbo.batch.

    Well, there are two possibilities:

    1) There is...

    _____________________________________________
    "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: Problems Formating results in XML

    In this case, you can use FOR XML PATH (it takes much less space than FOR EXPLICIT "query from hell"), as you will only read Table_2 and Table_3 once for...

    _____________________________________________
    "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: select distinct columns, nondistinct column from table

    rahulsony111 (6/29/2010)


    Hi,

    I have a table with columns proj_id char(5), tenant_id char(6), lease_id char(8), Sales_yr numeric(4)

    i want to distinct only proj_id, tenant_Id, Lease_id but not sales_yr how can we do...

    _____________________________________________
    "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: DBCC CHECKDB: 2+ hours?

    It depends on many factors...

    Have a look this: http://msdn.microsoft.com/en-us/library/ms175515.aspx

    _____________________________________________
    "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: Replace single or multiple hyphen(-) with a space.

    try:

    UPDATE Temp set Discounturl = replace(replace(replace(Discount,'--','-~'),'-~',''),'-',' ')

    EDITED AS THE ABOVE HAS A BUG.

    See my next post

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