For the benefit of those who don't have the DB handy, following from the first select statement above:
select * from master_tbl where job_id IN (select job_id from code_tbl);
4 Bill 1
5 George 2
1 John 3
5 LaToya 3
select * from master_tbl where job_id NOT IN (select job_id from code_tbl);
2...
Yes I can elaborate. NOT IN can be very dangerous.
create table master_tbl (
user_id number,
user_name varchar(30),
job_id number
)
create table code_tbl (
job_id number,
job_desc varchar(20)
)
insert into master_tbl values (1,'John',3);
insert into master_tbl values (2,'Sarah',4);
insert...
Hhhmmm. I AM one to argue and I'd have to stay on the side of kludgy. A table is a table is table - that is the great thing about a database. Someone else can come along and change the join/link in the future as needed. If I have to write the join within the SP, that will require someone in...
Oops...I forgot about all of the other aggregation that goes on even to get to the point where you'd have 9 million rows. Not sure it will work. I mean, I could definitely precalculate all 9 million rows and it would work, but then you deal with the physical storage requirements changing...
BTW another thing I'm thinking of doing is changing the existing view that the report runs off of (which would have its data updated by the stored procedure) to do a cartesian product of all possible results by date. (time granularity is only per day, thank goodness)
The total number of possible...
Turkbear, synapsevampire,
Thanks. exec didn't work. I'm sure I have the right syntax to call the sp because it does work the first time. I am using native oracle drivers.
Turkbear, I will have to try it this way, I suppose. But like I said it's totally kludgy if they make you do something...
No problem I mix them up sometimes too because I also develop in SQL server.
EXEC is oracle syntax in SQL plus to run a sql script that is a local file but I've never used it to run a procedure residing on the database.
BEGIN procedure_name END;
is what I've used to call procedures inline in...
synapsevampire,
Thanks for the quick reply. That seems like SQL server syntax, I got this error msg when I tried it...
Failed to retrieve data from the database.
Details: ORA-00900: invalid SQL statement
I think it expects you to put exactly into that box what the command would be in sqlplus...
Hello,
I'm a pretty experienced Crystal user but I've never had to use a command object. In this case, what I'm using it for is to call a stored procedure, which then pre-aggregates a very complex dataset in the database (Oracle 9i). I don't know why Crystal doesn't give you a simple option to...
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.