gvalip 0 Newbie Poster

I did following -

create table test_insert_date (field1 datetime not null)
grant all on test_insert_date to public

create proc usp_test_ins_dt
@field1 datetime null 
as
    select @field1
    insert into test_insert_date
    values (getdate())

    return

After this, I executed the proc as - usp_test_ins_dt getdate() I got error as "Incorrect syntax near ')'."

But if I run the proc as usp_test_ins_dt "01/01/2008" It runs fine. Any help in understanding how Sybase is behaving?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.