View Full Version : پیدا کردن رکورد بعدی
سلماس
یک شنبه 03 مهر 1384, 00:05 صبح
آیا SP یا دستوری هست که بتونیم در هنگام جستجو همانند دستور FindNext عمل کنیم و رکورد بعدی شامل شرایط جستجو رو پیدا کنیم ؟؟؟؟؟
Kamyar.Kimiyabeigi
یک شنبه 03 مهر 1384, 07:51 صبح
شما میتونین از حلقه برای این کار استفاده کنین
مثال
DECLARE Employee_Cursor CURSOR FOR
SELECT LastName, FirstName FROM Northwind.dbo.Employees
OPEN Employee_Cursor
FETCH NEXT FROM Employee_Cursor
WHILE @@FETCH_STATUS = 0
BEGIN
FETCH NEXT FROM Employee_Cursor
END
CLOSE Employee_Cursor
DEALLOCATE Employee_Cursor
m-khorsandi
یک شنبه 03 مهر 1384, 08:02 صبح
http://www.barnamenevis.org/forum/showthread.php?t=29233
Achchan
یک شنبه 03 مهر 1384, 15:59 عصر
The solution is not wrong but think about pure SQL solution too! it is an amazing quiz! Lets solve it with SQL and post your quiries here please,I am sure there is no record,no row ,no loop in standard SQL:It is all about Sets! SQL is a set-oriented language.
Lets think about sets when you are in relational world and records or rows when in programming language(Impreative,statement-by-statement languages,I mean) I am looking for best posts.
-Best wishes and feel free to mail me: baronc_rampantc@yahoo.ca
بابک زواری
یک شنبه 03 مهر 1384, 17:39 عصر
Achchan عزیز ممنون اگر زحمتی نیست این ترجمه اش رو هم بذاری ممنون میشم
AminSobati
یک شنبه 03 مهر 1384, 17:42 عصر
شما این سوال رو قبلا هم مطرح کرده بودین و جوابی که براتون نوشتم آیا به انجام رسوندین؟
http://www.barnamenevis.org/forum/showthread.php?t=28732
vBulletin® v4.2.5, Copyright ©2000-1404, Jelsoft Enterprises Ltd.