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 bkrike 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 matrun

  1. matrun

    Transform Multiple Rows To Multiple Columns In Oracle

    Hi - thanks for that; I already have that as a solution for comma-delimiting a list into one column; however the user's requirement was that it would go into separate columns, the maximum number of columns equating to the maximum number of delimited information (were that all in one column), in...
  2. matrun

    Transform String Into Multiple Columns

    Hi - er, well see other post. Do you mean homework as in school homework??! no, i'm just posting on this forum like i've always done. i've never had a problem before! i manage a database team but am not a dba, so when i do need to write these kind of queries i sometimes need some expertise to...
  3. matrun

    Transform Multiple Rows To Multiple Columns In Oracle

    Hi - no, it's not 'homework', although i'm not sure what you mean; i'm 35, not a schoolkid!! i've actually worked it out using decode but can't [with that] get this to base the number of resultant columns on the number of columns that would appear for the string with the highest number of...
  4. matrun

    Transform Multiple Rows To Multiple Columns In Oracle

    Could anyone tell me how I would transform multiple rows into multiple columns in oracle, assuming that i did NOT know the total number of outgoing columns (i.e. it's flexible). So turning a list like this: NAME OCCUPATION MATT BUILDER JEFF BUILDER GEORGE BUILDER CHRIS PLUMBER...
  5. matrun

    Transform String Into Multiple Columns

    Hi there - in Oracle SQL - does anyone know how to take a string and split it into multiple columns, where the number of distinct strings, and therefore output columns, is variable? For example; Name: Matt Rundle John Smith Warren Hubert Jones Martine Louise Jane Smith would go to...
  6. matrun

    String Aggregate In Oracle 10g

    Thanks! Fantastic. Thanks so much.
  7. matrun

    String Aggregate In Oracle 10g

    Hello there - could anyone help me with a quick question on string aggregation. Is it possible to write some SQL on the fly (i.e. not PL/SQL) that would aggregate multiple rows into one column. For example imagine a table called people, with columns name and city; how would I amend the query...
  8. matrun

    Character counts in a string

    Thanks! Absolutely what I was after. Thanks again! Matt
  9. matrun

    Character counts in a string

    Can anyone tell me how to count the number of times a character appears in a string, using jet SQL? Any suggestions welcome! Thanks Matt
  10. matrun

    Querying a string in character order

    Hi there I'm trying to create an anagram solver and have written the following code. It basically prompts for a string and then matches individual chars in that string to chars in words in a simple dictionary (just in a normal table). I can get it to work but to ensure no additional letters...
  11. matrun

    Create Table Name from a Field Value

    Hi there - anyone know how to create a new table in Access named after the value of a field in another table? The latter table would only be one record in any circumstance. E.g., table with ID value = 123456 would be referenced to create a new table called "123456_" etc... Any tips greatly...
  12. matrun

    Selecting the top 'x' of a range and reporting it

    Oh guys - I'm afraid it still returns a maximum value ID = 1. I feel bad asking the question now. I think the problem is that it needs to be done in terms of routines - select genre, find the top 5 IDs, then repeat for next genre on the list. The problem is that bit of code isn't able to...
  13. matrun

    Selecting the top 'x' of a range and reporting it

    Hi - just to go back to you earlier there, VJ; I did what you put up there, but that's when I got this grouping: CountOfSTOCK_PRODUCT_ID GENRE_DESC LABEL_DESC 1852 CLASSICAL DECCA 2707 CLASSICAL EMI CLASSICS 2365 CLASSICAL NAXOS 1732 FEATURE FILM CINEMA CLUB 1869...
  14. matrun

    Selecting the top 'x' of a range and reporting it

    Hi Leslie Yeah - it's actually DISTR_LABEL_GENRE. You're right about the other. When I paste that in, it doesn't recognize the d. prefix of D.COUNTOFSTOCK_PRODUCT_ID and so on (is prompting for a value). I assume d. is an alias?
  15. matrun

    Selecting the top 'x' of a range and reporting it

    Interesting! Well, if I try that exactly, it prompts for a value for CountOfSTOCK_GENRE_DESC, but that's because I don't have a field called that - it's called just genre_desc. If I remove that, and keep the DESC in at the end, it gives me this: CountOfSTOCK_PRODUCT_ID GENRE_DESC LABEL_DESC...

Part and Inventory Search

Back
Top