473,412 Members | 2,067 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,412 software developers and data experts.

How do I SELECT FROM columns where the COLUMNS has a PATTERN?

Hi there,

I've been looking far and wide on this one. I'm looking for a way to
select from columns where the columns have a certain pattern!

Example:

Instead of doing:

SELECT q1, q2, q3, q4, q5, q6, q7, q8, q9 FROM exam

I would like to do:

SELECT q* FROM exam

or

SELECT q% FROM exam

Whatever will match everything that has the letter q in it. Anyone
have an idea? I've been banging my head on this one.

Martin
p.s. I would appreciate an e-mail as well if you replay

ma****@marketbridge.com.no.spamed
Jul 19 '05 #1
9 1716
Ma****@marketbridge.com.no.spam.now wrote:
Hi there,

I've been looking far and wide on this one. I'm looking for a way to
select from columns where the columns have a certain pattern!

Example:

Instead of doing:

SELECT q1, q2, q3, q4, q5, q6, q7, q8, q9 FROM exam

I would like to do:

SELECT q* FROM exam

or

SELECT q% FROM exam

Whatever will match everything that has the letter q in it. Anyone
have an idea? I've been banging my head on this one.

Martin
p.s. I would appreciate an e-mail as well if you replay

ma****@marketbridge.com.no.spamed


what about eval() function? If we mean PHP.
Jul 19 '05 #2
Ma****@marketbridge.com.no.spam.now wrote:
Hi there,

I've been looking far and wide on this one. I'm looking for a way to
select from columns where the columns have a certain pattern!

Example:

Instead of doing:

SELECT q1, q2, q3, q4, q5, q6, q7, q8, q9 FROM exam

I would like to do:

SELECT q* FROM exam

or

SELECT q% FROM exam

Whatever will match everything that has the letter q in it. Anyone
have an idea? I've been banging my head on this one.

Martin
p.s. I would appreciate an e-mail as well if you replay

ma****@marketbridge.com.no.spamed


what about eval() function? If we mean PHP.
Jul 19 '05 #3
Ma****@marketbridge.com.no.spam.now wrote:
Hi there,

I've been looking far and wide on this one. I'm looking for a way to
select from columns where the columns have a certain pattern!

Example:

Instead of doing:

SELECT q1, q2, q3, q4, q5, q6, q7, q8, q9 FROM exam

I would like to do:

SELECT q* FROM exam

or

SELECT q% FROM exam

Whatever will match everything that has the letter q in it. Anyone
have an idea? I've been banging my head on this one.

Martin
p.s. I would appreciate an e-mail as well if you replay

ma****@marketbridge.com.no.spamed


what about eval() function? If we mean PHP.
Jul 19 '05 #4

To: Aggro

I'm actually using PERL! I should use PHP but I don't have time to
learn a new language. I'm thinking about what you said and the table
structure. I think you've got some thing there.

I cant use select * because there's other columns with other names

Martin

On Sun, 29 Feb 2004 15:55:41 GMT, Ma****@marketbridge.com.no.spam.now
wrote:
Hi there,

I've been looking far and wide on this one. I'm looking for a way to
select from columns where the columns have a certain pattern!

Example:

Instead of doing:

SELECT q1, q2, q3, q4, q5, q6, q7, q8, q9 FROM exam

I would like to do:

SELECT q* FROM exam

or

SELECT q% FROM exam

Whatever will match everything that has the letter q in it. Anyone
have an idea? I've been banging my head on this one.

Martin
p.s. I would appreciate an e-mail as well if you replay

ma****@marketbridge.com.no.spamed


Jul 19 '05 #5

To: Aggro

I'm actually using PERL! I should use PHP but I don't have time to
learn a new language. I'm thinking about what you said and the table
structure. I think you've got some thing there.

I cant use select * because there's other columns with other names

Martin

On Sun, 29 Feb 2004 15:55:41 GMT, Ma****@marketbridge.com.no.spam.now
wrote:
Hi there,

I've been looking far and wide on this one. I'm looking for a way to
select from columns where the columns have a certain pattern!

Example:

Instead of doing:

SELECT q1, q2, q3, q4, q5, q6, q7, q8, q9 FROM exam

I would like to do:

SELECT q* FROM exam

or

SELECT q% FROM exam

Whatever will match everything that has the letter q in it. Anyone
have an idea? I've been banging my head on this one.

Martin
p.s. I would appreciate an e-mail as well if you replay

ma****@marketbridge.com.no.spamed


Jul 19 '05 #6

To: Aggro

I'm actually using PERL! I should use PHP but I don't have time to
learn a new language. I'm thinking about what you said and the table
structure. I think you've got some thing there.

I cant use select * because there's other columns with other names

Martin

On Sun, 29 Feb 2004 15:55:41 GMT, Ma****@marketbridge.com.no.spam.now
wrote:
Hi there,

I've been looking far and wide on this one. I'm looking for a way to
select from columns where the columns have a certain pattern!

Example:

Instead of doing:

SELECT q1, q2, q3, q4, q5, q6, q7, q8, q9 FROM exam

I would like to do:

SELECT q* FROM exam

or

SELECT q% FROM exam

Whatever will match everything that has the letter q in it. Anyone
have an idea? I've been banging my head on this one.

Martin
p.s. I would appreciate an e-mail as well if you replay

ma****@marketbridge.com.no.spamed


Jul 19 '05 #7
Jay
Maybe you could get an array of column names using NAME and filter out the
ones you want with perl.

NAME
Returns a reference to an array of column names. Example:
$names = $sth->{NAME};
For instance, I use this to get the col names:

foreach $n (@{$sth->{NAME}}){
print "NAME: $n\n";
}

"Martin Laflamme" <co*****@marketbridge.com.no.spam.now> wrote in message
news:40***************@news.istop.com...

To: Aggro

I'm actually using PERL! I should use PHP but I don't have time to
learn a new language. I'm thinking about what you said and the table
structure. I think you've got some thing there.

I cant use select * because there's other columns with other names

Martin

On Sun, 29 Feb 2004 15:55:41 GMT, Ma****@marketbridge.com.no.spam.now
wrote:
Hi there,

I've been looking far and wide on this one. I'm looking for a way to
select from columns where the columns have a certain pattern!

Example:

Instead of doing:

SELECT q1, q2, q3, q4, q5, q6, q7, q8, q9 FROM exam

I would like to do:

SELECT q* FROM exam

or

SELECT q% FROM exam

Whatever will match everything that has the letter q in it. Anyone
have an idea? I've been banging my head on this one.

Martin
p.s. I would appreciate an e-mail as well if you replay

ma****@marketbridge.com.no.spamed

Jul 19 '05 #8
Jay
Maybe you could get an array of column names using NAME and filter out the
ones you want with perl.

NAME
Returns a reference to an array of column names. Example:
$names = $sth->{NAME};
For instance, I use this to get the col names:

foreach $n (@{$sth->{NAME}}){
print "NAME: $n\n";
}

"Martin Laflamme" <co*****@marketbridge.com.no.spam.now> wrote in message
news:40***************@news.istop.com...

To: Aggro

I'm actually using PERL! I should use PHP but I don't have time to
learn a new language. I'm thinking about what you said and the table
structure. I think you've got some thing there.

I cant use select * because there's other columns with other names

Martin

On Sun, 29 Feb 2004 15:55:41 GMT, Ma****@marketbridge.com.no.spam.now
wrote:
Hi there,

I've been looking far and wide on this one. I'm looking for a way to
select from columns where the columns have a certain pattern!

Example:

Instead of doing:

SELECT q1, q2, q3, q4, q5, q6, q7, q8, q9 FROM exam

I would like to do:

SELECT q* FROM exam

or

SELECT q% FROM exam

Whatever will match everything that has the letter q in it. Anyone
have an idea? I've been banging my head on this one.

Martin
p.s. I would appreciate an e-mail as well if you replay

ma****@marketbridge.com.no.spamed

Jul 19 '05 #9
Jay
Maybe you could get an array of column names using NAME and filter out the
ones you want with perl.

NAME
Returns a reference to an array of column names. Example:
$names = $sth->{NAME};
For instance, I use this to get the col names:

foreach $n (@{$sth->{NAME}}){
print "NAME: $n\n";
}

"Martin Laflamme" <co*****@marketbridge.com.no.spam.now> wrote in message
news:40***************@news.istop.com...

To: Aggro

I'm actually using PERL! I should use PHP but I don't have time to
learn a new language. I'm thinking about what you said and the table
structure. I think you've got some thing there.

I cant use select * because there's other columns with other names

Martin

On Sun, 29 Feb 2004 15:55:41 GMT, Ma****@marketbridge.com.no.spam.now
wrote:
Hi there,

I've been looking far and wide on this one. I'm looking for a way to
select from columns where the columns have a certain pattern!

Example:

Instead of doing:

SELECT q1, q2, q3, q4, q5, q6, q7, q8, q9 FROM exam

I would like to do:

SELECT q* FROM exam

or

SELECT q% FROM exam

Whatever will match everything that has the letter q in it. Anyone
have an idea? I've been banging my head on this one.

Martin
p.s. I would appreciate an e-mail as well if you replay

ma****@marketbridge.com.no.spamed

Jul 19 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: | last post by:
Is it possible to extend this function to dynamically create a combo boxes from the db table....How would do this...I tried passing a 'Select' type to the function but got a blank entry....Any...
2
by: David Nedrow | last post by:
OK, I have a problem which I'm guessing is simply my inability to figure out a select pattern in XSL. I have an XML file similar to the following: <?xml version="1.0"?> <?xml-stylesheet...
2
by: bettina | last post by:
I read somewhere that to gain efficiency it is advisable to avoid the use of select. But they don't explain why or what to use instead. Is it true? I habe a problem of speed (better to say of NO...
3
by: Dan V. | last post by:
How can I use real SQL on a DataTable? i.e. not array of rows using a filter... as in DataTable.Select. I read at : microsoft.public.dotnet.framework.adonet "As others have posted: There is no...
2
by: Vagabond Software | last post by:
I'm at a complete loss on this problem. I'm using a DataColumn Expression with the DataTable Select method to return rows matching a data. Rows are returned on my Windows XP Professional computer...
0
by: Vagabond Software | last post by:
I posted this problem earlier and now have more information. I use the DataTable Select method to get find the most recent "LastModified" date in a table of similarly named files. I then use the...
5
by: Dave | last post by:
Is there a way to divide a datagrid into "newspaper" style columns so that column 1 would have rows 1-10, column two would have rows 11-20 etc? Thanks, Dave.
3
by: CharlesA | last post by:
Hi folks, I really need help with the following scenario, I'm going to describe as well as a I can what the setup is and what I can't understand I'm using the framework 1.1 using ASP.net with...
2
by: Nacho | last post by:
Hi, I'm designing a new database and I have a doubt in which surely you can help me. I'm storing in this database historical data of some measurements and the system in constantly growing, new...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

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.