Not sure on a view (how to pass the view the date in question) but this procedure should do what you want.
Create Procedure GetStatus
@StatusDate smalldatetime
As
Select b.Contract, b.Status
From TestStatus b Join
(Select Contract, max(Date) as MaxDate
from TestStatus
Where Date <=...
This did work. But even if I pick a different value than the 15.46, say 15.25, and populate every record with this value, I don't get the error. Seems like something directly related to the 15.46 value. Seems very strange.
Create Table Test3(
Code varchar(10),
Amt money )
go
set nocount...
I'm getting a domain error when using the STDEV function.
Seems to be keyed to specific numbers.
Here is an example of the data being used:
Create Table Test(
Code varchar(10),
Amt money )
go
set nocount on
declare @x int
set @x = 1
while @x < 10
begin
Insert into Test values...
Can't get this to work:
...
ORDER BY CASE v_OrderBy
WHEN 'Col1' THEN 1
WHEN 'Col2' THEN 2
ELSE 3
END DESC
Just seems to ignore the ORDER BY altogether.
Try Oracle's Migration Workbench. This works for most of the conversion. Temp tables are a problem. Big time saver, though, over re-coding the whole procedure.
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.