Hi all,
I user defined the data type "t_varchar_15"
The following is the sample sp.
create procedure test
as
begin
DECLARE @tmp_TBL TABLE(empno t_varchar_15)
insert into @tmp_tbl select empno from employee
select * from @tmp_tbl
end
go
The Error is
Column or parameter #1: Cannot...
Hi all
Anyone can help me will be appriciable.
Is there a way to lock a table completely. No other persons to add/update or delete any arecords into that table until completing a stored procedure transactions.
Sql server 7.0 version.
Rajesh kanna. N
Hi,
the double quote is to differentiate the sql statement from the line.
I run this stmt (without double quote) with query analyser itself.
Ok, It displays the servername on title of the window.
but the query not produced the result, it returns only Null.
I read the BOL help it says you...
Hi,
Any one can help me to get the servername which i curretnly connected through CLIENT side Sql Server Query Analyzer.
I issued by "Select @@SERVERNAME"
It returns "Null"
how to return SERVERNAME.
Server version is SQL SERVER 7.0
Hi ,
I think we should check error and rollback explicitly within your code after each and every insert/select/update/delete... statements.
just add the following segments after the insert/select/update/delete... statements in your procedure
if @@error <> 0
begin
rollback
return @@error...
Hi sfalin,
You can place the required number of records in the place of <Count>,
If you need to get 10 records then replace <Count> with 10.
thats all.
The query just arrange and list first said count(10) records for each Account.
x and y are just for table's alias names.
thankz
rajeshkanna
select x.*
from DocTable as x
where <Count> > (select count(*) from DocTable as y where x.<PrimaryKey> > y.<PrimaryKey> and x.Account = y.Account)
Anything between <> is place holders
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.