...with that value. I can do a straight update, but then I might get 2 records that are identical. I don't know how to code sql to do this.
select * from zone z
set type_seq = 20
where S_NAME in ('AAA', 'BBB', 'CCC')
and type_seq = 10
If 'BBB' has 2 records, one with 10 and one with 20...
I was surprised when I first started working on the system that it was not a date field, but its a vendor supplied system and we have no control over it or the coding. We can only write reports off of the data.
...cleaner. Thanks for your help!
select to_date(depart_date,'yyyymmdd') as "Departure Date",
decode(out_code,0,0,1) "out_code",
count(*) "Trips"
from departure_table
where depart_date >= to_char(sysdate-10, 'yyyymmdd')
group by depart_date, decode(out_code,0,0,1)
order by...
I tried doing the case as
CASE WHEN (out_code = 0) THEN '0'
ELSE '1'
END as out_code2,
and grouping on depart_date, out_code2, but it says
ORA-00904: "OUT_CODE2": invalid identifier
Do I need to code the expression again in the Group clause?
...1, 4)) as "Departure Date",
CASE WHEN (out_code = 0) THEN '0'
ELSE '1'
END as out_code,
count(*) as "Trips"
from departure_table
where depart_date >= to_char(sysdate-10, 'yyyymmdd')
group by depart_date, out_code
order by to_date(depart_date, 'yyyymmdd')...
Do you flag them to be deleted from the server? I have had this problem, but it was usually on the ISP's end that kept resending them to me. However, if you say to delete from server, they should go away.
I know that the ChDir should work, but for some reason it isn't. I have tried ChDir "\\123.45.10.66\shared\CSV" and ChDir "\\hmm04\shared\CSV" but although it does not give any error, it still is opening to a directory on my C: drive.
Sorry, I hit submit instead of preview. This is easier to read:
Yes I tried ChDir "\\Hmm04\Shared\CSV\Daily Reports" and got the same results.
I have the network drive mapped to the letter "G" and can get it to work this way:
ChDir "G"
ChDir "CSV\Daily Reports"
But i don't know what the...
Yes I tried [b]ChDir "\\Hmm04\Shared\CSV\Daily Reports" [\b] and got the same results.
I have the network drive mapped to the letter "G" and can get it to work this way:
[code]ChDir "G"
ChDir "CSV\Daily Reports"[\code]
But i don't know what the users will have the drive mapped to, or if they...
...Here is what I have tried, but none are working:
ChDir "//Hmm04\Shared\CSV\Daily Reports"
Filename = Application.GetOpenFilename("CSV Files (*.csv), *.csv")
InitDir = "//Hmm04\Shared\CSV\Daily Reports"
Filename = Application.GetOpenFilename("CSV Files (*.csv), *.csv")
ChDrive...
Set variables for the date(s) and make the call using those variables. Put the command inside of back ticks (not single quotes).
$Date1 = "2008/04/05";
$Date2 = "2008/04/06";
`nfdump -R /../../ -t $Date1.09:00:00-$Date2.10:00:00`;
Thanks for the responses. I had written a shell script to do this extract on 14 files and the * made it very easy to repeat the code. I can do it with the enumeration, but it takes more time to code and means the script isn't quite as reusable, since they want to add more tables in the future.
I am generating an extract file using a "select * from table". I have been told that this will not always give me the columns in the same sequence and that I need to do a "select colname1, colname2, colname3, etc from table" in order to guarantee the results are the same each time.
Does anyone...
Thanks hoinz, moving those lines after sqlplus worked (and removing the set on the WHENEVER's)
It is a sqlplus call embedded in a unix script and now I am capturing the error as I had hoped.
...set WHENEVER SQLERROR exit 1
set WHENEVER OSERROR exit 1
set serveroutput on size 100000
sqlplus /nolog <<EOF
connect $USERNAME/$PASSWORD@$1
select * from table1;
exit
EOF
if [ $? != 0 ]
then
echo "NOT CONNECTED TO SQL"
exit 1
fi
echo "Return Code = $?"
But I get these messages:
SQL>...
I need to extract data from about a dozen tables to pipe-delimited files. Some of these have 70-80 fields in them. I want to extract all fields from the selected records. Is there an easier way to insert the delimiters other than
Select field1, '|', field2, '|', .... field75 from table1
where...
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.