hi..
i'm still newbie in SSRS 2005..
i've a problem about it..lets say i have a data like that :
date_rent type_rent
1/1/2006 CAR
1/1/2006 LORRY
1/2/2006 BUS
......
......
......
......
11/2/2006 LORRY
1/3/2006 CAR
3/3/2006 CAR
4/3/2006 BUS
at my report has one input date parameter..if i input the date:
30/03/2006 and i want to find the last of date_rent which refer to
CAR...meaning the result is
3/3/2006...
or if i input the date : 1/2/2006
the result of last of date_rent which refer to CAR...is 1/1/2006
...can anybody help me'
thanks in advance...Try:
SELECT type_rent, MAX(date_rent)
FROM MyTable
WHERE date_rent <= @.InputDate
GROUP BY type_rent
HTH
--
Magendo_man
Freelance SQL Reporting Services developer
Stirling, Scotland
"imapeace" wrote:
> hi..
> i'm still newbie in SSRS 2005..
> i've a problem about it..lets say i have a data like that :
> date_rent type_rent
> 1/1/2006 CAR
> 1/1/2006 LORRY
> 1/2/2006 BUS
> ......
> ......
> ......
> ......
> 11/2/2006 LORRY
> 1/3/2006 CAR
> 3/3/2006 CAR
> 4/3/2006 BUS
> at my report has one input date parameter..if i input the date:
> 30/03/2006 and i want to find the last of date_rent which refer to
> CAR...meaning the result is
> 3/3/2006...
> or if i input the date : 1/2/2006
> the result of last of date_rent which refer to CAR...is 1/1/2006
> ...can anybody help me'
> thanks in advance...
>|||Thank you for ur response..
how about if i want to put it in expression'It is because my report
has one table and many functions...every field i used an expression
according to different condition...
-tq
magendo_man (donotspam) wrote:
> Try:
> SELECT type_rent, MAX(date_rent)
> FROM MyTable
> WHERE date_rent <= @.InputDate
> GROUP BY type_rent
> HTH
> --
> Magendo_man
> Freelance SQL Reporting Services developer
> Stirling, Scotland
>
> "imapeace" wrote:
> > hi..
> > i'm still newbie in SSRS 2005..
> > i've a problem about it..lets say i have a data like that :
> >
> > date_rent type_rent
> > 1/1/2006 CAR
> > 1/1/2006 LORRY
> > 1/2/2006 BUS
> > ......
> > ......
> > ......
> > ......
> > 11/2/2006 LORRY
> > 1/3/2006 CAR
> > 3/3/2006 CAR
> > 4/3/2006 BUS
> >
> > at my report has one input date parameter..if i input the date:
> > 30/03/2006 and i want to find the last of date_rent which refer to
> > CAR...meaning the result is
> > 3/3/2006...
> > or if i input the date : 1/2/2006
> > the result of last of date_rent which refer to CAR...is 1/1/2006
> >
> > ...can anybody help me'
> >
> > thanks in advance...
> >
> >|||You could set up a table in which you define detail grouping based on
Fields!type_rent.Value, and filtering Fields!date_rent.Value <=Parameters!InputDate.value. On the detail row you could then have two
textboxes:
1) =Fields!type_rent.Value
2) =Max(Fields!date_rent.Value)
HTH
--
Magendo_man
Freelance SQL Reporting Services developer
Stirling, Scotland
"imapeace" wrote:
> Thank you for ur response..
> how about if i want to put it in expression'It is because my report
> has one table and many functions...every field i used an expression
> according to different condition...
> -tq
> magendo_man (donotspam) wrote:
> > Try:
> >
> > SELECT type_rent, MAX(date_rent)
> > FROM MyTable
> > WHERE date_rent <= @.InputDate
> > GROUP BY type_rent
> >
> > HTH
> >
> > --
> >
> > Magendo_man
> >
> > Freelance SQL Reporting Services developer
> > Stirling, Scotland
> >
> >
> > "imapeace" wrote:
> >
> > > hi..
> > > i'm still newbie in SSRS 2005..
> > > i've a problem about it..lets say i have a data like that :
> > >
> > > date_rent type_rent
> > > 1/1/2006 CAR
> > > 1/1/2006 LORRY
> > > 1/2/2006 BUS
> > > ......
> > > ......
> > > ......
> > > ......
> > > 11/2/2006 LORRY
> > > 1/3/2006 CAR
> > > 3/3/2006 CAR
> > > 4/3/2006 BUS
> > >
> > > at my report has one input date parameter..if i input the date:
> > > 30/03/2006 and i want to find the last of date_rent which refer to
> > > CAR...meaning the result is
> > > 3/3/2006...
> > > or if i input the date : 1/2/2006
> > > the result of last of date_rent which refer to CAR...is 1/1/2006
> > >
> > > ...can anybody help me'
> > >
> > > thanks in advance...
> > >
> > >
>
Showing posts with label newbie. Show all posts
Showing posts with label newbie. Show all posts
Wednesday, March 7, 2012
find invalid views etc.
Hi,
Newbie as I am I cannot find the method to track down invalid objects in a MS SQLServer database.
Looking through documentation and looking at internet does not provide much help.
Please help
WilcoThe only method you find is the one you create using the Mark 1 mod 0 eyeball!!
For instance ... you create and sucessfully compile a sproc. Then you alter the schema of the table and drop a column. The proc knows nothing about the altered table until you try to execute it, at which time SQL Server will throw the error.
Newbie as I am I cannot find the method to track down invalid objects in a MS SQLServer database.
Looking through documentation and looking at internet does not provide much help.
Please help
WilcoThe only method you find is the one you create using the Mark 1 mod 0 eyeball!!
For instance ... you create and sucessfully compile a sproc. Then you alter the schema of the table and drop a column. The proc knows nothing about the altered table until you try to execute it, at which time SQL Server will throw the error.
Subscribe to:
Posts (Atom)