Viewing 15 posts - 361 through 375 (of 430 total)
If the process can be changed add another column(ShowInReport BIT) and during the inserts update that column whether to display or not.
Only other option I can think is go with a...
Regards,
gova
June 14, 2005 at 1:37 pm
SET NOCOUNT ON
DECLARE @theatre TABLE
(
[ID] INT IDENTITY,
LastName VARCHAR(25),
FirstName VARCHAR(25)
)
INSERT INTO @theatre (LastName, FirstName) VALUES ('L1111', 'F1111')
INSERT INTO @theatre (LastName, FirstName) VALUES ('L2222', 'F2222')
INSERT INTO @theatre (LastName, FirstName) VALUES ('L3333', 'F3333')
INSERT INTO @theatre...
Regards,
gova
June 14, 2005 at 1:32 pm
Yes I would love to do that. ![]()
I made the query little better.
select TOP 1 myVersion, max(mydate)
from (
select myVersion, max(lastdatea) 'mydate'
from @MyTable group...
Regards,
gova
June 14, 2005 at 1:10 pm
Remi has given the answer for random sampling it is close to the requirement.
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=187471#bm187503
Regards,
gova
June 14, 2005 at 11:28 am
Thanks Mike.
We have a table with versions and updates from various sources. Each source will update the version and their date. Example if Source A updates the version it will...
Regards,
gova
June 14, 2005 at 10:47 am
I modified Steeve's query and got the result. Is there any better way to do it
Added - I am not sure this gives the correct value all the times
select myVersion,...
Regards,
gova
June 14, 2005 at 10:36 am
I need the myVersion in the table which is for the lates of all 9 dates.
like this case lates date is 04/09/2004
So I need VERSION C as result
Regards,
gova
June 14, 2005 at 10:21 am
Thanks Steve. That is simple.
But how do I get my Version for that date.
Regards,
gova
June 14, 2005 at 10:10 am
Thanks Remi. Why did't I try that.
I have 5 parameters in my original function and have to pass 5 defaults. I like the the way how it works with Stored...
Regards,
gova
June 13, 2005 at 9:18 am
Thanks Mike If that is the case with my example in post
SELECT * FROM Fn_myDate(NULL)
SELECT * FROM Fn_myDate('01/01/1982')
Both calls should give same results. But it is not. Can you...
Regards,
gova
June 13, 2005 at 9:00 am
/* This how I call a stored procedure with default parameter any help with function is greatly appreciated */
CREATE PROCEDURE TEST
(@pmyDate DATETIME = NULL)
AS
SELECT ISNULL(@pmyDate, GETDATE()) myDate
GO
EXEC...
Regards,
gova
June 13, 2005 at 8:55 am
Thanks Paul. I am taking your first part.
I don't go for dynamic #of cols since the report generated has many other columns and some other complex logic. The specifications are...
Regards,
gova
June 10, 2005 at 8:10 am
SET NOCOUNT ON
DECLARE @CTR INT
SET @CTR = 100
WHILE @CTR < 115
BEGIN
SELECT @CTR Val, CONVERT(VARCHAR, GETDATE(), @CTR) DteFormat
SET @CTR = @CTR + 1
END
Regards,
gova
June 9, 2005 at 2:23 pm
Cool. I will use it. Thank You.
Atleaset that is not my case Remi. I am happy with Ron's query.
We can continue for dynamic # of weeks for interest.
Regards,
gova
June 9, 2005 at 12:13 pm
Nope. Not at all. I want resultset like this.
Version Week3 Week2 Week1 Currnt
----------------------- -------- -------- --------- ------
AA 42 212 2 231
AC 0 0 0 32
AG 0 0 52 372
AV 0 0 0 564
AF 2 0 72 0
AR ...
Regards,
gova
June 9, 2005 at 11:20 am
Viewing 15 posts - 361 through 375 (of 430 total)