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 Chris Miller 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. 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...
  16. matrun

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

    Oh dear guys, I'm afraid I tried yours Leslie, and it returns all records with an ID = 1!!!! Argh! What to do?
  17. matrun

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

    Hi - that either returns a) everything if the order by is on genre_desc or, b) if it's by ID, then it just lists all the records with an ID value if 1! I tried SELECT CountOfSTOCK_PRODUCT_ID, GENRE_DESC, LABEL_DESC FROM Distr_Label_Genre WHERE CountOfSTOCK_PRODUCT_ID in ( select TOP 5...
  18. matrun

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

    Hi - it's long integer (typical Access!). I've seen what's going on; it's taking the ID bit, and saying, what is the highest ID value that all genres have in common, which is 50, and then doing the next in line. So it's looking at the ID first globally, finding the highest one common to all, and...
  19. matrun

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

    Hi - that is really helpful! thanks... It seems though to be selectively returning 4 or 3 lines each time, without being the top ones. So, against classical, I had results returning with 50, 26, 7 & 3, (only 4), even though the highest value was 1693. Why do you think it's grouping like that? M
  20. matrun

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

    OK thanks - for example; 22 GOSPEL/CHRISTIAN VARESE SARABANDE 18 GOSPEL/CHRISTIAN WORD 17 GOSPEL/CHRISTIAN ACE 16 GOSPEL/CHRISTIAN EMI 15 GOSPEL/CHRISTIAN REBEL 15 GOSPEL/CHRISTIAN SHANACHIE 14 GOSPEL/CHRISTIAN ACE 14 GOSPEL/CHRISTIAN COLLEGIUM 13 GOSPEL/CHRISTIAN COMPENDIA 12 GOSPEL/CHRISTIAN...

Part and Inventory Search

Back
Top