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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: Gundapaneni
  • Order by date
  1. Gundapaneni

    Trim Decimals in money datatype

    Delcare a variable with decimal datatype having scale 2 and assign the original value to newly declared variable. DECLARE @result decimal(5,2), @value1 decimal(5,4), @value2 decimal(5,4) SET @value1 = 1.1004 SET @value2 = 1.0004 SELECT @result = @value1 SELECT @result select @result=@value2...
  2. Gundapaneni

    Record Locking

    Hi, Try this select * from <table_name> with (tablock,updlock) The above query will have the table level lock and update lock until the end of the statement or end of transaction. For more hlep read locking, hints in BOL. Madhu.
  3. Gundapaneni

    DERIVED FIELDS

    Hi, While creating a table itself you can create the computed field. Suppose you want to create a column as sum of two already delcared columns, you can create as follows create table test (a int, b int, c as a+b) Here the column C is stored the date vartually in the table , it cannot...
  4. Gundapaneni

    Drop Database problem

    Hi, Sql server will not allow you to use the USE statement inside a Stored Procedure. So it might be the problem. Check once again your stored procedure and modify it as what you want. Madhu.
  5. Gundapaneni

    problem with where statement...

    You must provide the single quote &quot;'&quot; if U use string type data so write as, searchSQL = searchSQL & &quot;where Daily ='&quot; & mydata & &quot;'&quot; instead of searchSQL = searchSQL & &quot;where Daily =&quot; & mydata Madhu.
  6. Gundapaneni

    Chage database Master (Single User Mode)

    Hi, It may helps to you try this, exec sp_dboption 'databasename','single user','TRUE' Madhu.
  7. Gundapaneni

    select distinct and other fields: aggregate function for text?

    Please check the above query, I think you have to add the TableX_1.COD = TableX.COD instead of TableX_1.NAME = TableX.NAME in above query. Madhu.
  8. Gundapaneni

    executing a batch file

    Hello, You can write the dos commands as batch file and save it externally to a path and run via the Query analyser with the full path. For ex: Suppose, as you mentioned in your question comprise the dos commands as a batch file and store it as sample.bat in c drive or d drive or at any whare...
  9. Gundapaneni

    How to Exclusive lock a table.

    Hi, Try in following manner USE pubs BEGIN TRAN SELECT COUNT(*) FROM authors WITH (TABLOCK, HOLDLOCK) or read BOL locking,hints topic. Madhu.
  10. Gundapaneni

    Locking a table

    Hello, I think below one will solves your problem, you can try this Begin transaction Insert into temp_table values(1,'mahesh') Select max(id) from temp_table with (TABLOCK,HOLDLOCK) Commit transactin Or if you want to lock the table exclusively use XLOCK option. Madhu.
  11. Gundapaneni

    Update trigger without knowing tables columns

    Try SELECT @Appid=appid From Deleted instead of SELECT @Appid = (Select Appid From Deleted) Madhu.
  12. Gundapaneni

    Convert data from all Upper Case to &quot;Proper Case&quot;

    you can do it by using functions LOWER(char_exp) or UPPER(char_exp). LOWER function will be used to convert all upper case letters to lower case letters, UPPER case function also in similar way used. It may be helpful to U, I think. Madhu.
  13. Gundapaneni

    Convert data from all Upper Case to &quot;Proper Case&quot;

    you can do it by using LOWER(char_exp) or UPPER(char_exp). Lower function will be usefull to convert all upper case letters to lower case letters, the similar way UPPER function also. It may help to U, I think. Madhu.
  14. Gundapaneni

    Transferring Oracle Tables to SQL Server 2000

    Hi, You have to create the destination database in Sql server200 before importing data from Oracle with DTS wizard. Madhu.

Part and Inventory Search

Back
Top