Here's the query I'm building, which gives me exactly what I need:
select s01.seq,
s01.cn,
s01.cv
from (select 1 as seq, 'ID' as cn, to_char(id) as cv, id from schema.apps
union
select 2 as seq, 'APP_NAME' as cn, to_char(app_name) as cv, id from schema.apps...
I ended up going with Carp's suggestion. While I like Andy's idea of pulling the column names dynamically, SQL alone does not provision ability to use variables as for fieldnames. I could do this in a proc but just sticking to vanilla SQL for this.
Thanks again for pointing me in the right...
Andy, that's an interesting idea. I can see potential challenges but it gives me an approach, which is more than I had when I posted the question.
If I can get this to work, I'll post the results. Thanks for the suggestion.
We have an application that includes a people searcher. As people enter text, it searches four different fields (first name, last name, ID, email address) for the text entered.
This works awesomely.
If I enter "Lawrence", it will find me, along with anyone who has "Lawrence" in their first...
Thanks for the responses. I'm glad I checked here because I didn't get my notifications.
Skip - you are correct, I'm essentially trying to mimic Excel's transpose operation. Of course Excel doesn't have to contend with datatype conflicts the way an Oracle query would. Alas, Excel is not an...
I'm trying to transpose a query resultset and I'm struggling finding what I'm looking for in Google.
I'm developing an in-house application that inventories applications that our division supports. The inventory will include bringing in information from disparate data sources and pushing...
Looks like I found the root cause: it appears to have been the decode function.
Again with Google, this time included "decode" in the criteria and I noticed a number of searches related to SQLLDR, incorrect dates, and Decode. So I modified my control file thusly:
birthdate...
Thank you for your response John,
You are correct that Oracle is acting as if it's only receiving RR rather than YYYY. That's what's baffling to me. The dates include the century (see examples from my original post plus the actual sample lines I was assembling as you were posting).
I'm also...
I've encountered an issue I've never seen before and I couldn't find a solution through Google.
I'm using SQLLDR to bring data from some text files, nothing particularly special. The files are CSV with double-quotes where needed. The inbound data appears good.
The problem is that dates prior...
My initial thought would be to have the AD role passed as an input parameter to the proc and use it to mask the data (return blanks, encrypted values, etc.) for the applicable fields. I haven't worked with SQL Server for a long time, but if memory serves, you could even use it as a conditional...
I have an intranet site that uses LDAP for authentication and authorization. I've done this for nearly a decade using ColdFusion and a couple of years with ASP.NET. There's one difference on this site - the initial call to LDAP takes a long time (27 seconds) to validate and complete page...
Got it! It turns out it was my CSS definitions after all. Sorry about posting a CSS issue in the ASP.NET forum. [blush] I'll post what I found in case someone else finds this useful.
I finally found the right question to answer, which led me here...
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.