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 Chriss Miller 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. jimirvine

    SQL Help

    It is bad manners to get a solution from a different forum and then post it here as yours. You should also probably acknowledge the people who helped you on the other forum.
  2. jimirvine

    Jioning two tables

    You would need to post the logic as to why the data should join like that. i.e. why would 189 be associated with 100 and not 200?
  3. jimirvine

    Need Advice - Can we use Oracle in this situation?

    Does Dagon's response more fully answer your question?
  4. jimirvine

    Need Advice - Can we use Oracle in this situation?

    Short answer? You are going to need IT to maintain this.
  5. jimirvine

    Date in varchar2 format

    I would very, very strongly advise you to endeavour to get the datatype of that column changed to a date. There is never a good reason to have a date stored as text in a database such as Oracle.
  6. jimirvine

    tuning sql for counting no of rows with x no of consecutive numbers

    Maybe I'm missing something, but surely a simple analytic will do the job: WITH T AS ( SELECT 'user a' usr, TO_DATE('9:00','HH:MI') tm, 'logged in' stat FROM DUAL UNION ALL SELECT 'user a', TO_DATE('9:01','HH:MI'), 'logged in' FROM DUAL UNION ALL SELECT 'user a', TO_DATE('9:02','HH:MI')...
  7. jimirvine

    Programmatically load CSV file into oracle table using VB.Net

    You are entitled to your opinion of course.
  8. jimirvine

    Programmatically load CSV file into oracle table using VB.Net

    VB is a completely innappropriate tool for doing this. Use External Tables.
  9. jimirvine

    Not a single-group group function

    1. I would doubt this (in either case of the code) as I'm pretty sure that BO won't accept aliasing in its dynamically created sql. 2. SYSDATE is a date, why would you use a to_date on it? Makes no sense whatsoever. although, as Santa points out, your main issue seems to be with your brackets.
  10. jimirvine

    NVL(7.50, 0) or TO_CHAR(7.50, 0) give 7.5 instead of 7.50

    Only If those values are now text i.e. there was most likely a to_char performed on the value within the definition of the view. If they are not text, then they do not have trailing zeros. Jim
  11. jimirvine

    NVL(7.50, 0) or TO_CHAR(7.50, 0) give 7.5 instead of 7.50

    Serves me right for not reading fully the question. Answer number 1 is that the 'numbers' must be stored/passed as strings. storing/passing them as numbers will normalise the number and instantly become useless for anything with trailing zeros. after that, a little bit of arithmetic (an...
  12. jimirvine

    NVL(7.50, 0) or TO_CHAR(7.50, 0) give 7.5 instead of 7.50

    Maybe a quick demo: SQL> select to_char(7.5,'0') 2 from dual; TO -- 8 SQL> ed Wrote file afiedt.buf 1 select to_char(7.5,0) 2* from dual SQL> / TO -- 8 SQL> ed Wrote file afiedt.buf 1 select to_char(7.5,'00') 2* from dual SQL> / TO_ --- 08 SQL> ed Wrote file afiedt.buf...
  13. jimirvine

    Case..When..Statement

    Why not just SELECT DISTINCT b.amount_code_description, to_char(sum(CASE WHEN b.year = '2005' THEN to_char(b.ytd_amount, '9999999999.99') ELSE...
  14. jimirvine

    What is Redo1.log file from Oracle 9.2/Oradata/dbname

    NEVER modify the contents of your redo log files.
  15. jimirvine

    Execute Immediate: ORA-01008: not all variables bound

    Maybe this'll help: DROP TABLE foo; CREATE TABLE foo (eg NUMBER, x NUMBER, y NUMBER, z NUMBER); --Example 1 DECLARE l_x NUMBER := 1; l_y NUMBER := 2; l_z NUMBER := 3; l_str VARCHAR2(32767); err_line EXCEPTION; PRAGMA exception_init(err_line, -01008); BEGIN BEGIN EXECUTE...
  16. jimirvine

    get actual row count via dba views

    @Dagon, true, but the op specifically asked if it could be done without looking at the num_rows column.
  17. jimirvine

    get actual row count via dba views

    Well, if that table has a primary key on it, you might consider counting on that instead. Oh, and if anyone suggests count(1) .... well, just don't :)
  18. jimirvine

    proc doesn't work when called from trigger

    All of which would have been clear if the terrible when others had either not been used, or been used correctly
  19. jimirvine

    Oracle 10g

    define what you mean by last month. Last 31 days, between now and this day last month, from the first day to the last day of last month ....
  20. jimirvine

    proc doesn't work when called from trigger

    The first thing to doi is get rid of what is one of the worst pieces og coding that you can write i.e.: EXCEPTION WHEN others THEN CASE i_position WHEN 1 THEN RETURN 1; WHEN 2 THEN RETURN 2; ELSE RETURN 10; END CASE; Then...

Part and Inventory Search

Back
Top