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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by twifosp

  1. twifosp

    ORDER BY in Coalesce function

    Oh, well that's easy enough. It stuffs charecters in a string. Sometimes it is that easy.
  2. twifosp

    ORDER BY in Coalesce function

    @gmmastros -- Nice thought, but none of the records are empty. @markros -- Thanks for the tip. Based on your first link I'll switch to the for xml path. Works faster too, as you said. SELECT soldtocustomer, stuff((select ',' + Name from valignmentmaster a1 where a1.soldtocustomer =...
  3. twifosp

    ORDER BY in Coalesce function

    I've written a function to coalesce mutliple rows into one: ALTER FUNCTION [dbo].[CombineRepNames] ( @CustomerNumber varchar(50) ) RETURNS varchar(1000) AS BEGIN DECLARE @VAR varchar(1000) set @VAR = '' SELECT @VAR = coalesce(@VAR + ' , ','') + name FROM valignmentmaster WHERE...
  4. twifosp

    Extract SQL Code from a broken query

    Oh I see. When I press control G it opens up the visual basic editor. I assumed that's where your code went. I didn't notice that it has an IMMEDIATE box in the bottom where I am supposed to put your code. It works, thank you sir!
  5. twifosp

    Extract SQL Code from a broken query

    I tried this: Sub test() Print CurrentDb.QueryDefs("totals").SQL End Sub And the error message I get is: method not valid without suitable object.
  6. twifosp

    Extract SQL Code from a broken query

    I have a query that uses a sub query in the select statement. Example: Select * from (select * from tablea union select * from tableb) I know that access will randomly remove your parenthesis in these examples and turn them into brackets. This has apparently happened to me and now I can't...
  7. twifosp

    Running Sum BY Group

    It is technically for BO desktop intelligence. Formulas should work for both, right?
  8. twifosp

    Running Sum BY Group

    3 groups in this particular dataset, but it can vary. I would say it is not static.
  9. twifosp

    Running Sum BY Group

    Oops, I think I posted this in the incorrect forum.
  10. twifosp

    Running Sum BY Group

    I have some data that looks like: Date GroupA GroupB Units 10/8/2009 ABC AAA 100 10/8/2009 DEF BBB 150 10/8/2009 GHI CCC 90 10/9/2009 ABC AAA 105 10/9/2009 DEF BBB 155 10/9/2009 GHI CCC 95 I want to create a running total by group and by date. So the data would look like this: Date GroupA...
  11. twifosp

    Find Max value of a count

    Dagon -- Thank you. I did not know about the partition and ranking functions in Oracle. Good to learn something new.
  12. twifosp

    Find Max value of a count

    SantaMufasa, Thank you for the response. It helps me out, but I should have been more clear about my data. I need to look at a data set that has many cities. Essentially I want to return something like this: City dstnct_rgn_codes max_rgn_code max_rgn_code_count houston 2...
  13. twifosp

    Find a value from a max count in a sub query

    I have some data that looks like this: region_code city zip AAA Houston 77076 AAA Houston 77024 AAB Houston 77024 The region_code is entered manually by a multitude of different people. It should always be the same thing for each city, but some times it gets messed up. I am...
  14. twifosp

    Find Max value of a count

    I have some data that looks like this: region_code city zip AAA Houston 77076 AAA Houston 77024 AAB Houston 77024 The region_code is entered manually by a multitude of different people. It should always be the same thing for each city, but some times it gets messed up. I am...
  15. twifosp

    Database Size

    That's the first thing I tried. Sorry I probably should have mentioned that. I get a "cannont insert the value NULL into column ''; column does not allow nulls. INSERT fails. The statement has been terminated." I can't set the sp_changedbowner to SA either without the proper rights.

Part and Inventory Search

Back
Top