|
-
Apr 4th, 2005, 07:58 AM
#1
Thread Starter
New Member
This has got me puzzled... Executed SQL Query RESOLVED
Hi everyone,
I have an SQL query that I am executing in my program. The query doesn't work in the application, but works when executed by itself using SQL Query Analyser.
Here is the query :
strSQL = "UPDATE Stock_Details SET SDInputDate = (SELECT SDInputDate FROM Stock_Details WHERE ObjectID = 4887) WHERE ObjectID = 504"
If I execute this query in the application, it says that "SELECT SDInputDate FROM Stock_Details WHERE ObjectID = 4887" returns a NULL value, and it cannot perform the update since the table doesn't allow nulls in the column i'm updating.
But, if I execute it in SQL Query Analyser, the query works perfectly fine, and no NULL values are returned.
I am completely puzzled, and I have been toying with this for the last 2 days.
Any tips ?
Thanks!
Last edited by hkhalil; Apr 4th, 2005 at 09:27 AM.
Reason: resolved
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|