August 11, 2013 at 10:59 pm
Hi Friends,
I 've the table like below
create table stude
(
stu_id int,
leave_date datetime,
reason varchar(20),
is_save_mode varchar(20)
)
insert into stude (stu_id,leave_date,reason,is_save_mode) values('002258','2013-08-15','Market Visit',' ')
insert into stude (stu_id,leave_date,reason,is_save_mode) values('002258','2013-08-16','Market Visit',' ')
Now My requirement is when student insert the date and try to make an save.
before save the date and reason ve to validate already exists on table.
if already exists means ll show show error mess?(i.e trying to insert into stude (stu_id,leave_date,reason,is_save_mode) values('002258','2013-08-15','Market Visit',' '))
new date means update the column Is_save_mode='y' how to make procedure for these table?
August 11, 2013 at 11:47 pm
Presumably the students are not using SSMS as their input tool.
Whatever front end they are using should perform this validation either by calling appropriate stored procedures or executing the necessary SQL directly.
If your question is: "How can I write a query to look for specific dates in a table?" we can solve that pretty quickly for you.
The absence of evidence is not evidence of absence.
Martin Rees
You can lead a horse to water, but a pencil must be lead.
Stan Laurel
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply