Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by rajeshkanna

  1. rajeshkanna

    Cannot find data type

    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...
  2. rajeshkanna

    How to lock a Table

    Thanx jester777, TABLOCKX works fine. thanks lot Rajesh Kanna. N
  3. rajeshkanna

    How to lock a Table

    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
  4. rajeshkanna

    How to get the Servername currently connected

    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...
  5. rajeshkanna

    How to get the Servername currently connected

    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
  6. rajeshkanna

    Stored Procedure/ Transaction problem

    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...
  7. rajeshkanna

    Change &quot;sa&quot; password

    hi, Open Query Analyzer and execute the following stored procedure sp_password @new='<>', @old='<>' <> - Place holders regards Rajesh Kanna. N
  8. rajeshkanna

    Top 10 For Each

    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
  9. rajeshkanna

    Top 10 For Each

    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

Part and Inventory Search

Back
Top