Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Help with Update
Message
From
21/01/2003 07:17:47
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
21/01/2003 05:07:34
General information
Forum:
Visual FoxPro
Category:
Databases,Tables, Views, Indexing and SQL syntax
Miscellaneous
Thread ID:
00743686
Message ID:
00743709
Views:
12
>Hi
>
>I have one temporary table ( TmpLinEnc ), with fields :
>RefArtigo
>QTD
>
>i have table ( LinEnc ) , with fields
>RefArtigo
>QTD
>
>Now , i want update table LinEnc , with TmpLinEnc
>
>
>Exemple TmpLinEnc
>RefArtigo -> Artigox
>QTD -> 6
>
>table LinEnc
>RefArtigo -> Artigox
>QTD -> 10
>
>I want in table LinEnc
>RefArtigo -> Artigo1
>QTD -> 4 && ( 10 table LinEnc - 6 table TmpLinEnc = 4 )
>
>
>I know make this with DO WHILE .NOT. Eof() ,
>but i like Know make that with one UPDATE SQL
>
>Do You undsertand , and can help me ?
>
>Thanks
select TmpLinEnc
scan
  update LinEnc set QTD = QTD - TmpLinEnc.QTD ;
	WHERE RefArtigo = TmpLinEnc.RefArtigo
endscan
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform