Forum Replies Created

Viewing 15 posts - 2,731 through 2,745 (of 2,894 total)

  • RE: count(masterId), count(detail.ID) to produce master and detail counts in one single query

    If there are no related records found, the above query will not count the record from master table. Therefore, LEFT JOIN is more appropriate.

    _____________________________________________
    "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: display only one record with summed quantity of the ones that have similarites

    Try:

    SELECT GroupItem AS Item

    ,SUM(QUANTITY) AS QUANTITY

    FROM (

    ...

    _____________________________________________
    "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: WTF?? concatenating Date and time varchar fields messes up the milliseconds!!

    Sorry, Sorry, Sorry!

    I didn't mean converting int 20091201 into DateTime as 01 Jan 2009. Above would never work of cause. What I mean (for INT) is different.

    Try this:

    ...

    _____________________________________________
    "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: How to combine two view in single query.

    KMPSSS (6/18/2010)


    I have small doubt, Is there any performance issue to joining the query using views.Can you please suggest me.

    You are absolutely right! You have right concerns! There are!

    But I...

    _____________________________________________
    "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: Result table join based on active or inactive flag in table two

    I wanted to create a bit more efficient query but the following made me to ask you one small question:

    Chaitanya Patil (6/18/2010)


    390 ...

    _____________________________________________
    "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: WTF?? concatenating Date and time varchar fields messes up the milliseconds!!

    GilaMonster (6/18/2010)


    ...If the date can't be stored as a date due to precision issues, store it as a string. ....

    How this would help for working with milliseconds? As soon as...

    _____________________________________________
    "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: WTF?? concatenating Date and time varchar fields messes up the milliseconds!!

    Absolutely agree.

    However:

    1. If you really need to use something to identify what happen before what, and that difference is down to millisecs and no other datetime functions are required...

    _____________________________________________
    "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: WTF?? concatenating Date and time varchar fields messes up the milliseconds!!

    You can store it as meaningfull value available for comparisons in "where" clause, but it cannot be datetime, so no datetime functions will be applicable.

    What you do is: format 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: SQLCmd - Length

    Well, well, well...

    Actually, no surprise, BCP, old as Sybase (and also originated by them), is the fasterst way to get data out DB and back into it...

    Cheers 🙂

    _____________________________________________
    "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: SQLCmd - Length

    Use bcp or SSIS

    _____________________________________________
    "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: Combining Two Tables or Question

    Now,

    You have couple of choices:

    1. Calculate time of single login and then sum it.

    - It will illuminate the mismatches, but look quite stupid as you will have some thing...

    _____________________________________________
    "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: Combining Two Tables or Question

    1. To achieve the required order and format of data NO CURSOR is required in your case. As shown in my examples, you just introduce the artificial "order" column which...

    _____________________________________________
    "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: Get the missing time part from temp table.

    Once upon a time there was a purple crocodile in a forest, he went to the office when the summer just started to open doors to the bus full of...

    _____________________________________________
    "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: Datediff versus Convert for datetime comparison (ignoring time part)

    Elliott Whitlow (6/16/2010)


    ...I don't really have any objection if that column is used for comparisons only, if they ever want to display it I might consider smalldatetime...

    You can...

    _____________________________________________
    "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: Datediff versus Convert for datetime comparison (ignoring time part)

    Just a small suggestion, if you will go with creating persisted computed column (and assuming your columns are in two diffrent tables), store the date as an INT using:

    FLOOR(CAST(DateTimeValue...

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