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 Mike Lewis 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: nme
  • Order by date
  1. nme

    setting the width of line in sql*plus

    almost, use this: SET LINESIZE 500 if you want to make the columns smaller use the column command. e.g. to get a text field from 100 down to 20 you wuold type:[COLOR=blue] column my_column format a20
  2. nme

    FETCHing Records From A Cursor

    Isn't it just a case of you incorrectly referencing the variable, you have used it as if you are bringing back a record. Therefore 12. DBMS_OUTPUT.PUT_LINE('NAME1 : ' || name1.EName); should actually be 12. DBMS_OUTPUT.PUT_LINE('NAME1 : ' || name1); [COLOR=black] shouldn't it?!?
  3. nme

    DESPERATE HELP with substitution variables

    You said previously: IN_Month is an argument passed to this proc and also the name of a column from tbl_base. Is this correct? if IN_Month is a field in the table - is it a character field? If its a number field then maybe the parameters is getting passed rather than the field value (but I...
  4. nme

    DESPERATE HELP with substitution variables

    Right, as long as the data type is the same across all of the columns (tbl_base.jan, tbl_base.feb ... tbl_bae.dec) - get rif of the concept of having one variable per column and just use one, therefore your code: v_jan tbl_base.jan%TYPE; v_feb tbl_base.feb%TYPE; v_mar...
  5. nme

    DESPERATE HELP with substitution variables

    You appear to have reverted back to code that won't work, but you were right, the code I gave you wouldn't work as I messed it up a bit at the end (sorry - I'm only human) You need to put this: EXECUTE IMMEDIATE 'Update tbl_base set ' || IN_Dest_Month || ' = ''' || v_Month || ' where ........'...
  6. nme

    IN statement using a string

    You could use dynamic SQL: branch_string char(10); branch_string := '1,2,3,4'; EXECUTE IMMEDIATE 'select * from branch where branch_id in (' || branch_string || ')';
  7. nme

    SQL to find the 5 highest paid emp

    How about: SELECT e.emp_id, e.Name, e.salary FROM emp e WHERE 5 > (SELECT COUNT(DISTINCT salary) FROM emp WHERE salary > e.salary)
  8. nme

    Problem Returning a Value in ASP

    I may be WAY off the mark but take a look at this, it might help: http://support.microsoft.com/default.aspx?scid=kb%3ben-us%3b185958
  9. nme

    DESPERATE HELP with substitution variables

    Where is the invalid column - i.e. I don't think it will be the substituted IN_Dest_Month - I think it will be in your where clause. Can you send the error message? alternatively - just create another table and insert a row into it, then update this procedure to write to that table and run the...
  10. nme

    DESPERATE HELP with substitution variables

    Almost: EXECUTE IMMEDIATE 'Update tbl_base set ' || IN_Dest_Month ||' = ''' || v_Month'' where ........' Don't use double quotes it is all single quotes i.e. [single quote]'Update tbl_base set [single quote} || IN_Dest_Month || [single quote] = [single quote][single quote][single quote] ||...
  11. nme

    Turn column into a row

    how about: select a.index, min(a.column1 || a.column2 || b.column1 || b.column2) from table a, table b where a.index = b.index and a.column1 <> b.column1 and a.column2 <> b.column2; its not pretty - but hey, you didn't ask for beauty...
  12. nme

    dESPERATE HELP TO PASS ARGUMENTS AND LOCAL VAR TO SQL Part 2

    Can we keep the discussion in your first thread, please.
  13. nme

    DESPERATE HELP with substitution variables

    You're on-line now eh? - lets get down to business: In the case you are on about above, you need to put: text in bold is a string: EXECUTE IMMEDIATE 'Update my_table set ' || my_text_field || ' = ''' || v_variable_containing_text || ''''; for this example above, say my_text_field contained...
  14. nme

    dESPERATE HELP TO PASS ARGUMENTS AND LOCAL VAR TO SQL Part 2

    I am hoping you have cut this down to make it a little easier to post as you don't open the 2nd and 3rd cursors anywhere but close them ??? You also have some redundant code in there - After you declare the procedure you have: &quot;AS Begin DECLARE&quot; all you need to put is...
  15. nme

    DESPERATE HELP with substitution variables

    lewisp is correct but I think you need to take it a litle further: EXECUTE IMMEDIATE 'Update Incxxx.tbl_base set ' || IN_Dest_Month || ' = v_' || IN_Month || ' where year_id = ' || v_yearid || ' and unit_id = ' || v_unitid || ' and ver_id = ' || IN_Dest_VerID || ' and line_id = ' || v_lineid...
  16. nme

    DESPERATE HELP with substitution variables

    The line about commit from carp is very true but since you aren't creating anything IN your procedure you aren't making a call to CREATE and therefore aren't makeing an implicit commit - leave the commit in!!! The only time you are creating something is when you are actually creating the procedure.
  17. nme

    CANNOT access Oracle server thru IIS

    Natalie, See the post at: http://dbforums.com/arch/213/2002/10/521665 for guidance.
  18. nme

    Help creating SQL trigger in Oracle

    Did the previous solution work - if not, are you typing this directly into SQL*Plus? Your code looked fine at first glance (I haven't been through it with a fined tooth comb) but I have had problems in the past with trying to do multiple tasks in SQL*Plus without saving it to a file and then...
  19. nme

    Upgrading to Oracle 9i clients

    Hi, Has anyone had any experience with upgrading oracle clients and forms and reports runtimes from any version to Oracle 9i? Our site is currently thinking about it and would like to know of any possible problems. We want to get rid of the multiple versions of clients (7.3-2.5, 8.0, 8i...
  20. nme

    TEXT_IO PROBLEM

    A Java Bean would be pretty good, but you should be able to get away with just fully-qualifying the path of the file to point at a client PC, to get this you'd have to work out which client you are on when you make the request (I think this can be done via client-side scripts that sends a...

Part and Inventory Search

Back
Top