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 Westi 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. delaap

    undesirable characters in fields

    Hi, I have a field which is updated by another data source, the field contains characters that are invalid for its purpose. I cannot use i.e. / ? @ * but they are between other charcters that I do require, so my field looks like this '567AC?78'. Any ideas as to how I can replace the invalid...
  2. delaap

    Not Numeric Query

    Hi, I have a table with telephone numbers within it. I'm trying to construct a query that will return all the recs that are not numeric i.e. +44 01206 851851 (01206) 851851 01206-851851 etc... The problem occurs with the spaces as these are seen as non numeric. Does anyone have any ideas on...
  3. delaap

    Max Value Question

    Hi, I currently have a table which auto grows every month by creating a new field when a new calender month is upon us. The new field holds the same type of info as the month before (Values between 0 AND 4). What I'm trying to do is populate another (master) field with the highest value seen...
  4. delaap

    Query Question

    Hi, I have a table that looks like the following: ID Date Code The primary key on the table is across ID and Date. So the data looks like: ID Date Code 01 01/01/2001 A 01 01/01/2002 A 01 01/01/2003 B What I would like to return in my results set is all...
  5. delaap

    Extra Loop in Script

    I have inherited a script that replaces carriage returns in field with a space. What I really need is a script that checks and updates all fields in a table and not just one field. Does anyone have any ideas how to modify the script to achieve this ? CREATE PROCEDURE sp_remove_cr AS DECLARE...
  6. delaap

    Optimized Performance

    I have a W2K Server that is running SQL Server2000 and not a lot else. My question is for optimized performance for the database server should I set the Application Response (Advanced Tab - System Properties) to be Applications or Background Services ? Thanks in advance
  7. delaap

    Text File into SQL Server 6.5

    Hi, I'm looking to get a text file into SQL Server 6.5. I understand that BCP is the way to do it. If I have a file that contains the following, what should I be writing in command line to get it to insert into the database. ColumnA - INT ColumnB - VARCHAR ColumnC - VARCHAR ColumnD - INT Any...
  8. delaap

    Variables and Updates

    Hi, I have two tables in a SQL Database. ADDRESS & VARIABLE_TABLE. The Address Table requires a flag to show whether the record is outside 12 months or not. The Variable Table holds source id's which are used to show whether the Address rec's are outside 12 months i.e. The script I'm trying to...
  9. delaap

    Select Query

    Hi, I'm having trouble getting a select query working, any help would be great. I have two tables, Table1 & Table2 Table1 Site_id 05001 05002 05003 05004 Table2 Site_id Source 05001 0010 05001 0035 05002 0010 05003 0015 05004 0010 05004...
  10. delaap

    Date Query

    Thanks you have been a great help. Keep up the good work !
  11. delaap

    Date Query

    Thanks, works a treat. I run this code iside an Execute SQL Statement Task within DTS. By the way what does the 103 do ? or how do I find out more.
  12. delaap

    Date Query

    Hi, I'm looking to update a datetime field with the current date on a daily basis as part of a DTS package. I've tried to use the GETDATE() Function but it returns the time as well. Is there an easy way of truncating the time and just use the date for the update ?
  13. delaap

    Data Tagging

    Hi Folks, I'm looking to create a script that will do the following: Order a Field ASC and then create a number sequence on another field. The sequence is from 1 thru to 8 i.e. row1 = 1 row2 = 2 row3 = 3 . .. row8 = 8 row9 = 1 row10 = 2 row11 = 3 etc ........ Any ideas ?
  14. delaap

    Separating Data inside a Varchar Field

    Hi, I'm looking to separate data from one field into three. For example "Mr Dave Maloney" sits currently in one field I have 3 other fields named Title, Initials, Surname I'm looking to place "Mr" into the Title field, "Dave" into "Initials" and...
  15. delaap

    Proper Casing varchar fields

    Hi, I'm trying to write some code that will change text from UPPER case into PROPER case i.e. From: BANK OF SCOTLAND To: Bank of Scotland I remember using a PROPER function in foxpro a few years ago and I'm basically trying to replicate this. Any ideas ?
  16. delaap

    Subquery returned more than 1 value ?

    Hi Terry, The query didn't work until I removed a trigger, I was looking at the error and the top looks like this: "Server: Msg 512, Level 16, State 1, Procedure UpdateDate_tt_Contact, Line 10" My procedure UpdateDate_tt_Contact somehow causes conflict with an update statement, I...
  17. delaap

    Subquery returned more than 1 value ?

    Hi Terry, When I run the following query: select * from tt_Contact, Organisation_Retained_replaced where Organisation_Retained_replaced.Uniq = tt_contact.organisationcode I get: tt_Contact.OrganisationCode Organ ~~~~~ Retain 82161444 82161444 91182800 82161444...
  18. delaap

    Subquery returned more than 1 value ?

    Hi, I'm trying to update a table with the following command: UPDATE tt_Contact SET tt_Contact.OrganisationCode = Organisation_retained_replaced.retain FROM Organisation_retained_replaced WHERE Organisation_Retained_replaced.Uniq = tt_Contact.OrganisationCode The error I get is this...
  19. delaap

    Removing Carriage Returns

    In a nutshell, I have a front end that allows CR's to be inputted, the back end (SQL 2000) allows this also. I need to DTS this data out once a week without carriage returns. On average there are 20/30 CR's across 40 Fields. What I need to do is write a script that cleans all the fields with...
  20. delaap

    Removing Carriage Returns

    Hi, I'm looking to replace Carriage Returns in a table with a space. Does anyone have an idea of how this can be achieved ?

Part and Inventory Search

Back
Top