How to do certain task in SQL?

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance

From: Richard Fagen (no_spam_at_my_isp.com)
Date: 01/17/05


Date: Mon, 17 Jan 2005 17:08:07 -0500

Hi Everyone,

I come from a Foxpro/dBase background (almost 20 yrs of DBF files) and
I'm new to SQL. I've been experimenting with VB.Net and MSDE for a few
months now and I'm very impressed. I got the go ahead to convert a
major xBase application to SQL/VB.Net.

I am not sure how to do certain tasks in SQL. I need to know how to do
the following...

Move to the last record in a table (in xBase, it is "go bottom")
Move to the first record in a table (in xBase, it is "go top")
Append a new blank record to a table (in xBase, it is "append blank")
Move to the next record in a table

In the DBF world, some tasks require filtering a file (say all records
belonging to invoice <n>) and then processing each record in a loop.
This involved moving a record pointer with either a "goto" or "skip"
command. I suspect the SQL equivalent is to use the "SELECT" statement
to filter the records and then to use the "UPDATE" or "DELETE" commands
to edit the table. Do I have the right idea?

Thanks.

Richard


Quantcast