Re: Updating the first row which is null
- From: "John Welch" <j+ohnw+elch@cal+central.com (remove +'s)>
- Date: Sat, 8 Apr 2006 09:14:01 -0700
In your (Select top 1) query, your WHERE clause is limiting your results to
only those records where there is no date.
In other words, you're looking through dateless records to find the most
recent one. It's impossible.
When you say "the first one with the Date field null", you're going to have
to find some other way to determine the "first one" since you obviously
can't use the date field to do that.
<recif20002002@xxxxxxxx> wrote in message
news:1144508902.675910.60370@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hello
I am trying to update table1 and set a new value with a condition
selecting only the results for the element with the specified ID and
the first one with the Date field null.
The query executes but it doesn t not update the informations. I ve
tried using TOP 1 and spent hours on this query but i can t get it to
work.
UPDATE table1 SET table1.Name = newName
WHERE table1.Date = (SELECT First(table1.Date) FROM table1 WHERE
table1.Date = Null And table1.ID = specifiedID);;
thank you for your help
Updating the first row which is null
.
- Follow-Ups:
- Re: Updating the first row which is null
- From: recif20002002@xxxxxxxx
- Re: Updating the first row which is null
- References:
- Updating the first row which is null
- From: recif20002002@xxxxxxxx
- Updating the first row which is null
- Prev by Date: Re: Updating the first row which is null
- Next by Date: Re: Philly-To-London via Intranet?
- Previous by thread: Re: Updating the first row which is null
- Next by thread: Re: Updating the first row which is null
- Index(es):
Relevant Pages
|