Can somebody please help me with the syntax for copying the response of a query in a file
I want to use BCP utility to copy the response of the query
select s.study_key, s.study_id, e.volume_id from study s, examination e
where s.study_key=e.s tudy_key
Please I need immediate help with this.
Thanks for you help
User Profile
Collapse
-
Help Needed
I have a log file that is generated from numerous .sql file. I am trying to add a line in the .cmd file that runs these .sql should there be an error in in the log file. This is what I have so far
...Code:echo spool c:\temp\script_output.txt > c:\temp\Initialize.sql echo @c:\temp\tst1.sql >>c:\temp\Initialize.sql echo @c:\temp\tst2.sql
-
Thanks for the help, I first used append but then changed to what you suggested and it worked perfectly, I really appreciate your help.Leave a comment:
-
Spooling more than one file
I have several .sql file that I am runing from the dos prompt using echo. I want to spool the log files of each of the .sql files into one. The way I have it now, the current log file overwrites the previous. Can somebody please help me? This is very urgent
Thanks
...Code:echo spool c:\temp\oracle\script_output.txt > c:\temp\oracle\tests.sql echo @c:\temp\oracle\Create_Config.sql >> c:\temp\oracle\tests.sql
-
Double posting in the oracle forum was a mistake, I tried deleting one copy but it didn't work. I didn't know under which category to post hence my posting here as well since what I really want is more to do with batch scripting than oracle I thought somebody here can help. Anyway, I will try to help make managing the various forums more efficient by not double or triple posting.
Thank youLeave a comment:
-
I want to spool the the sql file as the DOS command prompt or in the batch fill....Leave a comment:
-
Urgent Help Needed
Can somebody please help me resolve this?
I have a batch file that copies various sql file into a temp folder. Then run the sql file from the temp location. However, I have to type exit at the sql prompt when on file is done for it move to the next file. I don't what to hard code exit in the sql script, how do I go about this? Also I want to spool each sql file but don't want to hard code it as well....Leave a comment:
-
Urgent Help Needed
Can somebody please help me resolve this?
I have a batch file that copies various sql file into a temp folder. Then run the sql file from the temp location. However, I have to type exit at the sql prompt when on file is done for it move to the next file. I don't what to hard code exit in the sql script, how do I go about this? Also I want to spool each sql file but don't want to hard code it as well.
Please help as I dire need... -
Urgent Help Needed
Can somebody please help me resolve this?
I have a batch file that copies various sql file into a temp folder. Then run the sql file from the temp location. However, I have to type exit at the sql prompt when on file is done for it move to the next file. I don't what to hard code exit in the sql script, how do I go about this? Also I want to spool each sql file but don't want to hard code it as well.
Please help as I dire need... -
How do I go about this? This is my first time of working on a batch script. Where do I start?Leave a comment:
-
Urgent Help Needed
I have a couple of wxs file and I need to write a batch script for installation. I don't want to specify the directory, just make it "generic" so the user can specify where he/she want the installation. I haven't done anything close to this before and I on time limit, please help.
Thanks -
Help
Can somebody please explain to me what this part of the code means:Code:CREATE TABLESPACE mytbs1 DATAFILE ‘/u01/oracle/data/mytbs01.dbf’ SIZE 500M EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO;
DATAFILE ‘/u01/oracle/data/mytbs01.dbf’ SIZE 500M -
Urgent Help Needed!
Can someone please explain with examples to me
1. How storage parameters are select for a locally managed tablespace.
2. Creating appropriate indexes for a schema.
3. how to tune the database for our standard installation
Thanks in advance for your time. -
specifying storage parameters
Can somebody please help me with specify storage parameters for a database schema. The schema is locally managed. The database should be setup to handle 1,000,000 studies. Each study is about 50mb? Please help need urgently and asap.
Thanks -
Here are the tables. Thanks
code (oracle 8)
...Code:DROP TABLE Lookuptab; CREATE TABLE Lookuptab ( DY_ID VARCHAR2(64) NOT NULL, ACCN_NUM VARCHAR2(16) NOT NULL, COMBO_DY_COUNT VARCHAR2(4) DEFAULT 0 NOT NULL, ISUSED VARCHAR2(3) DEFAULT 'NO' NOT NULL, UNIQUE (ACCN_NUM) ); CREATE INDEX AM_ISUSED ON Lookuptab (ISUSED); CREATE INDEX
Leave a comment:
-
Tuning SQL statements
Can somebody please help me enhance this sql statement to run faster.
[code=oracle]CREATE VIEW tryView AS
(SELECT ser_id, (SELECT dy_id FROM dy WHERE ser.dsy_id=dy_r id) as new_dy_id FROM sequence ser
WHERE dsy_id IN (SELECT dy_rid FROM dy WHERE dy_id IN (SELECT dy_id FROM lookuptab GROUP BY dy_id HAVING count(*) = 1)))
UNION
(SELECT
ser_id,
substr(
... -
It's not selecting any record.
Select ms_rd_rid, count (*)
from studies
having count (*) > 1
group by ms_rd_rid;
gets all duplicate record. Now I want records from this result that have different
accn_num.Leave a comment:
-
[code=oracle]
SQL> desc matchedstudies
Name Null? Type
----------------------------------------- -------- --------------------------
STD_IUID NOT NULL VARCHAR2(64)
MS_RD_RID NOT NULL NUMBER(9)
SQL> desc queue
Name Null? Type...Leave a comment:
-
selecting duplicate record with one different field
Can somebody please help me with a select statement for selecting duplicate records with one different field .
I have 3 tables: A, B and C
A has 2 fields
I ---- primary key
m
B
I ----foriegn Key reference I in A
N
ID
A_NUM
MB
C
N
ID
A_NUM
MB Primary key
I want to select
I,... -
No activity results to display
Show More
Leave a comment: