Forum Replies Created

Viewing 15 posts - 31 through 45 (of 54 total)

  • RE: Using a subquery in select list with a GROUP BY clause?

    Doh! I realised that almost the exact second I clicked on 'Post Reply'.

    Jason

    ---

  • RE: Using a subquery in select list with a GROUP BY clause?

    Grasshopper,

    People other than the original question poster learn from threads and the code posted, so in the future it would be helpful if you could post your code.

    Considering how willing...

  • RE: NOT EXISTS ?

    Thanks for the answer Gail. I think I understand it now:- Without an additional clause such as a correlation or WHERE criteria then EXISTS can only return a...

  • RE: Query Help?

    Your function uses Row_Number. In my last post I mention that I'm using SS2K so Row_number wasn't an option. I could see how to do it in SS2005,...

  • RE: Query Help?

    Tim,

    What if there were two people of the same name sharing the same ID?

    Your WHERE criteria is what achieves the 'one row per pairing', but it

    would have a problem if...

  • RE: SQL Statement (Grouping)

    Thanks for the link Jack, interesting article.

    Jay

    __

  • RE: Query Help?

    Thanks for the answers guys. It isn't a real-world problem as such. It just relates to a query I was writing a few days ago, which made me...

  • RE: Query Help?

    Thanks guys.

    Of the two suggestions Matt's gives me the required output when using the sample data.

    Although I think I may have over-simplified the scenario by using the word 'pairs'.

    Matt, your...

  • RE: select 'first' five non null values based on another non-sequential field

    I've figured out one way:

    select top 5 ID,

    Country

    from #temp1

    where ID in (14, 8, 23, 3, 10, 12, 17, 13, 16, 25, 23, 24) and...

  • RE: Scripts to create AdventureWorks

    Doh! When I run SSMS as an administrator, I then receive the following:

    CREATE DATABASE permission denied in database 'master'.

    RESTORE HEADERONLY is terminating abnormally. (Microsoft SQL Server, Error: 262)

    I told you...

  • RE: Scripts to create AdventureWorks

    Great..thanks.

    I'm not a DBA, but a business analyst, so just use SSMS for querying and reporting/olap work, so have never needed to worry about permissions. It's only since installing...

  • RE: Scripts to create AdventureWorks

    Hi,

    Thanks again for backing up the database. When I restore it, I can restore from device, select the file, and see the contents. But after selecting 'restore' I get...

  • RE: Scripts to create AdventureWorks

    Wow....thanks Lowell.

    I'm just downloading it now (but am doing so via 3G so will take a while).

    Out of interest, the error message when trying to attach originally is pasted below...

  • RE: Scripts to create AdventureWorks

    Hi Luke,

    initially the msi's wouldn't even install. (possibly complicated by the fact that I'm running SSMS in a Windows XP guest os on a Mac using Parallels software).

    But when...

  • RE: Include field in SELECT but don't output?

    Doh! Told you I was a novice. The query runs fine when I remove it from the select but leave it in the group by....it's always the little, simple...

Viewing 15 posts - 31 through 45 (of 54 total)