473,503 Members | 3,497 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

An expression of non-boolean type specified in a context where a condition is expected, near ')'.


Hi,

I am trying to create an update statement
on a table with a foreign key to the Users
table (userid).

I am getting the error:

An expression of non-boolean type specified in a context where a
condition is expected, near ')'.

Below is the Update statement.

UPDATE LastLogin SET
date = '2007-08-14 05:34:09.910',
status = 1 ,
activity = 0
WHERE
(SELECT ll.status, ll.activity, ll.date
FROM LastLogin ll, Users u
WHERE ll.userid = u.userid
AND u.email = 'd******@hotmail.com')

Thanks!

Aug 20 '07 #1
2 42390
It looks like you are trying to use a correated subquery without the
correlation, and without either the IN or EXISTS that makes use of
such a subquery. Perhaps this will give you some ideas.

UPDATE LastLogin
SET date = '2007-08-14 05:34:09.910',
status = 1,
activity = 0
WHERE EXISTS
(SELECT *
FROM Users u
WHERE LastLogin.userid = u.userid
AND u.email = 'd******@hotmail.com')

Roy Harvey
Beacon Falls, CT

On Mon, 20 Aug 2007 13:10:56 -0700, pbd22 <du*****@gmail.comwrote:
>
Hi,

I am trying to create an update statement
on a table with a foreign key to the Users
table (userid).

I am getting the error:

An expression of non-boolean type specified in a context where a
condition is expected, near ')'.

Below is the Update statement.

UPDATE LastLogin SET
date = '2007-08-14 05:34:09.910',
status = 1 ,
activity = 0
WHERE
(SELECT ll.status, ll.activity, ll.date
FROM LastLogin ll, Users u
WHERE ll.userid = u.userid
AND u.email = 'd******@hotmail.com')

Thanks!
Aug 20 '07 #2
On Aug 20, 1:47 pm, Roy Harvey <roy_har...@snet.netwrote:
It looks like you are trying to use a correated subquery without the
correlation, and without either the IN or EXISTS that makes use of
such a subquery. Perhaps this will give you some ideas.

UPDATE LastLogin
SET date = '2007-08-14 05:34:09.910',
status = 1,
activity = 0
WHERE EXISTS
(SELECT *
FROM Users u
WHERE LastLogin.userid = u.userid
AND u.email = 'dush...@hotmail.com')

Roy Harvey
Beacon Falls, CT

On Mon, 20 Aug 2007 13:10:56 -0700, pbd22 <dush...@gmail.comwrote:
Hi,
I am trying to create an update statement
on a table with a foreign key to the Users
table (userid).
I am getting the error:
An expression of non-boolean type specified in a context where a
condition is expected, near ')'.
Below is the Update statement.
UPDATE LastLogin SET
date = '2007-08-14 05:34:09.910',
status = 1 ,
activity = 0
WHERE
(SELECT ll.status, ll.activity, ll.date
FROM LastLogin ll, Users u
WHERE ll.userid = u.userid
AND u.email = 'dush...@hotmail.com')
Thanks!
Thanks, that helped.
Nice to see somebody local.

Peter
New Haven, CT

Aug 21 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2559
by: Frank Wallingford | last post by:
Note: For those with instant reactions, this is NOT the common "why is i = i++ not defined?" question. Please read on. I came across an interesting question when talking with my colleagues....
12
1810
by: Jed Ozone | last post by:
New to Regex and I'm having a hard time figuring this one out. I need a regular expression what will based on balanced square brackets. For example: ], ,CC], ]] I'm trying to write a reg ex...
4
3203
by: Neri | last post by:
Some document processing program I write has to deal with documents that have headers and footers that are unnecessary for the main processing part. Therefore, I'm using a regular expression to go...
2
3003
by: Brian Kitt | last post by:
I have a process where I do some minimal reformating on a TAB delimited document to prepare for DTS load. This process has been running fine, but I recently made a change. I have a Full Text...
3
2549
by: Zach | last post by:
Hello, Please forgive if this is not the most appropriate newsgroup for this question. Unfortunately I didn't find a newsgroup specific to regular expressions. I have the following regular...
0
3091
by: ramarajs | last post by:
Hi Team, Can anyone give me the regular expression to search the following set of non printable characters ÑÑNL, &quot; ˜ and many more non printable characters. I have to search these characters...
7
11311
by: Sharkie | last post by:
I need a regular expression which will evaluate to false if number of consecutive characters (non-whitespace) exceeds certain number (10 in this example). For example, I have this function: ...
1
7936
by: jelling | last post by:
Hi, Is it possible to use a CASE or IF ELSE statement in a datacolumn expression? Here's what I've tried: 'standardCodeColumn.Expression = "CASE StandardsBodyID WHEN 1 THEN 'JCAHO' ELSE...
8
3422
by: mw | last post by:
Hello, I am trying to make a regex for a 12 hour clock, and I can't seem to get it just right. What I have now is var regexmatch = /(1:|:)\s((a\.m\.)|(p \.m\.))/i
56
6659
by: Adem | last post by:
C/C++ language proposal: Change the 'case expression' from "integral constant-expression" to "integral expression" The C++ Standard (ISO/IEC 14882, Second edition, 2003-10-15) says under...
0
7063
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...
0
7258
Oralloy
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,...
0
7313
jinu1996
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...
1
6970
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
7441
tracyyun
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...
0
4663
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...
0
1489
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 ...
1
720
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
366
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.