Quote:
Originally Posted by
pallvi_mahajan
Hi All,
am getting confused, please let me know how i can do this
how
in_put number :-nvl('&1',0) can take all values from file.
---------- Post updated at 06:01 PM ---------- Previous update was at 04:17 PM ----------
Hi Ditto,
we have no permission in database to create external table. so is there any alternate way for this
Yes, look up SQL*Loader.
Again, Oracle related ... you should hop over to an Oracle forum to continue this question
It's definitely an Oracle question, not unix.
Breakdown of:
ln_input number := nvl('&1',0);
'&1' ==> Captures the first parameter passed to the .sql script (ie the file count). Note, that this information is mostly useless to you, since you don't care how many rows are in the file, you just want to query a database table which matches each line in the file ...
nvl(<value>,0)
as mentioned by RudiC, if <value> is NULL or EMPTY (ie not provided), it uses the value "0" (numeric, not string).
Note that as written, it will then try to "convert" the string '&1' into a number.
If the input was "hello", then this will fail, since "hello" cannot convert to a number.
Again, however, after re-reading your original post ... this doesn't really help you at all
You need External tables (preferred), or SQL*Loader if you can't use External Tables.