Forum Replies Created

Viewing 15 posts - 2,761 through 2,775 (of 2,894 total)

  • RE: Combining Two Tables or Question

    Friend, next time please test your setup code before posting it.

    Here we are, in first attempt (it may require some tuning):

    -- SETUP:

    /*

    CREATE TABLE USER_SESSION(

    USER_NUM int NOT NULL,

    LOGIN_DT datetime 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: Combining Two Tables or Question

    Please test your code before posting it. USER is not very good name for the object.

    _____________________________________________
    "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: TSQL QUERY for Date

    Sorry man, The case should be presented as:

    CREATE TABLE #TestTable (Col1, Col2, ...)

    INSERT #TestTable SELECT Val1, Val2, ...

    ...

    Please work a bit to help minimize time required to help 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: TSQL QUERY for Date

    Please provide ctreate table and sample data population script for your case!

    _____________________________________________
    "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 a datetime with minutes & seconds set to '00'

    Sorry, I have edited the previous post as well:

    SELECT dateadd(hour, datepart(hour,GETDATE()),CAST(convert(varchar(20),getdate(),112) as datetime))

    _____________________________________________
    "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 a datetime with minutes & seconds set to '00'

    SELECT dateadd(hour, datepart(hour,GETDATE()),CAST(convert(varchar(20),getdate(),112) as datetime))

    _____________________________________________
    "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: sp_rename on Primary key - dependent objects?

    Do:

    sp_helptext sp_rename

    and you will see how sp_rename does 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: Insert Data to XML Comuln in distributed query

    Why not just use

    INSERT INTO Mehregan2_Report.dbo.tblActiveUsers ....

    Or use OPENROWSET instead of OPENQUERY

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

    I agree with Jeff. This sort of challenges, instead of teaching right tecniques and deep understanding of their mechanisms, might lead to the habit of writing code noodles.

    I would...

    _____________________________________________
    "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 should one use or not use Dynamic SQL

    AndrewSQLDBA (6/14/2010)


    Hello Everyone

    ...

    So please tell me, why you think that one should use or not use dynamic SQL in a sproc.

    ...

    If one knows what Dynamic SQL is for and how...

    _____________________________________________
    "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 should one use or not use Dynamic SQL

    Good article, I've seen it before.

    But where it said that the Dynamic SQL cannot be optimised?

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

    Almost right. Required data was only available on Monday morning but senior BA manager required that it should be the Friday report. So, the report is generated on Monday but...

    _____________________________________________
    "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 should one use or not use Dynamic SQL

    You can optimise dynamic sql as everything else.

    Dynamic sql is absolutely legitimate way of coding and it has own place in design and development of SQLServer based systems.

    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: Mentor

    Do you want the real challenge?

    How to get End-Of-Business Day Friday report that includes the data which will be inserted into the database only on the following Monday?

    :w00t:

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

    The most challenging part of your challenge was trying to understand given written requirements in the same way as you (and that is reall life challenge working with BA's :-D):

    scott.pletcher...

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