Hi All,
I wrote a function which will return varchar i.e '10','11','12','13' and I am passing this value in IN cluase in SELECT query as -
SELECT * FROM VV WHERE V1 IN (SELECT FUN(1) FROM DUAL).
-
Where, FUN(1) is my function name, which accpets NUMBER as IN parameter and it will return VARCHAR. i.e '10','11','12','13' .
When I ran the above query I am getting 'no results found'. But when I ran the query as -
SELECT * FROM VV WHERE V1 IN ('10','11','12','13' ) -- I am getting the result.
-
Can any one help me.
Thanks in Advance.
4 1152
Hi,
Welcome to TSDN!!
Make sure you follow POSTING GUIDELINES every time when you post in the forum.
Thanks
MODERATOR
Please enclose your posted code in [code] tags (See How to Ask a Question).
This makes it easier for our Experts to read and understand it. Failing to do so creates extra work for the moderators, thus wasting resources, otherwise available to answer the members' questions.
Please use [code] tags in future.
MODERATOR
Hi All,
I wrote a function which will return varchar i.e '10','11','12','13' and I am passing this value in IN cluase in SELECT query as -
SELECT * FROM VV WHERE V1 IN (SELECT FUN(1) FROM DUAL).
-
Where, FUN(1) is my function name, which accpets NUMBER as IN parameter and it will return VARCHAR. i.e '10','11','12','13' .
When I ran the above query I am getting 'no results found'. But when I ran the query as -
SELECT * FROM VV WHERE V1 IN ('10','11','12','13' ) -- I am getting the result.
-
Can any one help me.
Thanks in Advance.
Please POST your function that you have implemented for our experts reference?
Hi,
Check whether VV table has got records for V1 field ='10'... as per the condition.
May be it dosent have any matching records (as given in Where condition) so, you are getting No Results Found ..
Regards
Veena
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Wenin |
last post by:
I have four total tables.
Table One (Documents)- List of Documents. Each record has two fields
related to this issue. First field (Document_ID) is the ID of the
document, second field is the...
|
by: grunar |
last post by:
After some thought on what I need in a Python ORM (multiple primary
keys, complex joins, case statements etc.), and after having built
these libraries for other un-named languages, I decided to...
|
by: Dixie |
last post by:
I have a problem using Dev Ashish's excellent module to concatenate the
results of a field from several records into one record.
I am using the code to concatenate certain awards onto a...
|
by: Marco Lazzeri |
last post by:
What about a SELECT syntax like that?
SELECT
CASE WHEN bar.foo_id IS NULL THEN bar.*
ELSE foo.*
FROM foo, bar
Anyway, I need a SELECT query that gets data from a FIRST TABLE if a
specific...
|
by: ja |
last post by:
Hello all,
How can I ramdomly select a list of records from an existing table?
For example: 500,000 names divided by 20,000 samples = 25. The N is
25, meaning samples would be sent to every...
|
by: Kwok |
last post by:
I searched a statement in google which is very common
e.g. data
Name ID
Carmen 123
David 456
Daisy 789...
|
by: RioRanchoMan |
last post by:
I have a forum table where the field Forum_ID of the first thread
corresponds to itself in the field Forum_Ancestor, and 0 (zero) for the
field Forum_Parent when it is the first topic in a thread:...
|
by: unabogie |
last post by:
I have a table with entries tied to a membership database. The problem
is that I want to select a limit of sixteen entries per member, per
day, where some members have 16+ entries per day.
I...
|
by: P3Eddie |
last post by:
Hello all!
I don't know if this can even be done, but I'm sure you will either help or suggest another avenue to accomplish the same.
My problem may be a simple find duplicates / do something...
|
by: dbuchanan |
last post by:
There are three parts to this
1.) How do I cascade menus?
2.) And, how do I cascade menus with a multi-select CheckBoxList?
|
by: Faith0G |
last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
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...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
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...
| |