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. 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...
  2. 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...
  3. 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...
  4. 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...
  5. 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
  6. 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...
  7. 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...
  8. ronaldmacdonald

    select max(date) query

    I have a table with data: username datelog -------- ------- tom 01/01/2011 10:02:04 simon 06/04/2011 09:06:05 steve 05/05/2010 11:21:56 tom 07/11/2009 12:34:56 steve 09/11/2011 11:34:00 simon 01/11/2010 09:43:45 I am trying to select the...
  9. ronaldmacdonald

    Convert Access SQL into Oracle equivalent

    I have Access code that sums the number of occurances of an integer calculation [Days taken] Oracle doesn't like IIf SELECT Sum(IIf([Days taken] Between 1 And 3,1,0)) AS [1-3]
  10. ronaldmacdonald

    How to group a range in query

    Hello I have a query that returns the number of working days between two dates from two oracle tables. That bit seems ok. When I run the query it list each rows equivalent working days which is ok. So the code is: SELECT (TRUNC(DATABASE.TABLEA.CERTDATE) - TRUNC(DATABASE.TABLEA.COMPDATE)) -...
  11. ronaldmacdonald

    Listbox AddItem - Index too large?

    Hello I have a Listbox (Access 2003) and loop through to add items using n = n + 1 It errors when n = 2 saying "Cannot addd item, Index is too large". I can't see any obvious problem with it other than it doesnt want to add more than 1 item. Ronald
  12. ronaldmacdonald

    Access 2002 query against Oracle 10g linked tables

    Hello I have a simple query: SELECT Date() AS Expr1, 10GTABLE.LASTDATE, Date()-[LASTDATE] AS Expr2 FROM 10GDATABASE WHERE (((Date()-[LASTDATE])>90)); 10GDATABASE is an Oracle 10g database. Using the Oracle 10g ODBC driver I get an error: ODBC -- call failed. [Oracle][ODBC][Ora]ora-00932...
  13. ronaldmacdonald

    Access SQL Group By problem

    Hello I have the following query, I wish to limit the results to MAX(AS_RecordID) and group by AS_TenancyRef but I get the error "You tried to execute a query that does not include the specified expression 'AS_Date' as part of an aggregate function" SELECT max(AS_RecordID), AS_TenancyRef...
  14. ronaldmacdonald

    moving files

    Hi I have an old BAT file program that monitors a directory for incoming files. Once a file hits the directory the BAT program moves it off to another location and the process continues (DOS bat code below). It worked on 98 but not on XP. My question is can this be done in vbscript and called...
  15. ronaldmacdonald

    show disinct records?

    Hi I am looking to select distinct records from a table based on the values being distinct in one row. Consider the table "mydata": field1 field2 field3 field4 a 1 b y a 1 b y b d f x In this example table field4 has 2 rows with duplicate...
  16. ronaldmacdonald

    create new database from comple backup

    Hi I have a complete backup of a database, can I create a new instance of a database from this backup? How do I go about this?
  17. ronaldmacdonald

    oem recovery error

    Hi I am trying to recover a database using OEM and get an rman error: ORA-19505: failed to identify file "D:\ORACLE\ORADATA\INST\ARCH\B_1ACRBCD_1_1" ORA-27041: unable to open file OSD-04002: unable to open file O/S-Error: (OS 2) The system cannot find the file specified. The file must have...
  18. ronaldmacdonald

    convert money value to spaces

    Hi Is it possible to convert a money value to spaces? e.g. 01 to " " (not the quotes but two spaces) Can integers be converted as well? Ron
  19. ronaldmacdonald

    variable increment in select statement

    Im trying to increment a variable in a select statement such as declare @cnt as int select field1, field2,(select @cnt = @cnt + 1) from A_TABLE but Im getting an "incorrect syntax error near =" message. Ive tried various combinations to no avail. Is this possible?
  20. ronaldmacdonald

    case statement in a select?

    Hi I am wondering if its possible to use a case statement in a select query. For example I have a field that contains 3 possible values A,B or C. As I select these fields I want to display a different value as thus: A = X B = Y C = Z I thought something like: SELECT 'status' = CASE WHEN...

Part and Inventory Search

Back
Top