WHERE means that x must match a and y must match b, but not
necessarily from the same record.
M!ke
-Original Message-
From: Mark A Kruger [mailto:[EMAIL PROTECTED]
Sent: Monday, May 15, 2006 9:08 AM
To: CF-Talk
Subject: RE: Okay, here's *another* error message I've never see
other* error message I've never seen...
Rick Root wrote:
> Bryan Stevenson wrote:
>> sub-queries can only return one recordthus the error
>
> Actually Bryan, that's not true. Sub-queries can only return one column.
They can return more then one column too:
SELECT * FROM
Rick Root wrote:
> Bryan Stevenson wrote:
>> sub-queries can only return one recordthus the error
>
> Actually Bryan, that's not true. Sub-queries can only return one column.
They can return more then one column too:
SELECT * FROM table
WHERE (x, y) IN (SELECT a, b FROM otherTable)
Jochem
Bryan Stevenson wrote:
> sub-queries can only return one recordthus the error
Actually Bryan, that's not true. Sub-queries can only return one column.
SOME subqueries can only return one record - others can return multiple
records. That's why my original response was to ask what exactly th
> sub-queries can only return one recordthus the error
>
> So in the main SELECT clause there is a sub-query aliased as a
> columnit is
> retuning more than one record and bailing
Thanks all, you're pointing me in the right direction. Appreciate it.
~~~
Jeff,
It just means that your sub-query can return more than one row, which a
subquery used in comparison or selection cannot... Just selec the TOP 1 to
make sure this doesn't happen. It it is NOT supposed to happen, then you
have bad data or are not using all required criteria (ie. is_deleted = 0
sub-queries can only return one recordthus the error
So in the main SELECT clause there is a sub-query aliased as a columnit is
retuning more than one record and bailing
Cheers
Bryan Stevenson B.Comm.
VP & Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.48
[Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft
Access Driver] At most one record can be returned by this subquery.
You have a subquery in you sql statement in a place only one record can be
used, but the subquery is returning more then one row.
A simple example
SE
If your query is along the lines of:
SELECT column
FROM table
WHERE column = (SELECT column2 FROM Table2)
The subquery can return multiple results. However, the = operator (or <>,
>, >=, <, <=, etc.) only compares a single value to a single value.
Instead, your query shoul
Are you using Microsoft SQL Server? If so are you using the ODBC connector or
are you using the built in Microsoft SQL Driver? If both are yes you may want
to try the JDBC driver that Microsoft offers. I have done some advanced queries
that choked on the datadirect drivers, but worked with Micro
Usually it would be something like an embedded query returning more than one
result when it expected just one.
select * from users1
where username = (select name from users2 where firstname = 'Jeff'')
If the users 2 table contains more than one person named jeff, you're
screwed.
There are a numb
Jeff Small wrote:
> [Macromedia][SequeLink JDBC Driver][ODBC Socket][Microsoft][ODBC Microsoft
> Access Driver] At most one record can be returned by this subquery.
and the query is.
~|
Message: http://www.houseoffusion.com/
12 matches
Mail list logo