Forum Replies Created

Viewing 15 posts - 1,846 through 1,860 (of 2,894 total)

  • RE: combining tables

    slowder (3/20/2012)


    try this:

    [font="System"]SELECT

    employeeID, dateHired, employeeName, max([2010Salary]), max([2011Salary])

    FROM (

    SELECT

    employeeID, dateHired, employeeName, salary as [2010Salary], 0 as [2011Salary]

    FROM [2010Table]

    UNION

    SELECT

    employeeID, dateHired, employeeName, 0 as [2010Salary], salary as [2011Salary]

    FROM [2011Table]

    )x

    GROUP BY

    employeeID, dateHired, employeeName[/font]

    ?????...

    _____________________________________________
    "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: SSIS 2005 package works but the related SQL 2008 job fails

    What do you use to ZIP your csv file? Is it installed on the SQLServer 2008 machine?

    _____________________________________________
    "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: MS access to sql server 2008

    SKYBVI (3/20/2012)


    Hi,

    i have mdb files used by ActiveExperts Network monitor manager.

    I want to migrate those access files to sql server databases.

    How can i do it.

    P.S. 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: BCP out slow first time, fast after. Help!

    Ah, that's nightmare then, SQLServer still not allows to specify filegroup in SELECT..INTO. May be it gets fixed in SQL2012?

    Have you tried to use SSIS for comparison? It may be...

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

    Actually, you may not need to use it if you have dedicated Employee table (which most likely you do have). Then your query can use just left joins, something like:

    SELECT...

    _____________________________________________
    "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: BCP out slow first time, fast after. Help!

    As Jeff suggested, SELECT ... INTO, will outperform BCP in this case, looks like nothing should stop you from using it. You will not need to create you target table...

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

    You should use FULL OUTER JOIN!

    _____________________________________________
    "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: Simplify the query?

    Then you don't need any of the left joins! They make no sense in the query as nothing is taken from them, and select is not restricted by them 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: Linked Server in Win 2008 and SQL Server 2005

    Have you reboot after install and changing network configuration file?

    _____________________________________________
    "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: Simplify the query?

    But joining all temps into one is not simplification of the query! It is quite opposite!

    Also, as I've said in my previous post, your select statement only gets columns 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: When does support for SQL Server 2005 end?

    Please note: extended support for SQL Server 2005 is up until sometime in 2016...

    So, if you work for a large company, you are quite likely still have 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: Linked Server in Win 2008 and SQL Server 2005

    Once I've used the following guide and it did work for me:

    http://www.ideaexcursion.com/2009/01/05/connecting-to-oracle-from-sql-server/

    _____________________________________________
    "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: Simplify the query?

    In a query you've posted, all three columns you select are from the same (first) table left joined to all other sub-queries. Therefore it can be simply written as:

    SELECT DISTINCT...

    _____________________________________________
    "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: Can i change it in single query - Was pivot table in MS Access

    ...

    Can I have any other better approach for this.

    ...

    O' Yes, You can! Please read this one:

    http://www.sqlservercentral.com/articles/Best+Practices/61537/

    Actually, you are not a newbie here...;-)

    _____________________________________________
    "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 get YTD & Quarterly sales??? Any help please?

    If you need help and want to get relevant one and quick, you will need to follow forum etiquette as described here: http://www.sqlservercentral.com/articles/Best+Practices/61537/

    Otherwise, people here left to guess what exactly...

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