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 derfloh 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. 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.
  16. twifosp

    Database Size

    Is there a way to determine database size in bytes through query analyzer? I need to determine how many gigabytes of data a database I have is, but I do not have dbo rights, so I can not view the size in enterprise manager.
  17. twifosp

    Parsing Text

    That's way better. Thanks George!
  18. twifosp

    Parsing Text

    Here is what I have so far, sorry for the messy code: Declare @data Table(data varchar(100), region1 VarChar(100), country varchar(100), state varchar(100), city varchar(100), city_desc1 varchar(100), city_desc2 varchar(100) ) Declare @parse Table(Word VarChar(20)) Insert Into @data(Data)...
  19. twifosp

    Parsing Text

    Sorry, forgot to answer a question. Yes there is a primary key as an integer.
  20. twifosp

    Parsing Text

    The data type is varchar sql 2000 The data should ultimately look like a table that has 6 different columns (that's the max number of |) It can just be region_desc_1, region_desc_2 .... 6 for right now. The root of the problem is I have some other data I am attemping to join to this table. I...

Part and Inventory Search

Back
Top