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 dencom 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. edwardturner

    String manipulation

    If I have a column in a table contain names and I want to split out what should always be the surname what SQL can I use. I want to split off from the right until I reach the first whitespace this was - "S R WILLIAMS" becomes "S R" and then another field called "WILLIAMS".
  2. edwardturner

    US Date to UK

    Hi, I've got a SQL Table in which I have imported dates in an american format. I am sure I can write a simply update statement to correct them. The select statement below gives me each part of the date (datewef being the field) select day(datewef), month(datewef), year(datewef) from...
  3. edwardturner

    System Hang when viewing any movie files

    Hello, Has anybody come across this before on Win XP Pro? When ever I run any video files on my PC (mpegs, avis etc..) the system grinds to a halt and will not play the media. I have to end task to get the CPU usage back down to normal levels. This happens if I am offline or online and in a...
  4. edwardturner

    American Dates

    Hello, I have a DTS that convert dates from a text file into dates to be held in SQL Server. The source file dates are like so: 05OCT06 Therefore in my DTS I do the following conversion: arrMonth = mid(DTSSource("Col003"),3,3) if arrMonth = "DEC" then arrMonth = "12" elseif arrMonth...
  5. edwardturner

    How do I output Global Variables from a DTS package?

    How can I get the value of global variables into say a text file using DTS?
  6. edwardturner

    How to get output from a MsgBox into an output

    Hi, I have a DTS package that takes an Excel spreadsheet as the input and then runs an update statement on a SQL database based upon certain conditions. The data is rejected if an associated database record cannot be found to update, in these cases I can output the details of source row that...
  7. edwardturner

    Microsoft Projects - comes up blank....help!!

    Hi, I have installed MS Projects 2003 on my machine recently and was able to use it (create new projects and open existing ones) for a while. I have gone back into it today and clicked on new project and the screen is just blank, there is nothing there at all. If I click any options from...
  8. edwardturner

    Updating based up max date

    Hi, I am trying to update a certain field within a database table. This SQL statement correctly identifies the records i need to update: (1) select max(date) from table group by IDfield I cannot do: update table set field = 1 where .. then use a sub select of the statement (1) above because...
  9. edwardturner

    Help with NOT IN clause

    Hi, I've need to do a comparison between 2 fields in two 2 tables and identify the differences, I am using this SQL but it returns nothing: select field1+field2 from table1 where field1+field2 NOT IN (select field3+field4 from table2) All the fields are nvarchar(100). There is...
  10. edwardturner

    Removing Carriage Returns

    Hi, Using a SQL statement how can I remove carriage returns from an ntext field? I have tried using the replace function but do not know what to use to denote a carriage return: update <table> set <field> = replace(cast(<field> as nvarchar), A, B) A being a carriage return B being what I...
  11. edwardturner

    String Manipulation in VB Sc

    How can I use VB Script to perform the following string manipulation? e.g. A/RHSD/0/004 I need everything between the first / character and the second / character.
  12. edwardturner

    Date manipulation

    Hello, Can anyone help me with this problem. I have a column that contains values for years and another column containing dates. What I want to do is update the date column and default the value of day and month to the 1st of Janurary and then change the value for the year to what is in the...
  13. edwardturner

    LTRIM on an ntext field

    Hi, i am trying to strip out all the whitespace on the left hand side of a field which set to ntext. I assume I have to cast or convert this field to a different format but am unsure what. Any ideas? update <table> set <field> = ltrim(<field>)
  14. edwardturner

    INSERT statements

    Hi, I am trying to write a series of insert statements to populate a table, however the strings I am trying to insert include characters such as & and / and when the string is delimeted by single quotes it is erroring: String or binary data would be truncated. The statement has been...
  15. edwardturner

    String Manipulation

    Hi, I need to use DTS to place the first 10 characters of a string into one field the then remaining characters (from 11 onward) into another field. In SQL there is the substring function, what is the equivalent in DTS? I am using a data pump task to do this so it would be the VB script...
  16. edwardturner

    Log file

    Can anyone tell me the SQL command to stop the log file being written to (assuming there is one!)? The SQL script I am trying to run increases the log file to about 11Gb and it is at that point my HDD gets full so the script does not finish. Therefore I need a way to switch off the log file...
  17. edwardturner

    Help with select statement

    Hi, I need to write a select statement to just return one field from a table but i want to also return a column either site that just contains a ' character. I know how to say add a column before / after a column: select field, ',' from table But i do not know how I would get the single quote...

Part and Inventory Search

Back
Top