The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Special Forums > UNIX and Linux Applications
.
google unix.com



UNIX and Linux Applications Discuss UNIX and Linux software applications. This includes SQL, Databases, Middleware, MOM, SOA, EDA, CEP, BI, BPM and similar topics.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Executing a Oracle SQL statement in a UNIX script ganga.dharan Shell Programming and Scripting 1 12-08-2008 10:44 AM
Supress ' quotes in a select statement inside Shell Script mahabunta Shell Programming and Scripting 1 12-14-2006 06:29 PM
Select entries between two dates by converting Unix timestamp in Oracle Database. amitsayshii UNIX for Advanced & Expert Users 1 08-08-2006 11:00 AM
Want to use the output of Select statement in Unix script akhilgoel9 Windows & DOS: Issues & Discussions 4 05-27-2005 09:52 AM
Pipe SQL select statement results to script houtakker UNIX for Dummies Questions & Answers 6 10-31-2003 01:20 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-26-2009
benefactr benefactr is offline
Registered User
  
 

Join Date: Jul 2007
Posts: 71
Oracle Select IN statement

If I recall, when I used informix I could do a sql statement like:
Code:
SELECT Value from Table WHERE ID in (100,200,300);
How do I do this in Oracle? I believe I am using Oracle 10 if that matters.
Thanks.
  #2 (permalink)  
Old 03-26-2009
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,717
The datatypes have to correspond to the column's definition. The syntax is okay as you have it. Your example works for numeric datatypes.

Code:
-- varchar
in ('A', 'B', 'C')
Closed Thread

Bookmarks

Tags
oracle, select

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:16 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0