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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by jtrapat1

  1. jtrapat1

    Finding Fiscal Year from Given Date Field with DB2 Functions

    I am using db2 version 7 and I need help calculating a date. I am selecting certain records with date fields from one table and then inserting them into another table after I calculate the fiscal year date field. The date from the first table is in this format: 01/22/1999, 01/20/2002...
  2. jtrapat1

    Help with INNER JOIN in SQL statement - DB2

    thanks, I tried the first one and that worked great! John
  3. jtrapat1

    Help with INNER JOIN in SQL statement - DB2

    I'm using db2 and I need to add another table join to the following sql statement. I'm confused about where I should add the INNER JOIN. Maybe this statement wasn't written efficiently but I'm stuck. I need to add another field into my select statement, bp13.dob_notify_date, and it's related...
  4. jtrapat1

    Format 6-Character Date Field For DB2

    I'm reading in a file and I have a six character date field coming in like this: 060299 so, it's month day year format. I know I need a y2k check so I can add 20 or 19 to my year field. But does anyone have a good function to format the rest of my string. I think db2 expects the date in this...
  5. jtrapat1

    Help With SQL Statement

    MarcLodge, Thanks for the response - I figured out how to link the table to itself (by alias) and it's working. Thanks John
  6. jtrapat1

    Help With SQL Statement

    I need help writing a sql statement against some db2 tables. I think I can write this with a single sql statement but if i can't please let me know. There are four columns but the role column will be analyst and deputy. I'd like to get a single row made up of one unique agency. Here are the...
  7. jtrapat1

    strtok with comma delimited string

    Thanks for the posts. I finally fixed the problem. Had to trim the white space from both ends of the tokens. Here's the function I ended up using: ------------------------------ char* strtrim(char* str) { int i = 0; int j; while (str[i]!= '\0' && str[i] == ' ') i = i + 1; j = i; while...
  8. jtrapat1

    strtok with comma delimited string

    marsd, Yes, I'm still having a problem parsing thru my string. Since my data was entered as: comma then space, it's a problem. For example, I have JONES, SMITH, ALLEN, PARSON, ... If you could post that string splitting function, I would appreciate it. Thanks John
  9. jtrapat1

    strtok with comma delimited string

    I'm trying to parse a comma delimited string with strtok - It's working fine but I have a couple of special cases: I'm reading from a file and one line of my 320-character string looks like this: JONES, SMITH, ABBEY, JOHNSON, LONG ISLAND, STATEN ISLAND, ... My program can handle most of these...
  10. jtrapat1

    "Close Word Document If Open" Through Macro Code

    Thanks Rob, Right now, we do pop up a message box if the document is already open. I thought there might be a way thru code in which we could compare file names and then... If that document is open, we could close it and then re-open it. Here's the current macro code...
  11. jtrapat1

    "Close Word Document If Open" Through Macro Code

    We have a word macro which generates a word document, opens it, and then "Save As" with a specified filename. The word document is launched from a hyperlink on a web page. The problem is if the user has this document open and it is minimized somewhere on the screen, the user cannot...
  12. jtrapat1

    Flat File Created By C Program Can't Be Read From MSAccess

    DucatiST2, Thanks for the help. That fixed the problem. John
  13. jtrapat1

    Flat File Created By C Program Can't Be Read From MSAccess

    I have a C Program which writes out a fixed length file. The file needs to be read by a macro in Microsoft Access which expects the data in fixed starting and ending positions. However, when I try to import the file from Access, by: Get External Data... and then choose the file; the import only...
  14. jtrapat1

    Excel Chart Display With Different Resolutions

    We are using Office 97 and have a Microsoft Word macro which creates a report and pulls in an Excel bar chart and pie chart. When the report is run with a resolution of 1024 X 768, the report looks great and is perfectly centered. The problem is that when it is run with a resolution of 800 X...
  15. jtrapat1

    Best Method For Writing Fixed Length Text File With Cursor

    I'm using C Programming and am trying to write out a fixed length text file. The text file will be the result from a SELECT query against DB2 database tables. ----------------------------------------- EXEC SQL DECLARE C1 CURSOR FOR SELECT bp73.adds_id, bp73.priority, bp70.last_name...

Part and Inventory Search

Back
Top