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

  • Users: MCubitt
  • Order by date
  1. MCubitt

    Finding 1st of a set in SQL

    Its ok, distinct did the trick, thx Applications Support UK
  2. MCubitt

    Retaining certain records from SQL result

    I have a query: select substr(ipis.contract,1,3) Company, ipis.contract, ip.type_designation, ipis.part_no, ipis.lot_batch_no, ipis.serial_no, ipis.qty_onhand, ipc.inventory_value Std_Cost, pol.buy_unit_price, (select currency_rate from currency_rate_tab cr where...
  3. MCubitt

    Awkward SQL selection on exchange rate

    So final : [/code] select currency_rate from currency_rate_tab cr where (cr.COMPANY,cr.CURRENCY_CODE,cr.CURRENCY_TYPE,cr.VALID_FROM) in (select cr1.COMPANY,cr1.CURRENCY_CODE,cr1.CURRENCY_TYPE, max(cr1.VALID_FROM) from currency_rate_tab cr1 where cr1.COMPANY='OKM' and...
  4. MCubitt

    Awkward SQL selection on exchange rate

    Actually, it does not work! It should be ...max(cr1.valid_from)... not min. Also, should be <= not >= The way it was working was to get the rate AFTER the current. Applications Support UK
  5. MCubitt

    Awkward SQL selection on exchange rate

    Sorry, I tried that too: 1 select currency_rate 2 from currency_rate_tab cr where 3 (cr.COMPANY,cr.CURRENCY_CODE,cr.CURRENCY_TYPE,cr.VALID_FROM) 4 in 5 (select cr1.COMPANY,cr1.CURRENCY_CODE,cr1.CURRENCY_TYPE, min(cr1.VALID_FROM) 6 from currency_rate_tab cr1 where 7...
  6. MCubitt

    Awkward SQL selection on exchange rate

    Almost!!! 1 select currency_rate 2 from currency_rate_tab cr where 3 (cr.COMPANY,cr.CURRENCY_CODE,cr.CURRENCY_TYPE,cr.VALID_FROM) 4 in 5 (select cr1.COMPANY,cr1.CURRENCY_CODE,cr1.CURRENCY_TYPE, min(cr1.VALID_FROM) 6 from currency_rate_tab cr1 where 7 cr1.COMPANY='OKM'...
  7. MCubitt

    Awkward SQL selection on exchange rate

    Thank you very much.. I had used brackets when it was = but not when it was IN. Thank you Applications Support UK
  8. MCubitt

    Awkward SQL selection on exchange rate

    Yes, that looks more right, but still fails: 1 select currency_rate 2 from currency_rate_tab cr where 3 cr.COMPANY,cr.CURRENCY_CODE,cr.CURRENCY_TYPE,cr.VALID_FROM 4 in 5 (select cr1.COMPANY,cr1.CURRENCY_CODE,cr1.CURRENCY_TYPE, min(cr1.VALID_FROM) 6 from currency_rate_tab...
  9. MCubitt

    Awkward SQL selection on exchange rate

    A few errors but stuck on this one: 1 select currency_rate 2 from currency_rate_tab cr where 3 cr.COMPANY,cr.CURRENCY_CODE,cr.CURRENCY_TYPE,cr.VALID_FROM 4 = 5 (select cr1.COMPANY,cr1.CURRENCY_CODE,cr1.CURRENCY_TYPE, min(cr1.VALID_FROM) 6 from currency_rate_tab cr1 where 7...
  10. MCubitt

    Awkward SQL selection on exchange rate

    Dima, Thank you very much for that, I am amazed it is possible! I will try to implement.. Applications Support UK
  11. MCubitt

    Finding 1st of a set in SQL

    I have a long SQL query with a number of tables: select substr(ipis.contract,1,3) Company, ipis.contract, ip.type_designation, ipis.part_no, ipis.lot_batch_no, ipis.serial_no, ipis.qty_onhand, ipc.inventory_value Std_Cost, ith.dated Receipt_Date, pol.currency_type, pol.currency_code...
  12. MCubitt

    Awkward SQL selection on exchange rate

    ...but you should not assume ALL valid_from dates are monthly. The table could be: VALID_FROM RATE 2005-01-05 10 2005-01-19 10.5 2005-02-03 9.8 2005-02-22 10.1 2005-02-28 10.2 2005-03-06 9.9 Applications Support UK
  13. MCubitt

    Awkward SQL selection on exchange rate

    We have a table which holds exchange rates for various currencies: SQL> desc currency_rate_tab Name Null? Type ----------------------------------------- -------- ----------------- COMPANY NOT NULL VARCHAR2(20)...
  14. MCubitt

    Joining three queries in SQL

    I think I managed it after all! select ipis.contract, ipis.part_no, ipis.lot_batch_no, ipis.serial_no, ipis.qty_onhand, nvl( ( select ( select pol.buy_unit_price from ifsapp.purchase_order_line_tab pol where rownum = 1 and pol.order_no=ith.order_no and...
  15. MCubitt

    Joining three queries in SQL

    I have 4 queries and need to amalgamate them to create one set of results. The first: select ipis.part_no, ipis.contract, ipis.lot_batch_no, ipis.serial_no, ipis.qty_onhand from ifsapp.inventory_part_in_stock_tab ipis where ipis.qty_onhand > 0 This is the primary query which should use...
  16. MCubitt

    Server will not restart from Shutdown &gt; restart

    I tried psshutdown which works fine, usually. But alas no effect on this server! If only I could discover WHY it were stuck! Applications Support UK
  17. MCubitt

    Server will not restart from Shutdown &gt; restart

    I was using NetMeeting and vnc, so surely it's as good as being on teh console (well, apart from the fact that technically the console is running those apps). Someone here said you have to shutdown and it works fine... just need to turn it on again. That's awkward since the first chance to...
  18. MCubitt

    Grep gived 0652-226 Maximum line length 2048 error

    PHV, So the single line replaces that entire script? It does appear to by the result, I have to say. Applications Support UK
  19. MCubitt

    Grep gived 0652-226 Maximum line length 2048 error

    Is this a restriction I can change (ie is 2048 set somewhere)? This is the script which has the grep: # Take input control file, # remove ALL lines upto (but not incl) 2nd STARTUP NO MOUNT, #/bin/ksh rm -f $2 startup_count=0 while read line do wrk1=`echo $line | grep ^STARTUP | cut -d" "...
  20. MCubitt

    Creating CSV file using VBA, problem with &quot;&quot; and ,

    Hi Tony - thanks for the thoughts. Actually, I am not entirely sure I need it any more and I'll explain why. I am reading an init.ora file (Oracle config) which has this as part of it: db_files = 1024 open_cursors = 100 control_files = ("/oracledata/IFSL/control01.ctl"...

Part and Inventory Search

Back
Top