Forum Replies Created

Viewing 15 posts - 1,771 through 1,785 (of 2,894 total)

  • RE: Error Output using T-SQL

    It's possible to do what you're asking in T-SQL ETL without loop (cursor), but you need to implement all validations!

    Basically the idea:

    Apply validation rules for all rows in your "source"...

    _____________________________________________
    "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: Joining tables with two tables but displayed in only one row

    Yes you can. You will need to use dynamic SQL (search for "dynamic cross-tab".

    However, if the number of columns does vary, you better to do so in a client/server tier...

    _____________________________________________
    "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 doesn't return data when checking a varchar(max) field...

    Try:

    UPDATE STATISTICS TableA

    SELECT *

    FROM (

    Select FieldA, FieldB

    From TableA

    ...

    _____________________________________________
    "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: Joining datetime dates to calendar table

    ...

    Another idea is that I add a computed column to the OrderDate table which is Cast(OrderDate as Date) and then index it. I could then join the calendar table directly...

    _____________________________________________
    "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 would you handle Grocery store type deals in a db?

    Just an idea:

    The standard process would be price lookup, then simple calculation.

    Then I would have deal table, which would keep deals per product and quantity, please note: buy-one-get-one-free is not...

    _____________________________________________
    "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: Add varchar columns with colon in between to show time

    Thank you all for defending me...

    Sorry, I wasn't right. I didn't read all posts through, what I've seen was just the first one, asking to sum HH:MM's and continues...

    _____________________________________________
    "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: Add varchar columns with colon in between to show time

    Just looking into this thread again...

    What I can say, crap data structure design quickly leads to crap and stupid coding you need to do to achieve something good!

    Calculating...

    _____________________________________________
    "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: Primary Key: GUID vs. INT

    ...so let's say you did not mean to imply you would do a round trip to the database to get said GUIDs

    ...

    Without "so let's say...". I didn't say anything 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: Primary Key: GUID vs. INT

    You still never answered the question. You said earlier you would do a round trip for purposes of caching a bunch of GUIDs:

    Where I've said that?

    Even, with using GUID's,...

    _____________________________________________
    "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: Reduce the store Procedure execution time

    You had missing brackets (and wildcard %) in your WHERE clause - in place where you check for FirstName or LastName:

    ...

    WHERE dpr.AgentID = @TempVQAgentID AND dpr.StateID = @TempVQStateID

    AND (((@TempVQAppFName <>...

    _____________________________________________
    "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: Grouping based on contiguous dates

    Jeff Moden (3/27/2012)


    Eugene Elutin (3/27/2012)


    ...

    Try adding this into the original sample data

    SELECT 'Jun 1 2011 12:00AM','1','10','20' UNION ALL

    The results of the two queries are different.

    My query will only ...

    _____________________________________________
    "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: A Developer's scalar UDF is takeing this query from 3 seconds to over 5 minutes to run

    MyDoggieJessie (3/27/2012)


    Can anyone offer a solution to this issue regarding my post:: Yesterday @ 9:50 AM?

    Can you provide DDL for UDF not as attachment? Not everyone want to download...

    _____________________________________________
    "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: Reduce the store Procedure execution time

    To Original OP ;-):

    I'm not sure why I've done so, but here we are...

    Please note the code formatting: it makes it much more readable therefore better maintainable...

    CREATE PROCEDURE [dbo].[StoreProcedureName] (@StartDate...

    _____________________________________________
    "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 vs CONVERT or another solution?

    Could you please post DDL and some data sample as per http://www.sqlservercentral.com/articles/Best+Practices/61537/

    What exact output you watt to see?

    How large your tables 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: How does ORDER BY work?

    Here is the reason described:

    http://support.microsoft.com/kb/322112

    _____________________________________________
    "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,771 through 1,785 (of 2,894 total)