Forum Replies Created

Viewing 15 posts - 571 through 585 (of 2,894 total)

  • RE: Sql Query

    To combine all records from one or multiple resultsets use UNION [ALL]

    To combine all columns from one or multiple resultsets use JOIN (eg. INNER, LEFT/RIGHT OUTER, FULL OUTER)

    If 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: Inner join vs Left join

    SpinyNorman (3/15/2013)


    I'm not sure why the sub-selects are being generated, but removing them doesn't make a difference. It's almost as if the query is trying to use the filtered index...

    _____________________________________________
    "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: delete query SQL 2008 in Virtual machine setup?

    How big your table is? Or, better way, how many records will stay in the table after purge of records for the last two years?

    You might find, that moving 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: What needs to consider when adding a password to the table

    please suggest to have pk at table level

    I guess you have no choice here. PK can only be set "at table level"

    ...every time remove pk before proc executes then...

    _____________________________________________
    "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: Capture Data Change

    ...

    If app connections are made with a service account for example, it will be difficult to distinguish which specific user dis something....

    It's quite common design when DB connection is made...

    _____________________________________________
    "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: Inner join vs Left join

    Can you try this one (with index enabled):

    SELECT

    [Extent1].[ValuationDateID] AS [ValuationDateID],

    [Extent3].[TransactionRef] AS [TransactionRef],

    [Extent3].[Counterparty] AS [Counterparty],

    [Extent2].[BookName] AS [BookName],

    [Extent2].[Category] AS [Category],

    [Extent2].[Type] AS [Type],

    [Extent2].[LifeLicence] AS [LifeLicence],

    [Extent2].[Manager]...

    _____________________________________________
    "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: Inner join vs Left join

    Ough, that's fine. I just couldn't see all closing brackets from first glance.

    There are many different reason for this error to happen.

    Have you seen this one? http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=36409

    _____________________________________________
    "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: Inner join vs Left join

    You have posted incomplete statement...

    _____________________________________________
    "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: Group and Count from a table

    Note, dbo.DelimitedSplit8K is the fastest way to split sting in T-SQL (it only will marginally loose to CLR implementation). Also, what will happen if your Category will include 3 or...

    _____________________________________________
    "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: Group and Count from a table

    romah (3/14/2013)


    Thank you SSCrazy for your quick reply.

    Now, I got the following error:

    "Category" is not a recognized table hints option. If it is intended as a parameter to a table-valued...

    _____________________________________________
    "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: Group and Count from a table

    With Jeff Moden help ( dbo.DelimitedSplit8K string split function - http://www.sqlservercentral.com/articles/Tally+Table/72993/ )

    you can do just this:

    declare @mytable table (SNo int, Category varchar(100))

    insert @mytable

    ...

    _____________________________________________
    "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: CASE in WHERE clause

    Keep searching.... :hehe:

    I also like to invent bicycles in my free time. Stupid clients/employers, they don't like to pay me for spending time on such an exciting hobby of mine...

    _____________________________________________
    "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

    What about rules?

    Why not

    1 50

    and

    5 50

    ?

    _____________________________________________
    "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: Complex SQL QUERY with DateDIFF

    ChrisM@Work (3/14/2013)


    Eugene, that is absolutely spot on, and your last sole-user sample is an excellent demonstration of the distribution limitation. However, the sample sets provided by the OP are in...

    _____________________________________________
    "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: CASE in WHERE clause

    RVO (3/13/2013)


    My boss is a professional. He was a developer recently.

    I saw some of his stored procedures - good code.

    I think he has a point. A few years ago at...

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