But it wont work." is not the best error description. What error message do you see?
If the parameters P_Start_Date and P_End_Date are of datatype DATE I do not see why the condition you mention should not work, unless the string that variable timestamp1 holds does not match the date format...
Hi,
the error number of the most recent error can be found in SQLCODE and the message in SQLERRM. The complete error stack is stored in ora_server_error_msg.
...object (like a database function or procedure) the privilege has to be granted directly, if it is just used for queries roles can be used.
To access the object simply prefix it with the schema name where it resides:
SELECT * FROM otherSchema.tableName
There is no need for a DB-link or...
My suggestion was not to use bash, but a mechanism that disables variable substitution in your here-doc.
After reading up a ksh manual online I found out that quoting the delimiter turns off parsing with this shell too.
So either use SamBones suggestion, which should be the most portable one...
Hi,
in your here-document v$tablespace is evaluated as a shell variable. I do not have a box with korn shell at hand, but in bash you can turn of variable subsitution in here-docs by quoting the token that is used as delimiter:
#!/bin/bash
...
sqlplus -s "/ as sysdba" <<-"EOF" >>gname.csv
set...
Hi,
Oracle allows "as" to define a table alias but does not allow the SQL server style column alias using the equal sign ( IN_amt = (e.sql * .1) ).
Another way to run the query that works on Oracle and SQL Server, but with different syntax is the with clause.
This is the Oracle syntax:
WITH cte...
...assigned to your user and then have a look at the profile (with a privileged account):
SELECT profile FROM dba_users WHERE username = 'YOURUSER';
SELECT * FROM dba_profiles WHERE profile = 'RESULT_FROM_FIRST_QUERY';
This is the quick fix:
ALTER PROFILE default LIMIT password_life_time...
Hi,
you can define the plus sign as your group sperator and put it in the desired position:
select to_char(55566.75,'99990G00D00','NLS_NUMERIC_CHARACTERS= ''.+'' ') from dual
If monitoring is set for a table all DML actions on it are counted and can be found in ALL_TAB_MODIFICATIONS and it does not have anything to do with auditing.
Actually I'm not sure if there is a view to find out if a specific table is audited or not.
The '-' does not matter. to_char always right-justifies numbers unless told otherwise.
TRIM is easier to understand, but fm000 is better performance-wise (a context switch less per call), so the preferred way depends on your goal.
If you give this code to someone who will maintain and modify it...
...multiply the numerator by 10 and use string manipuation to insert the point.
Maybe something like this (rough draft):
#!/bin/bash
X=3
Y=4
X10=$(($X*10))
R=$(($X10/$Y))
[ $(($X/$Y)) -ge 1 ] && RD=${R:0:${#R}-1}.${R:${#R}-1} || RD=0.$R
echo $RD
Just keep in mind that your result is a string...
Hi,
your first procedure declares the variable x and initializes it immediately.
Your second code fragment is incomplete. Did you declare the variables x, f_in, s_in and string anywhere?
Another problem I see is that you read the contents of the file into the variable string but then you try to...
...647328012328014B0114641964280169281E00020202020202020200270202020202020202020200
If you want to use it apply it to both sides of the equation.
select * from ref_table where NLSSORT(UPPER(c_lon) || ' ' || tl_lon, 'NLS_SORT = XFRENCH_AI')=NLSSORT('RUE DE L'' ARBRE SEC', 'NLS_SORT = XFRENCH_AI')
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.