473,382 Members | 1,615 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,382 software developers and data experts.

Query to display column name and value

Hi,
I have a table called SetupTable, which contains 35 attributes. all the attributes a re of type Char(1), ususally contain either 'y' or 'n' .

So, i need a query to display the column name and the value , whose value is 'y' per each row.

is it posible in Oracle 11g ??


Appriciate the quick response.
Oct 7 '11 #1
1 2166
Rabbit
12,516 Expert Mod 8TB
Basically, you want to get the table into the following format

SomeKeyField, AttributeName, AttributeValue

I don't know if oracle has unpivot but if it does, you can use that. Otherwise, you can use a union query to achieve the same affect.
Oct 7 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: Colleyville Alan | last post by:
I am trying to turn a short and fat (63 columns) table into one that is tall and skinny (7 columns). Basically, I am trying to create a "reverse crosstab" using a looping structure in VBA along...
1
by: ae | last post by:
My datareader looks like this where dtrItemList is the datareader and chklExceptionList is my checkboxlist. the rows come in just fine, but I need help also including the name of the columns for...
3
by: Meena | last post by:
Hi Every Body, I have created a crystal Report and linked to my vb.net forms and working fine, I added more drill drowns in groups everything fine, but What I need is I am not able to display...
4
by: Sparta71 | last post by:
Hello, I'm pretty new to this, but I'm working on an MS Access DB and I'm trying to create a query that will accept a column name as a parameter. The table is set up to show an employees base...
1
by: imauser | last post by:
I have a database(PostgreSQL) table(about 70k rows).I am developing an ASP webpage and there is a list-box on it which contains the name of the columns of that table. User selects the column name...
1
kaleeswaran
by: kaleeswaran | last post by:
hi! i want to display the database fields with the respective value... like , my table is:pay_allow_details. from that i have column name like :h_house_rent,hill_allow,risk_allow. so...
1
by: Big Moxy | last post by:
Problem URL - http://projects.zanalysts.com/ariviewer/display.asp?ID=11 I'm using Access as the "database". I get this error in the above URL: ADODB.Fields error '800a0cc1' Item cannot be...
1
by: ananth | last post by:
Hi All, I am getting an SQL Error Inserted Value to LARGE FOR COLUMN .I know the cause for this error Is there any specific error handling method where in i can find for which column...
2
by: sumanta123 | last post by:
Dear Sir, In my develpment i am getting stuck for a senario.Kindly please help me for it. Everytime we give the request we get the response of 8 records and its corresponding value. Then next...
4
by: Mangala Teli | last post by:
I have table as Table1 p_cd dt qty price amt 001 12/13/2009 10 20 200 002 12/14/2009 5 10 50 001 12/15/2009 10 20 200 001 12/19/2009 8 20 160 i want result as p_cd ...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.