Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

restrict number of records

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hi guys,

I have a program that inputs records into sybase.
I have a table here called orders.

now ,i require that there may be a maximum number of 10 entries in this table,not more.
Attempts to enter more entries are discarded.

how should i attempt this

Bye
 
Write a trigger on insert using a cursor and get the latest number of records in the table before inserting every record. If record count > 10, do not insert any other records in the resultset.
 
Hi,

I also had faced this problem before...
but can anyone tell me how can i abort the insertion into the table through the trigger..means what code i have to write

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top