Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
#!/usr/local/bin/perl use DBI; use DBD::ODBC; my $dbh = DBI->connect("dbi:ODBC:dsnentry", '', '', {PrintError => 0}) +; die "Unable for connect to server" unless $dbh; $dbh->{odbc_SQL_ROWSET_SIZE} = 2; $query="Exec ex 'habibrahman'"; my $result=$dbh->prepare($query) or print "cannot prepare" ; $result->{LongReadLen}=512*1024; $result->{LongTruncOk}=1; $result->execute() or print $result->errstr();
and here is my procedure
create procedure ex (@name varchar(200)) as declare @cust_id int select @cust_id=cust_id from X where cust_name=@name if(@cust_id='') begin insert into x(cust_name) values(@name) end GO
Code tags added by GrandFather
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: sql server procedure
by EdwardG (Vicar) on Jul 26, 2006 at 07:50 UTC |