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 strongm 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. ronaldmacdonald

    Excel spreadsheet - export to fixed width colun file?

    Hi CluelessChris Not in my Excel you can't (2010). Select multiple columns = Microsoft Excel can convert only one column as a time..." Regardless the manual processing is a bit old school! Ronald
  2. ronaldmacdonald

    Excel spreadsheet - export to fixed width colun file?

    Hi SkipVought, yes a prn file format is ok, however, I cannot (or at least did no see any option) change the column widths. I really wouldn't want to do this manually :-) Ronald
  3. ronaldmacdonald

    Excel spreadsheet - export to fixed width colun file?

    Hello CluelessChris Yes this feature is interesting but very labour intensive. It only lets you modify 1 column at a time and the file remains xls. I wanted to basically produce a file that I would later be able to open in notepad and the fields be the specified column widths. Thanks for the...
  4. ronaldmacdonald

    Excel spreadsheet - export to fixed width colun file?

    Hello I have an excel (xls) spreadsheet with 4 columns: ColA ColB ColC ColD Hello World This Is Is there a way to convert this to a fixed width column file (doesn't need an xls extension), so for instance: ColA (2 chars) ColB (10 chars) ColC (5 chars) ColD (4 chars) He...
  5. ronaldmacdonald

    Removing duplicate values from a table

    Thanks gmmastros - this worked perfectly for my requirement [bigsmile]
  6. ronaldmacdonald

    Removing duplicate values from a table

    Hello I have a table as thus: Col1 Col2 Col3 Col4 Col5 etc 1 Mr JOHN DOE ZZ 2 MR JOHN DOE BB 3 Miss SAM ADAMS CC 4 Mr PAUL SMITH VV I would like to remove column 1 where Col3 and Col4 are the same but Col2 is different case. Is there a simple way to achieve...
  7. ronaldmacdonald

    How to create a custom table?

    Sorted it now by using the query below - which removed the duplicate rows. USE XX GO WITH duplicates AS( SELECT ROW_NUMBER() OVER(PARTITION BY Field1 ORDER BY CLAIMID) AS dups, Field1, Field2, Field3, Field4 FROM Yourtable DELETE duplicates WHERE dups...
  8. ronaldmacdonald

    How to create a custom table?

    Wow tamar - genius. It gives the correct effect but leaves me with duplicate lines (as I have other fields) Field1 Field2 Field3 Field4 Field5 1 JOHN DOE 2 JOHNNY SMITH 3 MR JONES 3 MR JONES MRS JONES 5 MR PATTER 4 MR PATTER MRS PATTER
  9. ronaldmacdonald

    How to create a custom table?

    I have a table with the contents below: Field1 Field2 Field3 1 JOHN DOE 2 JOHNNY SMITH 3 MR JONES 3 MRS JONES 4 MR PATTER 4 MRS PATTER I want to create a table with the contents below from the above: Field1 Field2 Field3 Field4...
  10. ronaldmacdonald

    sed script to find and replace a string of text

    Yes that looks likeit would be ok, sadly I am using sed for windows which isn't as forgiving as the sed for unix so I need to tweak that up a bit but thanks.
  11. ronaldmacdonald

    sed script to find and replace a string of text

    Hello I am looking for a sed script that can search through a file and replace a string that starts with a certain letter and ends with a fulls stop for a fixed string. For example: Hello world, I am ronaldmacdonald. This is the repalcement string. So in the above I want to replace all...
  12. ronaldmacdonald

    Selecting records that match the current date.

    Hi simian336 - your statement worked perfectly on sql server - thankyou. gmmastros - the field isn't indexed but its always good to consider efficiency!
  13. ronaldmacdonald

    Selecting records that match the current date.

    Yes sorry, I am more use to Oracle but this is for SQL Server 2005.
  14. ronaldmacdonald

    Selecting records that match the current date.

    Hi I am trying to select rows from a table where a date field match the current date. The date is stored in the table as 'yyyy-mm-dd hh:mm:ss' so I am looking for something that would be the equivalent of select * from table where datefield = sysdate
  15. ronaldmacdonald

    Apache and using a server alias - sort of working!

    I have a URL running through Apache as follows: http://<server name>/welcome I didn't want to reveal the <server name> in the url so had a DNS entry created called <new server name> that resolved to <server name> Now I can access my URL as http://<new server name> and it takes me to the...
  16. ronaldmacdonald

    sql query - working days between two dates (including public holidays)

    Dagon, yes - using your solution is now correct. I was able to add weekends going back 10 years which should suffice! Now to procedurize(sp?) this as per SantaMufasa as it is a very useful function for us! Thx for all your suggestions. RonaldMacdonald
  17. ronaldmacdonald

    sql query - working days between two dates (including public holidays)

    Dagon - your query is ALMOST right - it certainly takes into account the working days listed in the 3rd public holidays table. It doesnt't however account for weekends which would not be working days. SantaMufasa - your understanding is spot on and your function looks interesting. I havent had...
  18. ronaldmacdonald

    sql query - working days between two dates (including public holidays)

    How can U3L.DTK.DATE3 be a third table? Your other tablek is U3L.DTK.DATE2 and DATE2 is clearly the column name, so U3L must be schema and DTK must be the table name. I must apologise - you are correct. U3L is the schema (shared by all 3 tables) DTK and DPL are the table names. My original...
  19. ronaldmacdonald

    sql query - working days between two dates (including public holidays)

    Could you clarify - are you trying to link a third table that contains public holiday records? >> Now I have public holidays stored in a separate table U3L.DTK.DATE3 - Yes this is the third table What are the columns in U3L.DTK >> just DATE3, which is a list of public holidays in the format...
  20. ronaldmacdonald

    sql query - working days between two dates (including public holidays)

    Hi I am trying to work out the number of working days between 2 dates, including public holidays. Working days are classed as Monday - Friday. The input two dates are date values stored in two separate tables (U3L.DPL.DATE1 and (U3L.DTK.DATE2). I have a query that produces the number of...

Part and Inventory Search

Back
Top