473,569 Members | 3,040 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Select column at runtime

ilikesuresh
47 New Member
hi
i have a table (table_Days)tha t contains columns
d0 d1 d2 d3 ............... d30

based on my result i want to either select d0 or d1 or d3 ....d30 at runtime and get the respected value on that column
plz any one can help me out!!!!!!
Sep 4 '07 #1
4 2167
debasisdas
8,127 Recognized Expert Expert
that can be eaily done by writing a simple PL/SQL block.
Sep 4 '07 #2
nramrits
18 New Member
hi
i have a table (table_Days)tha t contains columns
d0 d1 d2 d3 ............... d30

based on my result i want to either select d0 or d1 or d3 ....d30 at runtime and get the respected value on that column
plz any one can help me out!!!!!!
select * from table_days where &column_name=&a rgument
Sep 4 '07 #3
amitpatel66
2,367 Recognized Expert Top Contributor
You can accomplish this task easily by using a Simple PLSQL block or using a DECODE, CASE statement in the SQL query itself.
Sep 5 '07 #4
ilikesuresh
47 New Member
You can accomplish this task easily by using a Simple PLSQL block or using a DECODE, CASE statement in the SQL query itself.
Thanks for your guidelines
Sep 5 '07 #5

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

Similar topics

4
2718
by: psql-mail | last post by:
I am running a SELECT to get all tuples within a given date range. This query is much slwoer than i expected - am i missing something? I have a table 'meta' with a column 'in_date' of type timestamp(0), i am trying to select all records within a given date range. I have an index on 'in_date' and I also have an index on date(in_date). The...
19
3520
by: William Wisnieski | last post by:
Hello Everyone, I have a main form with a datasheet subform that I use to query by form. After the user selects two criteria on the main form and clicks the cmdShowResults button on the main form, the subform returns the records based on the two criteria. The criteria used on the main form are values selected in two list boxes. When the...
4
13486
by: JMCN | last post by:
i received a runtime error message 3346 when i ran the insert into select code. i have check to see if the query values and destination fields are the same and it appears so. atlas, i have no idea why my insert into query does not work. if anyone has suggestions, it would be appreciated. thanks in advance. Set db = DBEngine(0)(0) Set rst...
4
15095
by: Steve B. | last post by:
How do I find the column (index) number at runtime of a particular DataGrid column if I know the column header string //somthing like the following int x = datagrid.column;
3
1838
by: Tim Smith | last post by:
I've been benchmarking some very simple databases. By simple, I mean a table like this: CREATE TABLE bench ( id SERIAL, data TEXT ) CREATE INDEX bench_data_index ON bench (data) which is filled with 100k records, where the data values for each record are distinct (the data for record N is "text_item_N").
5
10276
by: Steve Bugden | last post by:
Hi, I would like to set the column widths in the ASP.NET GridView control at runtime I have tried the following: http://msdn2.microsoft.com/en-us/library/ms178296.aspx Which uses the following code on a button: Protected Sub Button1_Click(ByVal sender As Object, _
1
2726
by: David Veeneman | last post by:
I've added an unbound column to a bound DataGridView, and I want the unbound column to be the last column in the grid. But whenever I recompile, the unbound column is the first column in the grid. I'm guessing the problem has to do with the grid's AutoGeneratingColumns property-- perhaps the bound columns are being autogenerated, which...
11
3928
by: MurdockSE | last post by:
Greetings. My Situation: // I have an .xml file that I am reading into a dataset in the following code - DataSet ds = new DataSet("MyDataset"); ds.ReadXml(@"c:\data\"+cmyxmlfilename);
48
4213
by: Jimmy | last post by:
thanks to everyone that helped, unfortunately the code samples people gave me don't work. here is what i have so far: <% Dim oConn, oRS, randNum Randomize() randNum = (CInt(1000 * Rnd) + 1) * -1 Set oConn=Server.CreateObject("ADODB.Connection") Set oRS=Server.CreateObject("ADODB.recordset") oConn.Provider="Microsoft.Jet.OLEDB.4.0"...
0
7703
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
8138
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7681
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7983
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3662
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3651
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2118
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
950
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.