Thanks: What I have is
Spool MyResult.txt
SELECT hist_segs-* FROM Hist A, Hist_Segs B
WHERE A.HistNum = B.HistNum AND
A.date >= to_date(:fdt,'mm/dd/yyyy')
AND A.date < to_date(:tdt,'mm/dd/yyyy'));
spool off
This query takes about 2 minutes to run. With the query above, I run out of...
Newbie - I am trying to create a plsql statement that takes results from one select statement and puts them into the 2nd and then puts the results from the 2nd statement into a text file
ie:
1st
SELECT HistNum FROM Hist WHERE date >= to_date(:fdt,'mm/dd/yyyy') and date <...
I am trying to write two reports:
One: Retrieves the first record for each unit for each invoice number. Each unit, may have been 'ENR', 'AT DEST', 'AV' many times, and each invoice may have several units associated to it (see example below). As you can see, I do get a small cartesian product...
I am trying to write two reports:
One: Retrieves the first record for each unit for each invoice number. Each unit, may have been 'ENR', 'AT DEST', 'AV' many times, and each invoice may have several units associated to it (see example below). As you can see, I do get a small cartesian product...
I am trying to write a script that will create insert statements that will look like:
INSERT INTO t_peep VALUES ('col1', 'col2', 'col3');
The problem that I am having with my select statement is being able to add the single quotes.
Select 'INSERT INTO t_peep VALUES ('<need single...
I am trying to create a sql query where I subtract one date from another.
examples of the data are:
occnt segname date
2 OUTSER 08/09/02 06:18
3 REMINQ 08/09/02 06:32
8 OUTSER 09/21/02 08:06
9 LOGOFF 09/21/02 08:14
11 OUTSER 10/10/02 21:51
12 CLEAR...
I am trying to get the first occurance of the code field for each CAS# (Results only have one cas#)
How would I do that using my select statement:
Select casnum, to_char(optm, 'hh24:mi:ss'), cltm, code, clnum
from cashist
where opendate between '2001-01-01' and '2001-01-30'
RESULTS:
CAS#...
I am trying to get the first occurance of the code field for each CAS# (Results only have one cas#)
How would I do that using my select statement:
Select casnum, to_char(optm, 'hh24:mi:ss'), cltm, code, clnum
from cashist
where opendate between '2001-01-01' and '2001-01-30'
RESULTS:
CAS#...
I am subtracting two dates date1 - date2 I have found that to_char((date1 - date2)*1440) give me the minutes between the two dates,but I would like to get the format of hh:mi:ss for the results. Can anyone help.
Thanks in advance.
I have to update employee ids to add one character to the front of them. It would be too time consuming to do each record individually. What would the SQL be?
have 1223 Smith Mary
want Q1223 Smith Mary
Could anyone help? Thanks
I need to change the values of my personell records the have a character in front of the person_id. Example
1234 Smith Mary will turn into E1234. what would the update or insert query be
Can anyone give me the syntax that you would use to import data into a different user and tablespace from where the export file was created.
ie imp sys/manager file=x.exp ignore=y fromuser=scott touser=tiger tables=a,b,c
but where do I add that the tables are to be put into a different...
I have an old full database export file and would like to view the data, by putting it into a flat file without importing it into tables. What is the best way of doing so?
Thanks in advance
Sam
I have an old full database export file with which I have to retrieve data from 3 tables. I cannot import into an existing database, I just want to be able to get the data into a spreadsheet to view. How do I do this? Thanks in advance.
I am trying to find days of the week and group them by those days ie hiredate field grouped by days of the week and am having no luck. Any suggestions.
I am trying to create a sql script that gets values from a text file that looks like:
2234
1233
4455
223435
the statement will have to loop through the whole list, putting the information into another .txt file
the statement is :
select * from <table t> where t.id = x.txt <value from text...
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.