Hi
I have to add Disk capacity trending information to data. Need to add future dates with potential disk capacity based on past dates. I have created some dummy data as follows:
if object_id('tempdb..#dummytable') is not null drop table #dummytable
create table #dummytable
(
ServerName...
Hi I have the following data which i have scripted for your convenience:
if object_id('tempdb..#people') is not null drop table #people
create table #people
(
DOB datetime
)
insert into #people values('19630901')
insert into #people values('19640901')
insert into #people...
Hi Larry
This might help:
if object_id('tempdb..#test') is not null drop table #test
create table #test
(
companyID int
,[$_Paid] decimal(10,2)
,[$_Billed] decimal(10,2)
)
insert into #test values(22,181.38,67.88)
insert into #test values(22,5986.34,2279.03)
insert into #test...
Hi Jose
Sorry I did not read your original emal properly. Try the reverse
WHERE
(
ProjectedSubmissionDate is not null and ActualSubmittedDate > to_date('1-Dec-10','dd-MON-yy')
)
or
(
ActualApprovedDate > to_date('1-Dec-10','dd-MON-yy')
)...
Try something like this in the WHERE part of your sql statement
WHERE
(
ProjectedSubmissionDate is null and ActualSubmittedDate < to_date('1-Dec-10','dd-MON-yy')
)
or
(
ActualApprovedDate < to_date('1-Dec-10','dd-MON-yy')
);
regards
Mark
I found a website that answered my question. Compared to sql server it's surprisingly difficult to do a simple thing like select * from a table in a stored procedure. This website has a good explanation for SQL Server Programmers
http://www.akadia.com/services/ora_return_result_set.html...
Hi Carp and Dagon
Thank you for replying. Yes I am very new to Oracle. But I have some experience in Sql Server.
Background
My boss wants to automate the counting of work that comes into his section.
What I've done
I've created a stored procedure that gets the data from history tables on...
Hi
I am new to Oracle having a SQL Server background. I like the richness of Oracle, but I am stumped on how to create a stored procedure that selects the columns from a table.
Like this:
create or replace procedure "P1"
is
begin
select * from T;
end;
/
The code to create Table T is...
I found this on the internet courtesy Wayne S at
http://www.sqlservercentral.com/Forums/Topic845680-338-1.aspx
-- if temp table already exists (failed previous run), drop it
if OBJECT_ID('tempdb..#test') IS NOT NULL DROP TABLE #test
-- simulate the table with the data in it.
-- NOTE how your...
Hi Borislav
Thank you for replying. The split function puts the data in rows, not columns.
E.g Split function puts
Apple,Pear,Kiwifruit,Orange
as
Fruit1
Apple
Pear
Kiwifruit
Orange
I want the data as:
Fruit1 Fruit2 Fruit3 Fruit4
Apple Pear Kiwifruit Orange
i.e the...
Hi
I would like to split a column containing comma-delimiter data into many columns.
e.g
TheFruit
Apple,Pear,Kiwifruit,Orange
to
Fruit1 Fruit2 Fruit3 Fruit4
Apple Pear Kiwifruit Orange
This is like a split function, but the results appear in columns not in rows...
Hi
I created the following code to show the code in my stored procedures:
set serveroutput ON
set feedback off
set linesize 200
set ver off
col name format A100 Heading 'List of Stored Procedures'
PROMPT
-- Show the list of stored procedures for the user name
SELECT distinct name
FROM...
Hi Dave
Thank you for replying.
I have a stored procedure that takes a parameter of a fruit name say Kiwifruit. A select statement will filter the records so only kiwifruit will appear.
I would like to change the stored procedure so it can take multi-values of say kiwifruit,pear,orange. These...
Hi
I have a stored procedure that has a multi-value parameter. The parameter called GetFruitNames will have a value such as
'kiwifruit,pear,orange'
In the select statement I have the folowing
select
fruitnames
from fruit
where
fruitnames in (GetFruitNames)
The GetFruitNames...
Hi
I worked out how to do this. Here is my code for future reference
Sub InsertDataTooOracle(Sql As String)
' The following code inserts data into the oracle database
' Can only run 1 sql statement. Don't use commit. Don't use semi-colon at the end of the sql statement
On Error GoTo...
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.