Can someeone help! This works:
SELECT * FROM sometable
WHERE 1 IN (1, 2, 3) ;
But if I want something like this:
s_mylist VARCHAR2(20) := '1, 2, 3';
SELECT * FROM sometable
WHERE 1 IN ( s_mylist ) ;
It doesn't work. Can't I do this?
Thanks
Lisa 4 2393
"Lisa S." <lj******@vac-acc.gc.ca> wrote in message
news:ba**************************@posting.google.c om... Can someeone help! This works:
SELECT * FROM sometable WHERE 1 IN (1, 2, 3) ;
But if I want something like this:
s_mylist VARCHAR2(20) := '1, 2, 3';
SELECT * FROM sometable WHERE 1 IN ( s_mylist ) ;
It doesn't work. Can't I do this?
Thanks Lisa
It does not work because s_mylist is one thing the string '1, 2, 3' instead
of
where 1 in (1,2,3)
Also you are comparing numbers and strings - not good. compare numbers and
numbers.
Jim
"Jim Kennedy" <kennedy-down_with_spammers@no_spam.comcast.net> wrote in message news:<WKmjb.782313$Ho3.208508@sccrnsc03>... "Lisa S." <lj******@vac-acc.gc.ca> wrote in message news:ba**************************@posting.google.c om... Can someeone help! This works:
SELECT * FROM sometable WHERE 1 IN (1, 2, 3) ;
But if I want something like this:
s_mylist VARCHAR2(20) := '1, 2, 3';
SELECT * FROM sometable WHERE 1 IN ( s_mylist ) ;
It doesn't work. Can't I do this?
Thanks Lisa
It does not work because s_mylist is one thing the string '1, 2, 3' instead of where 1 in (1,2,3) Also you are comparing numbers and strings - not good. compare numbers and numbers. Jim
Hi Jim
Sorry, I guess I wasn't clear - What we are trying to do is to format
a string with the 'IN' items to check elsewhere and pass it into the
stored procedure. I guess my question is - can't I use a variable with
the 'IN' Operator ?
Thanks
Lisa
"Lisa S." <lj******@vac-acc.gc.ca> wrote in message
news:ba**************************@posting.google.c om... "Jim Kennedy" <kennedy-down_with_spammers@no_spam.comcast.net> wrote in
message news:<WKmjb.782313$Ho3.208508@sccrnsc03>... "Lisa S." <lj******@vac-acc.gc.ca> wrote in message news:ba**************************@posting.google.c om... Can someeone help! This works:
SELECT * FROM sometable WHERE 1 IN (1, 2, 3) ;
But if I want something like this:
s_mylist VARCHAR2(20) := '1, 2, 3';
SELECT * FROM sometable WHERE 1 IN ( s_mylist ) ;
It doesn't work. Can't I do this?
Thanks Lisa
It does not work because s_mylist is one thing the string '1, 2, 3'
instead of where 1 in (1,2,3) Also you are comparing numbers and strings - not good. compare numbers
and numbers. Jim
Hi Jim
Sorry, I guess I wasn't clear - What we are trying to do is to format a string with the 'IN' items to check elsewhere and pass it into the stored procedure. I guess my question is - can't I use a variable with the 'IN' Operator ? Thanks Lisa
Not that way. go to asktom.oracle.com and do a search. You will find
something there that will help you.
Jim This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Paul Miller |
last post by:
We've run into minidom's inabilty to handle large (20+MB) XML files, and
need a replacement that can handle it. Unfortunately, we're pretty
dependent on a DOM, so a pulldom or SAX replacement is...
|
by: RK |
last post by:
Hi,
In my application, I need to copy data from an Excel file into a SQL
table. The article related to this can be found at
http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B306572
...
|
by: black tractor |
last post by:
HI there..
l was just wondering, if l place a "table" in the "editable region" of my
template, will the text, graphics placed inside the this "table" MOVE BY
ITSELF??
l mean, recently l had a...
|
by: Marcin Dobrucki |
last post by:
I've been having some problems with a parse error that I can't figure
out (PHP 4.3.11 on Solaris9). Sample code:
<?php
// getting strange parse errors on this
class A {
var $value;
function...
|
by: John Baker |
last post by:
Hi:
I have two systems, one a W98 and the other XP Home. I have Access 2000 installed on both,
and have run into a difference in the way the two behave.
I have a table on which I wish to reset...
| |
by: markryde |
last post by:
Hello,
I saw in some open source projects a use of "!!" in "C" code;
for example:
in some header file
#define event_pending(v) \
(!!(v)->vcpu_info->evtchn_upcall_pending & \...
|
by: Chris Stankevitz |
last post by:
At link time, MSVC determines some of my libraries are unused and doesn't
link them into my exe. This undesirable feature causes problems when I
employ the factory pattern. With the factory...
|
by: Electric Co. |
last post by:
Hello,
I have two questions:
1.) Could I create a custom server control in 2005 in order to leverage
the CompositeControl base class and then use that control in 2003?
(fingers crossed but...
|
by: Robbie Hatley |
last post by:
Greetings, group. I just found a weird problem in a program where
a variable declared in a {block} after a "case" keyword was being
treated as having value 0 even though its actual value should...
|
by: fran7 |
last post by:
Hi, from help in the javascript forum I found the error in some code but need help. This bit of code works perfectly, trouble is I am writing it to a javascript function so the height needs to be in...
|
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...
| |
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...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
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...
|
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...
|
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,...
|
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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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 ...
| |