Mufasa,
Thanks it does work! By the way, your "when rownum = 1" is that the way to get only the top row of your query to be returned? The "SELECT TOP 1 * FROM Table" syntax T-SQL supports is what I am familiar with.
Thanks again!
I am primarily a C++ programmer and have not worked in too much detail with PL/SQL, however some of our clients use Oracle, others use SQL Server, so this needs to work for both.
I do not have much knowledge about the v$instance, nor will I be able to manipulate DB settings at all or use...
Is the CASE statement supported or not in 9i? I keep getting a "Missing right parenthesis" error when trying to run this. I thought CASE was ANSI SQL and thus supported....
SELECT SRVCHGKEY, SRVCHG, ACCTTYPE, BLTYPEKEY, BLITEMGRP, EFFDATE, EXPDATE, PRNORDER, CALCORDER, PRNTTEXT, REFTEXT...
The next step is still the slowest. The SP above will identify 37044 accounts out of a total of 97000 accounts that "qualify" for archiving. So now I need to work a stored procedure complete with Selects, Inserts and Deletes to actually clear the tables of 37044 accounts and their individual...
That is the way I have been thinking for years. I stayed away from cursors for that very reason. However, I used an example of an SP that the company uses and it dropped then processing time from 4 days to 1 hour. It is possible that removing the cursor from this stored procedure may make it...
Okay, I'm changing my approach. Going to pull all the accounts , minus the ones I can exclude right away and processes them via a cursor to filter even more out. Then archive the remaining ones.
I appreciate the suggestions!
These are all good suggestions.
SQLSister in answer to yours, this program was written before my time and it is initiated by a C++ program we are writing in house. The user gets to see a display of # accounts Processed. # accounts archived. Sort of thing. I am trying to think of ways to do it...
Well this select is run for each account in the database. What it is doing this for is to identify which accounts qualify for being Archived out of the active tables and stored in the archive (history) tables. So in order to know which accounts need to be moved each one has to be checked against...
I tried a Stored Proc with nothing but the SQL statement and Declaration of the variables used in it. Like this:
CREATE PROCEDURE imsv7.testy ( @dwAcctKey NUMERIC, @tsArchiveDate DATETIME )
AS
DECLARE @tsDueDate datetime
SELECT @tsDueDate = MAX( C.DUEDATE )
FROM [imsv7].CUSTBL C
WHERE...
This is bizarre to me however, hopefully someone can explain what is happening here.
When I check the execution plan of the following query:
SELECT A.TRANDTTM
FROM [imsv7].ACCTTRAN A, [imsv7].CUSTBL C
WHERE A.ACCTKEY = @dwAcctKey AND A.BLKEY = C.BLKEY
AND A.TRANDTTM >= @tsDueDate AND...
Hey guys, thanks for the info ill try _int64. The reason is this. I am using an algorithm provided my MS to find out how much physical hard drive space a database table takes. This way I can pre-determine how much free space will be needed to modify/add a clustered index. The largest so far is a...
I have a calculation that takes in the number of bytes for a given file. This number can be in excess of 4.2 billion (4.2GB) bytes, which apparently is the largest a 32 bit unsigned int (or ulong/DWORD) can handle. I can put these numbers into Excel and it calculates them fine. Is there a data...
Great, thanks for the info. Currently Auto Close if OFF in our DB. It's got to do with the code. SQL appears to be running just fine.
Thanks for your tips :)
Hey, thanks for the info. I do feel better knowing that. I am writing a VC++ program using OLE DB Consumer Templates. It gets to the point where it tries to get the UseMultipleResults pointer from the Provider (SQL Server 2000) and tells me DB_E_ERRORSOCCURED. That is not very descriptive...
I am designing an application in VC++ using the Native SQLOLEDB.1 driver. I have no problems executing and accessing the results from a regular stored procedure in our SQL Server 2000 repository. However, as soon as I try and connect to a Stored Procedure that returns more than 1 result set...
I am designing an application in VC++ using the Native SQLOLEDB.1 driver. I have no problems executing and accessing the results from a regular stored procedure in our SQL Server 2000 repository. However, as soon as I try and connect to a Stored Procedure that returns more than 1 result set...
Never mind. The problem with using MSDN samples is not being clear on Wizard options selected. Anyway, as I was perusing the process of running sproxy.exe for Console App linkage to ATL Web Services, I came across the .wsdl file that needed to be generated. .NET Studio does this under the Add...
ATL Server, Web Service solution Visual Studio .NET
I have the code exactly like the sample OnlineAddressBook from the MSDN library yet I get the error whereas that app does not. Such simple things can stop a programmer for hours.
Here is the code I am using. Note that the Web Service this code...
My two cents worth.
I started in IT in the early nineties and have seen a growing trend of females in the business. I went MTI Business College to get my degree and half the class was female. Note that I took a specific courses for Computer Programming. Namely they taught us Visual Basic 6, C...
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.