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

    ...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 = 20 where S_NAME in ('AAA', 'BBB', 'CCC') and type_seq = 10 If 'BBB' has 2 records, one with 10 and one with 20...
  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

    ...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 where depart_date >= to_char(sysdate-10, 'yyyymmdd') group by depart_date, decode(out_code,0,0,1) order by...
  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

    ...1, 4)) as "Departure Date", CASE WHEN (out_code = 0) THEN '0' ELSE '1' END as out_code, count(*) as "Trips" from departure_table where depart_date >= to_char(sysdate-10, 'yyyymmdd') group by depart_date, out_code order by to_date(depart_date, 'yyyymmdd')...
  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

    ...Here is what I have tried, but none are working: ChDir "//Hmm04\Shared\CSV\Daily Reports" Filename = Application.GetOpenFilename("CSV Files (*.csv), *.csv") InitDir = "//Hmm04\Shared\CSV\Daily Reports" Filename = Application.GetOpenFilename("CSV Files (*.csv), *.csv") ChDrive...
  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

    ...set WHENEVER SQLERROR exit 1 set WHENEVER OSERROR exit 1 set serveroutput on size 100000 sqlplus /nolog <<EOF connect $USERNAME/$PASSWORD@$1 select * from table1; exit EOF if [ $? != 0 ] then echo "NOT CONNECTED TO SQL" exit 1 fi echo "Return Code = $?" But I get these messages: SQL>...
  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