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 Wanet Telecoms Ltd 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. barbarul2001

    need some help with an evaluation

    I need to point some weak points of O3 from Ideasoft. Anybody ,any ideas,hints pls. Thx Senior Developer / DBA
  2. barbarul2001

    Getting Top values from a table

    ...how hard can be a deadline problem so I help as soon as I can. I think this is what you want... SELECT Iif(DateAdd("d",t1.RenewalMonths*30,t1.RenewalDate)>date(),"Active", "Expired") FROM tbl t1 where t1.RenewalDate = ( select max(tbl.RenewalDate)...
  3. barbarul2001

    Selecting on fields in an outer join

    It's strange what you say. The syntax looks ok and i don't know why this does not work. Do you really need those nulls? If not, it's simple: try to filtrate in where with cudefis not null . senior rdbms specialist
  4. barbarul2001

    unique or null

    If you try to enforce unique constraint you could use NULL value, but only once. So, it is possible , but doesn't help you much. For your needs I recommend a trigger or to enforce integrity on the application level. senior rdbms specialist
  5. barbarul2001

    'sum(x1+x2+..)' OR 'sum(x1) + sum(x2)+ ..' ????

    ...(CBO). It will rarely choose to use an index on column referenced using an OR statement. It will even ignore optimizer hints in this situation. The only way of guaranteeing the use of indexes in these situations is to use the /*+ RULE */ hint. but this is another story. senior rdbms...
  6. barbarul2001

    'sum(x1+x2+..)' OR 'sum(x1) + sum(x2)+ ..' ????

    You perform mathematical operations on the indexed(i think) column(s), so in both situations you will have table access full, so both are bed or equally good ;) senior rdbms specialist
  7. barbarul2001

    Join vs Count vs Sum problem

    What about this little one ? select TT1.*,compl,tries from ( SELECT A.id AS dep, sum(A.ant) AS sales, FROM A WHERE YEAR(A.d)=2002 GROUP BY A.id ) tt.1 LEFT JOIN ( select S.id AS dep ,COUNT(S.res) AS compl ,SUM(S.el) AS tries FROM S WHERE YEAR(s.d)=2002 GROUP BY s.id...
  8. barbarul2001

    Join vs Count vs Sum problem

    what about this one? SELECT A.id AS dep, SUM(distinct A.ant) AS sales, COUNT(S.res) AS compl, SUM(S.el) AS tries FROM A LEFT JOIN S ON A.id=S.id AND A.d=S.d WHERE YEAR(A.d)=2002 GROUP BY A.id; senior rdbms specialist
  9. barbarul2001

    Urgent help needed!! reg: nested SQL query (using Select but tricky )

    try this: select distinct s.sname from stocks s,order_detail od, order o where o.ono=od.ono and s.sno=od.sno group by s.sname having count(distinct o.cno)=(select count(c.cno) from customer c) senior rdbms specialist
  10. barbarul2001

    numeric values

    ...CREATE OR REPLACE FUNCTION CHECKN(word VARCHAR2) RETURN NUMBER IS i NUMBER; j NUMBER:=0; BEGIN FOR i IN 1..LENGTH(word) LOOP SELECT j+COUNT(*) INTO j FROM dual WHERE SUBSTR(word,i,1) NOT IN ('0','1','2','3','4','5','6','7','8','9'); IF j>0 THEN RETURN(j); END IF; END LOOP; RETURN j; END...
  11. barbarul2001

    Insert Problem

    insert into Employee select 5562, John Smith , Dept.Dept_ID from Dept where Dept_Name='Engineering' web/sql developer
  12. barbarul2001

    Alpha comparisons

    ...tram named desire','desire')+length('desire')))=4 will have this output a tram named desire so... in an abstract way is this: select * from table where wordcnt(substr(field,1,instr(field,searched_pattern)+length(searched_pattern)))=value_of_pozition_wanted Are you satisfied? web/sql...
  13. barbarul2001

    Retrieve only first rows in a grouping

    Rectification for sybase: select top 1 company, user_id, maincontact from pt5_user xx having maincontact=max(maincontact) web/sql developer
  14. barbarul2001

    Retrieve only first rows in a grouping

    ...1 company, user_id, maincontact from pt5_user xx where maincontact=max(maincontact) or this select top 1 company, user_id, maincontact from pt5_user xx where 0=(select count(*) from pt5_user where company = xx.company and xx.maincontact<maincontact ) good luck ! web/sql...
  15. barbarul2001

    Alpha comparisons

    tdatgod was right, but not totally. Correct i think it is this: Select title from books where ltrim(rtrim(title)) not like ( '% %' ); Regards web/sql developer
  16. barbarul2001

    problem with select statement

    You could try this: SELECT table1.column1, sum(<very:long_expression1>) bla1, sum(<very:long_expression2>) bla2, sum(<very:long_expression2> + <very:long_expression2>) bla3 -- here an error occures FROM ... several tables ... WHERE ... several contraints ... GROUP BY...
  17. barbarul2001

    Subtracting 2 dates and getting hour and min as out put

    ...hh24:mi:ss'))||' days' days_between ,'and '||to_char( to_date ( mod( (86400*( sysdate-to_date('09.06.2002 22:59:30','dd.mm.yyyy hh24:mi:ss')) ),86400) ,'sssss')...
  18. barbarul2001

    SQL query help

    ...10:23:34 12.08.2002 10:23:34 10.08.2002 10:23:34 08.08.2002 10:23:34 06.08.2002 10:23:34 04.08.2002 10:23:34 02.08.2002 10:23:34 SQL: select * from a1 where ss<='07.08.2002' and 3>(select count(*) from a1 d where d.ss<a1.ss) and i have SS 06.08.2002 10:23:34 04.08.2002 10:23:34...
  19. barbarul2001

    Select a single record from a recordset??

    - general dbms solving: use a cursor . web/sql developer
  20. barbarul2001

    need help.

    U CAN DO THIS ONLY IN YOUR CODE. IT'S NOT REALY AN SQL ISSUE.U NEED TO SAVE IN A VARIABLE THE NAME OF THE university AND WITH AN &quot;IF&quot; U CAN SOLVE YOUR PROBLEM. :) gOOD lUcK ! web/sql developer

Part and Inventory Search

Back
Top