Search  
Tuesday, August 16, 2022 ..:: Forum ::.. Register  Login
 Forum Minimize
Pentru a putea posta mesaje trebuie să vă înregistraţi.
Notă: Mesajele cu conţinut jignitor sau ilegal (inclusiv cereri de soft piratat) nu sunt acceptate şi vor fi şterse imediat .

Pentru a primi raspunsuri rapide si corecte, scrieti in mesaj ce intentionati sa faceti, ce mesaj de eroare primiti, in ce context si in urma caror actiuni. De asemenea, mentionati versiunea de FoxPro in care lucrati!
Dacă nu specificați versiunea, se consideră VFP 9.0 SP2.

SearchForum Home
  Visual FoxPro  Baze de date, tabele, view-uri si indecsi  DELETE SQL...
 DELETE SQL
 
 5/2/2020 5:03:37 PM
User is offlineSCHRECK
491 posts
2nd


DELETE SQL
 (N/A)
Am urmatorul cod

SET DELETE OFF
CREATE CURSOR MyProducts (ProdID I , OurPrice Y NULL)
INSERT INTO MyProducts VALUES (1,1.10) && matches but is not marked for deletion
INSERT INTO MyProducts VALUES (2,2.20) && matches and is marked
INSERT INTO MyProducts VALUES (3,3.30) && matches and is marked
CREATE CURSOR MSRPList (ProdID I , ProdCategory I Null, MSRP Y, Discontinued L)
INSERT INTO MSRPList VALUES (1, 9, 1.00, .f.)
INSERT INTO MSRPList VALUES (2, 8, 2.00, .t.)
INSERT INTO MSRPList VALUES (3, 7, 3.00, .t.)
SELECT MSRPList
GO 2
DELE

DELETE MyProducts FROM MSRPList ;
WHERE MSRPList.ProdID = MyProducts.ProdID;
AND DELETED('MSRPList') = .t.
SELECT MyProducts
BROWSE

Ma asteptan ca in MyProducts doar prodid=2 sa fie marcat pt. stergere dar apar toate. Unde am gresit ?
 5/2/2020 6:10:18 PM
User is offlineDaniel Buduru
3528 posts
1st




Re: DELETE SQL
 (N/A)
Sintaxa sql este

DELETE FROM table_name WHERE condition

deci


DELETE FROM MyProducts ;
WHERE MSRPList.ProdID = MyProducts.ProdID;
AND DELETED('MSRPList') = .t.

Daniel Buduru
 5/2/2020 7:37:46 PM
User is offlineSCHRECK
491 posts
2nd


Re: DELETE SQL
 (N/A)
Asa functioneaza
Multumesc
  Visual FoxPro  Baze de date, tabele, view-uri si indecsi  DELETE SQL...

Search  Forum Home         

Copyright 2002-2013 Profox   Terms Of Use  Privacy Statement