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: *

  • Users: jtrapat1
  • Content: Threads
  • Order by date
  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

    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...
  3. 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...
  4. 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...
  5. 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...
  6. 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...
  7. 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...
  8. 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...
  9. 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...
  10. jtrapat1

    Insert Into DB2 VarChar Field

    I need to know the best way to insert data into a varchar field in a db2 table to optimize space and performance. Here's how the db2 field is defined: -------------------------------- struct { varchar purpose_desc[400]; varchar length; }purpose[400+1]; --------------------------------- Now...
  11. jtrapat1

    Export DB2 Data To Fixed Length Text File

    I need to extract some data from db2 to a fixed length file so that it can be read by some Microsoft Access macros. I don't think I'll have to join two or more tables - it may be coming all from one table. (I'll post more info later, if this is the case.) I need to be able to set the starting...
  12. jtrapat1

    Word Macro Not Inserting Latest Version of Text File

    I'm using office 97 and I have a word macro which inserts a text file from the server (along with several pie charts). I dynamically write a text file to the server and insert this text file into the word document. If the user launches the word document a second time, I want to delete the text...
  13. jtrapat1

    Help With DB2 Load Utility Parameters

    I'm trying to run this load against DB2 from a command line: ---------------------------------- db2 "load from APPROPS2001.TXT of asc method L (22 25,1 20,54 58,63 65,59 61,76 76,62 62,84 103,164 183,424 435,460 471,82 82) messages msgs.txt insert into nysa.bp10t_appropriation (BUDGET_YR...
  14. jtrapat1

    Read Flat File Into Structure

    I'm trying to load a flat fixed length file into a structure and I'm getting some garbage in the data fields. Right now, I'm just trying to print to the screen the data that is in the file. Eventually, I wanted to then connect to a database and run queries so that I could loop thru and load this...
  15. jtrapat1

    Setting Variables Inside DB2 Script

    I'm using DB2 version 7 and I'm writing several scripts to be executed from the command line. These are simple inserts. Here's an example script: ------------------------------------------- db2 "INSERT INTO nysa.bp37t_temp_approp_distinct SELECT DISTINCT budget_yr, agency_code...
  16. jtrapat1

    Help With DB2 Load Utility

    I'm using the load utility in DB2 and am trying to import a flat file with fixed length fields. The load goes fine however, I don't have a field on the file for the year that I am importing. Is there any way I can hard-code or specify the year that I want when I import the data into the table...
  17. jtrapat1

    Insert Label With Field Name in SQL Select

    How can I concatenate a label with the value of a field that I'm returning from a SELECT statement in DB2? Here's my SELECT statement: The field with the label is: Unknown Agency + fieldname. ------------------------------------------ SELECT nysa.bp10t_appropriation.agency_code...
  18. jtrapat1

    Help Converting SQL Server Query To DB2

    I have a query which works against SQL Server and I need to run it against DB2 version 7 from a C program. Here's the query from SQL Server: ------------------------------------------------ Insert into appropsdistinct select distinct acode, right(pcode,3),catcode, fundcode...
  19. jtrapat1

    Internet Explorer - Differences on Windows 98/NT

    We have an intranet application with C/CGI scripting written against a DB2 database. On one of the HTML pages, we display a table with several columns of data in a grid. At the top of the table we pass a different WHERE clause to the server so that the columns can be sorted - ASC or DESC. The...
  20. jtrapat1

    How To Concatenate a Comma-Separated List

    We're using C/CGI scripting against a DB2 database. We're working on a page where if the user clicks on a column header it will toggle and sort ASC/DESC. The problem is that we are sorting by a number of columns so that when we run the sort, each column has to have ASC or DESC following the...

Part and Inventory Search

Back
Top