Forum Replies Created

Viewing 15 posts - 2,176 through 2,190 (of 2,452 total)

  • RE: Replacement for union

    What is the relationship (link) between your two tables?

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: How to get DATE in yyyy-mm-dd hh:mi:ss AM(or)PM

    Gianluca Sartori (10/3/2011)


    J Livingston SQL (10/3/2011)


    select convert(varchar,getdate(), 120) + ' ' + CASE WHEN DATEPART(hour,GETDATE()) > 12 THEN 'PM' ELSE 'AM' END

    Please note that the "hour"...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: How to get DATE in yyyy-mm-dd hh:mi:ss AM(or)PM

    select convert(varchar,getdate(), 120) + ' ' + CASE WHEN DATEPART(hour,GETDATE()) > 12 THEN 'PM' ELSE 'AM' END

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: get results from 2 tables?

    this may help

    SELECT MP.pname AS Phone_Name,

    MP.pnumber ...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: HierarchyID performance problems... Really???

    Jeff Moden (10/2/2011)


    I.... Since I haven't actually used the HierarchyID datatype (and, therefore, haven't used any of it methods up 'till now), I built myself a nice "little" million...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: how to display single column in result

    Not really clear on your question....???

    can you please provide script that will create and insert data that represents the problem you have..(see link in my sig if not clear)

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Access TO SQL DataType Issue

    long time since I migrated Access to SQL...so not really sure what SSMA actually does in the "conversion"

    for data types : http://msdn.microsoft.com/en-us/library/ms187752.aspx

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Access TO SQL DataType Issue

    This may help

    http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=26709

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Query optimizing 2

    Ninja's_RGR'us (9/27/2011)


    Of course the SELECT will be tones faster.

    HOWEVER. Keep in mind that for any insert, update, delete in ANY of the tables of the indexed view, you will...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Query optimizing 2

    Jeff Moden (9/25/2011)


    J Livingston SQL (9/25/2011)


    Heh... no fair. I asked you for your results first. 😛

    I've not run your code yet. I was waiting to see if you...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Query optimizing 2

    Jeff....code below.

    if not clear, pls post back

    use tempdb

    GO

    --===== Conditionally drop the tables

    IF Object_id('vw_PreAg', 'V') IS NOT NULL

    ...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Query optimizing 2

    Do you have the code that built the 20M*30*100 data for both tables so we can test at the level you did?

    Did you do a comparison of the original code...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: Query optimizing 2

    First off....I agree with Jeff's test results having run on both 2005 std and 2008R2 dev.

    personally, I really dont like hardcoding pivot columns, and more often than not, will be...

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: How to convert rows to columns

    good article here

    http://www.sqlservercentral.com/articles/T-SQL/63681/

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • RE: alternative of UDF

    just wondering if this post has any relevance to this one by same OP...???

    http://www.sqlservercentral.com/Forums/FindPost1176651.aspx

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

Viewing 15 posts - 2,176 through 2,190 (of 2,452 total)