LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-12-2010, 07:17 AM   #1
kpachopoulos
Member
 
Registered: Feb 2004
Location: Athens, Greece
Distribution: Gentoo,FreeBSD, Debian
Posts: 705

Rep: Reputation: 30
SQL -any value for numeric or string field


Hallo,
how do i ask in a query for any numeric or string field? It may not have any meaning, but i need it to fill a toplink DataReadQuery in java....

Something like " select * from table where table.fieldA='?' "

Thanks
 
Old 02-12-2010, 10:14 AM   #2
redgoblin
Member
 
Registered: Jun 2005
Location: UK
Distribution: Debian
Posts: 189

Rep: Reputation: 41
Do you mean you want the result set to consist of any fields in the data set that's either numeric or text?

Or do you mean you want records where a certain field (or fields) contain numbic or text values?
 
Old 02-12-2010, 10:53 AM   #3
kpachopoulos
Member
 
Registered: Feb 2004
Location: Athens, Greece
Distribution: Gentoo,FreeBSD, Debian
Posts: 705

Original Poster
Rep: Reputation: 30
Quote:
Originally Posted by redgoblin View Post
Do you mean you want the result set to consist of any fields in the data set that's either numeric or text?

Or do you mean you want records where a certain field (or fields) contain numbic or text values?
Thanks for the response, i found it...

select * from table where table.fieldA IS NOT NULL;

(this would return the whole table in this case)
 
  


Reply

Tags
sql



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Replacing a numeric string with a sequence of numbers ziggy25 Linux - Newbie 13 12-03-2009 10:18 AM
Split string and numeric with perl kariagekun Programming 4 11-05-2009 07:31 PM
problem in comparing numeric with string naren_0101bits Programming 1 01-28-2008 08:10 AM
remove the extra numeric field in a text file powah Programming 13 01-08-2008 08:24 PM
MY SQL Clean up a field SimonT Programming 4 03-31-2007 08:36 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 07:18 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration