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...
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...
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...
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...
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...
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...
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...
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...
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...
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...
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?
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...
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...
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...
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
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.