Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. pbibler

    Can't Shrink a SQL 2005 Database

    When I try to shrink one of my db's, I get the following error: "File ID 1 of database ID 6 cannot be shrunk as it is either being shrunk by another process or is empty." The database is 140GB, of which it shows 40GB free, I just can't get it to shrink. I have done DBCC shrinkfile, and DBCC...
  2. pbibler

    Selecting Top 200 Rows by Multiple Criteria

    Thanks PH, that seems to work. I appreciate the assistance.
  3. pbibler

    Selecting Top 200 Rows by Multiple Criteria

    I would like to select top rows by multiple criteria. I have division and dollars, and I would like to select the top 200 from each division by dollars. I keep trying things like this: SELECT TOP 200 DIV, Dollars FROM [This Week Data] WHERE ((([This Week Data].DIV)=11)) ORDER BY [This Week...
  4. pbibler

    Connecting to Multiple Informix DB's

    I should also add, my goal is to use SQL Server 2005 to automate several queries, so that's the ideal place for a solution. However, I can't make it work using other query tools as well. Thanks, Paul
  5. pbibler

    Connecting to Multiple Informix DB's

    I have 11 different databases to query from, each with a different IP address, name, etc. I have installed SDK, the driver version is 3.80. My problem is this: I have created 11 data sources, 11 entries in the hosts file also, but each data source points to the same host. If I change the...
  6. pbibler

    Export a query to multiple Excel sheets?

    CautionMP, thanks, I will check this out. I haven't used VB before, but I'm sure I can get someone to assist. SkipVought, that was the first thing I said to my customer, but in the end, I have to satisfy them. I'll make sure to pass on my pain the them, though ;-)
  7. pbibler

    Export a query to multiple Excel sheets?

    Hi Doug, Exporting really isn't the problem, it's exporting to multiple sheets. I've been able to export the whole thing to one sheet pretty easily. I need some iterative way to export, I guess.
  8. pbibler

    Export a query to multiple Excel sheets?

    I have a query which returns about 10,000 rows. One of the columns is dept. My customer would like me to create one Excel sheet per value of dept (all in the same .xls file, about 30 of them). It's easy enough, though tedious, to copy and paste, or create multiple queries, but I would like to...
  9. pbibler

    Rank Function in Mainframe DB2

    Sorry, I'll post the work-around, I never got an email that you had posted this. Basically, what I wanted to do was select only the row that had the most recent date. So I created a subquery from the same table which had the max(date): SELECT a.DIV_NO,a.ITM_NO FROM NOKDE.OKIITIO a...
  10. pbibler

    Rank Function in Mainframe DB2

    I figured another way around it, but it's a nice function. Too bad. Thanks for your response, much appreciated. Paul
  11. pbibler

    Rank Function in Mainframe DB2

    I can't get the following query to work: SELECT DIV_NO,ITM_NO, RANK() OVER (ORDER BY ITM_LAST_SH_DT) AS R1 FROM NOKDE.OKIITIO WHERE ITM_NO= '15310' It gives me a "Function Rank was not found" error. I thought Rank was an ANSI standard function. There's always the chance our system was...
  12. pbibler

    Tables remain in Relationship Window

    I suspect I might have corrupted the database somehow. In making other changes, I suddenly had relationships appear that weren't there before. So I just created new tables and appended the data from the old tables. Problem solved, though with extra work. Sorry for bothering you with this. Paul
  13. pbibler

    Tables remain in Relationship Window

    PH and Alex, I've done both of those, and still I can't change the table designs. I get the message that I have to delete its relationships in the Relationships window. I should add that there are no links between the two tables, they simply won't go away. Any other ideas? Your assistance...
  14. pbibler

    Tables remain in Relationship Window

    I have 2 tables that I can't delete from the Relationships window. They have no line between them, they just won't go away. I delete them, but when I show all again, they reappear. It's preventing me from making a change to one of my tables. Any ideas? Thanks, Paul
  15. pbibler

    Ranking Data

    PHV, this is sweet. It makes perfect sense when I think about it, but I never would have thought about it without seeing your post. Big star for you, buddy!
  16. pbibler

    Duplicate columns in outer join

    I don't think so, I think I might be out of luck. Thanks for your help, though, you're great to try and help. I guess I'll have to come up with something else. Paul
  17. pbibler

    Duplicate columns in outer join

    Thanks, BillDHS. I've tried to use this, but I'm not sure how I could do it. I can make a table with the column names, but how can I use that to select from and join my tables? I'm no expert on derived tables. Conceptually, I can see how you could do something like: create table tab1 as (...
  18. pbibler

    Duplicate columns in outer join

    I have several tables which I want to join into one very large table (~950 columns). These tables all have a key to link them, but that key has the same name in all tables. So when I type in: select a.*, b.*, c.* from a left outer join b left outer join c (I've simplified to save space) I...

Part and Inventory Search

Back
Top