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 SkipVought 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. prismtx

    Updating a field if not already in table

    That worked like a charm! Thanks SantaMufasa!
  2. prismtx

    Updating a field if not already in table

    I am trying to update a field from a value of 10 to a value of 20, unless a record for that City already is in the table with that value. I can do a straight update, but then I might get 2 records that are identical. I don't know how to code sql to do this. select * from zone z set type_seq...
  3. prismtx

    Combining values by field value

    I was surprised when I first started working on the system that it was not a date field, but its a vendor supplied system and we have no control over it or the coding. We can only write reports off of the data.
  4. prismtx

    Combining values by field value

    Thanks Mufasa, The depart_date is not a date field, so I did a to_date on it and it worked great. Made the code much cleaner. Thanks for your help! select to_date(depart_date,'yyyymmdd') as "Departure Date", decode(out_code,0,0,1) "out_code", count(*) "Trips" from departure_table...
  5. prismtx

    Combining values by field value

    I tried doing the case as CASE WHEN (out_code = 0) THEN '0' ELSE '1' END as out_code2, and grouping on depart_date, out_code2, but it says ORA-00904: "OUT_CODE2": invalid identifier Do I need to code the expression again in the Group clause?
  6. prismtx

    Combining values by field value

    I have some SQL code which I execute to feed to a spreadsheet for percentages. Out_code used to have a value of "0" or "1". Now it has multiple values for non-zero codes. I want to make my output have only 2 lines per date: a line for "0" and a line for "1", but I have tried decode and case...
  7. prismtx

    Moved and Deleted Messages Coming Back

    Do you flag them to be deleted from the server? I have had this problem, but it was usually on the ISP's end that kept resending them to me. However, if you say to delete from server, they should go away.
  8. prismtx

    Point Open File Window to a specific directory

    I was out for a few days, but just got back and tried PHV's solution. Worked like a charm! Problem solved. Thanks for the insight.
  9. prismtx

    Point Open File Window to a specific directory

    I know that the ChDir should work, but for some reason it isn't. I have tried ChDir "\\123.45.10.66\shared\CSV" and ChDir "\\hmm04\shared\CSV" but although it does not give any error, it still is opening to a directory on my C: drive.
  10. prismtx

    Point Open File Window to a specific directory

    I tried the ChDir "\\123.45.67.890\shareName" as you suggested, but the open file box still defaulted to the last directory that I had used.
  11. prismtx

    Point Open File Window to a specific directory

    Sorry, I hit submit instead of preview. This is easier to read: Yes I tried ChDir "\\Hmm04\Shared\CSV\Daily Reports" and got the same results. I have the network drive mapped to the letter "G" and can get it to work this way: ChDir "G" ChDir "CSV\Daily Reports" But i don't know what the...
  12. prismtx

    Point Open File Window to a specific directory

    Yes I tried [b]ChDir "\\Hmm04\Shared\CSV\Daily Reports" [\b] and got the same results. I have the network drive mapped to the letter "G" and can get it to work this way: [code]ChDir "G" ChDir "CSV\Daily Reports"[\code] But i don't know what the users will have the drive mapped to, or if they...
  13. prismtx

    Point Open File Window to a specific directory

    I have an Excel macro that runs when a spreadsheet opens and I want it to give an open file message box that is pointing to a network drive where some csv files are stored. My problem is that the open box defaults to the last folder opened and I have not been able to change it to the network...
  14. prismtx

    System call with user inputting values?

    Set variables for the date(s) and make the call using those variables. Put the command inside of back ticks (not single quotes). $Date1 = "2008/04/05"; $Date2 = "2008/04/06"; `nfdump -R /../../ -t $Date1.09:00:00-$Date2.10:00:00`;
  15. prismtx

    Column order in Select *

    Thanks for the responses. I had written a shell script to do this extract on 14 files and the * made it very easy to repeat the code. I can do it with the enumeration, but it takes more time to code and means the script isn't quite as reusable, since they want to add more tables in the future.
  16. prismtx

    Column order in Select *

    I am generating an extract file using a "select * from table". I have been told that this will not always give me the columns in the same sequence and that I need to do a "select colname1, colname2, colname3, etc from table" in order to guarantee the results are the same each time. Does anyone...
  17. prismtx

    Need to capture Connect error

    Thanks hoinz, moving those lines after sqlplus worked (and removing the set on the WHENEVER's) It is a sqlplus call embedded in a unix script and now I am capturing the error as I had hoped.
  18. prismtx

    Need to capture Connect error

    I have a script which calls SQLPLUS and passes the login information. It is working great, but if the database is down or if it passes a bad parameter, the connect does not work, but I still get a return code of zero. Is there a way to capture when there is a connect error and exit with a...
  19. prismtx

    How to extract a delimited file?

    Thanks Turkbear. I knew there was a way, but could not find the way to set it. It worked perfect. The syntax was: SET COLSEP '|' no equals sign
  20. prismtx

    How to extract a delimited file?

    I need to extract data from about a dozen tables to pipe-delimited files. Some of these have 70-80 fields in them. I want to extract all fields from the selected records. Is there an easier way to insert the delimiters other than Select field1, '|', field2, '|', .... field75 from table1 where...

Part and Inventory Search

Back
Top