Hi,
Hope someone could help me!
I wonder how I am writing a procedure in Query Analyzer that will create a new column with a flag set to one in my database when someone is having there birthday. Just now I have just started with this code which is just a hint to what I would like to do.
declare @datum varchar (20)
declare @amount varchar (20)
declare @result varchar (20)
declare @ int
select @datum = getdate()
select @datum = substring(@datum, 1, 6)
select @amount = (select count (*) from Persondata)
set @ = 1
while @<= amount
begin
if @ == id
select date from Persondata where date==@datum
insert into Persondata (bdate) values('1')
@ = @ + 1
end
/Thanks in advance, MS