Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update SQL Syntax
Message
From
13/07/2006 12:05:00
 
 
To
13/07/2006 02:35:10
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01135906
Message ID:
01136068
Views:
10
Thanks Fabio,

I have 9 installed on this machine as well, but I could have sworn I was looking at 8's help though and saw the "from" clause. However it isn't there now, I must sheepishly admit. :)

Thanks for pointing the incompatibility out. I will run this in 9 and then I suspect things will work significantly better ... oh and I will add the ".position" ... Why I didn't see that I don't know, geez!


>>Hi,
>>
>>Here is my situation:
>>
>>I am working with 9x9 boxes of blood specimens stored in -80 freezers. The boxes have been consolidated into various new locations in the freezers. Box locations are described by freezer, shelf, rack and position. I want to use the Update - sql command to modify the locations for my boxes in the Box table using the NewLocation table.
>>
>>I think I am close but something is wrong with my syntax:
>>
>>
>>update Box ;
>>  set ;
>>  Box.freezer  = NewLocation.freezer, ;
>>  Box.shelf    = NewLocation.shelf, ;
>>  Box.rack     = NewLocation.rack, ;
>>  Box.position = NewLocation ;
>>  from NewLocation ;
>>  where Box.box = NewLocation.box
>>
>>
>>Here is what help says:
>>
>>
>>UPDATE Target
>>   SET Column_Name1 = eExpression1 [, Column_Name2 = eExpression2 ...]
>>   [FROM [FORCE] Table_List_Item [[, ...] | [JOIN [ Table_List_Item]]]
>>   WHERE FilterCondition1 [AND | OR FilterCondition2 ...]
>>
>>
>>
>>I am sure it is pretty obvious, let me know if you see my error ...
>>
>>Thanks!
>
>First, UPDATE ... FROM is supported on VFP9 only.
>
>Second, the sql command is incomplete:
>
>update Box ;
>  set ;
>  Box.freezer  = NewLocation.freezer, ;
>  Box.shelf    = NewLocation.shelf, ;
>  Box.rack     = NewLocation.rack, ;
>  Box.position = NewLocation.position ; && !!!!!
>  from NewLocation ;
>  where NewLocation.box = Box.box
>
Carole Shaw
Fred Hutchinson Cancer Research Center

Eagles may soar, but weasels don't get sucked into jet engines.
Previous
Reply
Map
View

Click here to load this message in the networking platform