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 bkrike 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: *

  1. outofservice

    Abnormally low CPU useage

    My cpu useage is running at an abnormally low rate. It rarely peaks above 27% although I cant discover the reason why... any ideas? I have 4 cpu (1996 MHz Intel) server running SQL 2K SP3 on Win 2K V5.0 SP3 operating system. Memory set to dynamically configure and the database on average has...
  2. outofservice

    Incorrect ID numbers.

    I have a sql2k table with columns "line_num", "task_index" and "task". The table is basically a list of tasks that need to be completed in a specific order. "Line_num" should always read 0, 1 etc and is incorrect (Column "Task" and...
  3. outofservice

    Remove vowels from string

    I have two columns (ColumnA and ColumnB) ColumnA contains text strings, ColumnB is empty Id like to update ColumnB with the string values of ColumnA but I want to remove all vowels during the update. How do I do this? Thanks, Lauryn Bradley SQL Server DBA
  4. outofservice

    Split string into columns/fields after ever 75 characters

    I have a table, one column that contains a long text string (varchar(500)). I would like to split the strings between empty columns/fields Ive created after, say, every 70 characters. Any ideas? Lauryn Bradley SQL Server DBA
  5. outofservice

    Re-arrange data 'layout' in table

    I need to alter the way the data is stored within a table. A typical row looks currently like this: Col1 Col2 Col3 Col4 ---- ------ ----- ----- XXXXX AAAAA BBBBB CCCCC I need to 're-arrange' my...
  6. outofservice

    Can this code be written more efficiently?

    This code works but its messy and inefficient. Can you see a better way??? SELECT REPLICATE('0',LEN(n_num)-LEN(n_num+60)) + LTRIM(str(n_num+60)) FROM numbr WHERE num_id=1 AND LEN(n_num)-LEN(n_num+60)>0 UNION SELECT REPLICATE('0',0) + LTRIM(str(n_num+60)) FROM numbr WHERE num_id=1 AND...
  7. outofservice

    LPAD (Oracle) convert to SQL Server equivalent

    Hi, Here is some Oracle PLsql that needs to be converted to its SQL Server equivalent. I am at a loss as to how to do this!! Oracle SQL is: SELECT lpad(n_num+600000, greatest(length(n_num+600000), length(n_num)),0) FROM numbr; It takes the n_num column from the numbr table and increases the...
  8. outofservice

    LPAD (Oracle) convert to equivalent in SQL

    Here is some Oracle PLsql that needs to be converted to its SQL Server equivalent. I am at a loss as to how to do this!! Oracle SQL is: SELECT lpad(n_num+600000, greatest(length(n_num+600000), length(n_num)),0) FROM numbr; It takes the n_num column from the numbr table and increases the...
  9. outofservice

    LPAD (Oracle) convert to SQL equivalent

    Here is some Oracle PLsql that needs to be converted to its SQL Server equivalent. Oracle SQL is: SELECT lpad(n_num+600000, greatest(length(n_num+600000), length(n_num)),0) FROM numbr; It takes the n_num column from the numbr table and increases the number by the set amount. eg n_num 00123...
  10. outofservice

    String concat and views

    Version: SQL2k Standard Edition No service pack applied. Basically, I have a view (taken from two tables) which contains an 'address' column containing the concatenated values of 3 existing columns (number, street and area). My problem is that when I display the view in Enterprise manager I...
  11. outofservice

    DTS Packages Missing - Help!

    Ive had to restore all my sql databases including master and msdb. I seem to have lost my DTS packages. Are they stored in another location other than msdb or have I lost them? I am working with version 7. Help! Lauryn Bradley SQL Server DBA
  12. outofservice

    RE-Index Problems

    Ive been posed this question but not quite sure how to answer it apart from the obvious answers. What would cause a table to require reindexing on a daily basis if it has 100 transactions per second writing to it? Also, the sql service cannot be stopped for down time and the whole process of...
  13. outofservice

    Service Pack Upgrades

    Im about to apply my first service pack upgrade to our SQL2K cluster. Are there any known issues or potential problems that I may encounter? I am assuming that if all data is backed up (incl.system databases) that it should be reasonably straightforward if I follow the guidelines supplied with...
  14. outofservice

    Convert Getdate() into (dd/mm/yy) format

    -- Converts todays date into (dd/mm/yy) format without -- the timestamp -- declare @date as datetime datatype -- set @date as todays date -- convert todays date into dd/mm/yy format DECLARE @date smalldatetime SET @date = getdate() SELECT CONVERT(char(12), GETDATE(), 3) GO Lauryn Bradley SQL...
  15. outofservice

    Script to check integrity on all tables in a database

    -- NB: Works on version 2000 only! -- Script to check integrity on all tables in a database -- Uses DBCC CHECKTABLE -- exec lb_check_table_all -- If procedure exists, drop it IF EXISTS (SELECT so.name FROM sysobjects so WHERE so.name = N'sp_check_table_all' AND so.type =...
  16. outofservice

    Script To Maintain All Databases On A Server

    -- Here is a small script that will perform maintenance -- on all databases on a SQL server. SET QUOTED_IDENTIFIER OFF --Start with master USE master -- Create Variables DECLARE @DBName CHAR(64) DECLARE @TableName CHAR(64) DECLARE @FQTableName CHAR(64) DECLARE @TempVar CHAR(256) --...
  17. outofservice

    SP To View Old Connections

    -- Gets active database connections older than # of -- days specified. -- Accepts integer input parameter for # of days. -- Place in master database IF EXISTS (SELECT name FROM sysobjects WHERE name = N'sp_connections' AND type = 'P') DROP PROCEDURE sp_connections GO...

Part and Inventory Search

Back
Top