Search Results

Search: Posts Made By: Ditto
8,886
Posted By Ditto
Have you tried putting those commands into a...
Have you tried putting those commands into a script?

ie:

echo "cd <path>" >file1.ksh
echo "cat <filename>" >> file1.ksh
chmod +x file1.ksh

make sure it's owned by <username>

then try...
1,132
Posted By Ditto
Cute .. learn something new everyday :) I...
Cute .. learn something new everyday :)
I guess I'm done for today ... G'night everyone! :p
1,132
Posted By Ditto
Define "full path" . is it: 1) starting...
Define "full path" .
is it:

1) starting with a slash "/" ?
then just check first character for a "/"


IAMIN=`pwd`

if [[ `echo $IAMIN | cut -c1` == "/" ]]
then
echo true
else
...
4,348
Posted By Ditto
I was able to do it this way .. no as "slick" as...
I was able to do it this way .. no as "slick" as a 1-line awk pilnet posted .. but still works :)
might be easier to read, as well? for us rookies, anyway

for i in `cut -f1 file1`
do
if...
Forum: Programming 01-20-2015
1,225
Posted By Ditto
Increase the size of your TEMP tablespace - it's...
Increase the size of your TEMP tablespace - it's not big enough ..
1,703
Posted By Ditto
Ok, and what does this file look like: ....
Ok, and what does this file look like:

. /home/bscs6/.kshrc

?
1,703
Posted By Ditto
Can you show results of these commands: ...
Can you show results of these commands:


which sqlplus

sqlplus
(log in manually)

exit;

export ORACLE_SID=SEGODI

sqlplus /nolog

connect sysadm/sysadm
Forum: Programming 01-19-2015
1,225
Posted By Ditto
SQL> create table junk 2 (field1 number,...
SQL> create table junk
2 (field1 number,
3 field2 number,
4 field3 number )
5 /

Table created.

SQL>
SQL> insert into junk values ( 3291234567, 333991123456789,...
Forum: Red Hat 01-13-2015
2,557
Posted By Ditto
Again .. don't do this: sqlplus -s...
Again .. don't do this:

sqlplus -s <login>/<password>@<CONNECTION_NAME>

it leaves the password visible by anyone else logged into the system.

do:

sqlplus -s /nolog << EOF
connect...
Forum: Red Hat 01-13-2015
2,557
Posted By Ditto
Irregardless of your final destination, you have...
Irregardless of your final destination, you have a problem, and are troubleshooting.

Create a script file for test purposes .. and see how it behaves ...
You just might find how much easier it...
Forum: Red Hat 01-13-2015
2,557
Posted By Ditto
As an Oracle DBA, I'd strongly recommend some...
As an Oracle DBA, I'd strongly recommend some changes to the way you're doing things.

don't use:
sqlplus -s <login>/<password>@<CONNECTION_NAME>

That makes your password visible to anyone...
4,833
Posted By Ditto
Ah, must have misread you then .. no worries :)
Ah, must have misread you then .. no worries :)
4,833
Posted By Ditto
Can you show an example? I read over the man...
Can you show an example? I read over the man page and couldn't see any reason it should exclude a date 29 days ago, when you indicate 14
:confused:

That seems like a pretty generous round off...
4,833
Posted By Ditto
that command seems to work fine for me ... shows...
that command seems to work fine for me ... shows me files from Nov 17, Nov 3, and older,
but not a file from Nov 28.

Can you show some ls -ltr commands and getfacl commands on the files you...
1,081
Posted By Ditto
Simple method might be something like: ...
Simple method might be something like:


for i in `cat $file2`
do
head -$i $file1 | tail -1
done


not sure if there's a cleaner or more efficient way, though :)
Forum: Programming 12-10-2014
5,938
Posted By Ditto
You're using "NUMTODSINTERVAL" you probably...
You're using "NUMTODSINTERVAL"
you probably want to use: "NUMTOYMINTERVAL"
instead ;)

Data Types (http://docs.oracle.com/cd/E11882_01/server.112/e41084/sql_elements001.htm#i128552)
995
Posted By Ditto
Probably a rookie answer here, but if you're...
Probably a rookie answer here, but if you're talking just scanning for the first error in a given log file, I've used this logic successfully in the past:


LN=`grep -n "<error>" <log_file> |...
Forum: Programming 11-25-2014
1,986
Posted By Ditto
I'm an Oracle guy, not very familiar with MYSQL...
I'm an Oracle guy, not very familiar with MYSQL .. :) I was thinking his issue was the fact that:

where column = 'today'

is not the same as:

where column = today

if today is some...
Forum: Programming 11-25-2014
1,986
Posted By Ditto
Notice how you're using the "columns" here in...
Notice how you're using the "columns" here in quotes?

between 'today' and 'monthago')


try doing the same thing when selecting:


select id, 'today', 'monthago', today, monthago
from (...
1,012
Posted By Ditto
it looks like it's *trying* to remove tabs and...
it looks like it's *trying* to remove tabs and spaces, with a single space.
the items in square brackets are the list of matches it'll look for, the "*" after the square bracket says "0 or more of...
1,350
Posted By Ditto
I suppose you could try: cat...
I suppose you could try:


cat missing_revenue_20141112.csv | tr -d '\n'


however, I doubt that'll have the effect your expecting :)

hint: read the man page MadeInGermany provided ;)
45,112
Posted By Ditto
It wasn't fine before .. you changed it. ...
It wasn't fine before .. you changed it.

2nd version added this:


case "$id" in


turning the underlined portion into part of a case statement - and it's the wrong syntax for a case...
10,581
Posted By Ditto
Yep :) (sorry if I didn't make that clearer...
Yep :) (sorry if I didn't make that clearer earlier :) sometimes you get so used to things, you "assume" they're obvious .. :D )
10,581
Posted By Ditto
Well, that's why I suggested external tables...
Well, that's why I suggested external tables first :)

But from a DB standpoint, I see the data as needed in the database, hence the load. Agreed, he didn't explicitly ask how to load it, but...
10,581
Posted By Ditto
unix variables generally are not available within...
unix variables generally are not available within SQL.

You need to pass them in to use them ...

Again, I'd definitely handle this using SQL*loader, or external tables, not via unix. Might...
Showing results 1 to 25 of 68

 
All times are GMT -4. The time now is 07:47 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy