I'm sorry about that. Here it is again.
ALTER procedure [dbo].[GetDDSInfo]--'s0b'
@doc varchar (3)
as
DECLARE @ddsgroup varchar(3)
--set ddsgroup gets ddsgroup from natdocfile2
SELECT @ddsgroup = DDSGroup FROM NatDocFile2 where doc = @doc
if @doc = @ddsgroup
Begin
WITH Base AS (
SELECT...
Thank you this does make sense. I revised it and now getting results from both queries.
ALTER procedure [dbo].[GetDDSInfo]--'s0b'
@doc varchar (3)
as
DECLARE @ddsgroup varchar(3)
--set ddsgroup gets ddsgroup from natdocfile2
SELECT @ddsgroup = DDSGroup FROM NatDocFile2 where doc = @doc
if...
What am I doing wrong?
I tried this and now it is giving me one result but just the top one. The else statement is not picking it up.
ALTER procedure [dbo].[TestDDS]--'s0b'
@doc varchar(3)
as
DECLARE @ddsgroup varchar(3)
SELECT @ddsgroup = DDSGroup FROM NatDocFile2 where doc = @doc
if...
Could you please explain what row_number and ranked are doing in the query?
;WITH Base AS (
SELECT p.DOC,
p.Reg,
p.FO,
p.CLMS,
--getting age of case when it was filed
DATEDIFF(DAY, MAX(p.filedate), GETDATE()) AS Age,
MAX(FileDate) AS FileDate...
Markros you were right someone helped me with this and used row_number.
;WITH Base AS (
SELECT p.DOC,
p.Reg,
p.FO,
p.CLMS,
--getting age of case when it was filed
DATEDIFF(DAY, MAX(p.filedate), GETDATE()) AS Age,
MAX(FileDate) AS FileDate...
Take a look at clms - 125987
I would like for only one record to show (out of the two of 125987). The one I want is the filedate of 05/06/2011.
I tried min(clms) = max(clms) and min(FO) <> max(FO) and min(Filedate) <> max(filedate) and Title <> title then 'concurr' else title end
This...
Actually that gave me the same results.
My problem is I have two clms that have the same number but the FO, Filedate and Title are different. So how could I add to the statement below to say if clms is the same and FO, Fieldate and Title are different take the min(filedate) (which would only...
I don't know why I'm receiving different counts:
This query gives me a count of 16 records that are over 300
Select p.doc,
COUNT(distinct CASE WHEN Datediff(DAY, filedate, Getdate()) > 250 THEN clms END) AS [250],
COUNT(distinct CASE WHEN Datediff(DAY, filedate, Getdate()) > 300 THEN...
How can I add this to the case statement of the query or just to the query to check...
If fileddate <> filedate then use the min filedate and place in the title field the word 'concurr' for the one record.
I have this query doing it already but it does it for filedates matching.
Select...
Here's some table information
This query:
SELECT
doc,
COUNT(*) AS cnt
FROM
(
Select
doc
FROM testpend p
Group By
doc, clms ) AS T
GROUP BY
doc
Produces this:
doc cnt
S0L 3
S11 2
S23 2
This query:
select...
Okay yes I see the difference. I will keep this just in case they come back and want this veiw. Thanks again!
Have another problem...
When you select a botton how do I show the claims for the botton they selected. This query shows 250. Do I add a parameter to show 300 cases, 350 cases...
Mark, this one worked better for me. Thanks so much.
Can you please explain what it's doing:
select doc, [250]=SUM([250]), [300]=SUM([300]), [350]=SUM([350]), [400]=SUM([400])
from
(
SELECT
doc,
[250] = case when [Days] between 250 and 299 then cnt else 0 end...
No because I need one set of result at a time. So if you click on the 300 button I only want those cases that are over 300 days old and younder than 350 days old.
Thanks Mark this works well!
Now how would I grab all the 300 cases? Would I need a parameter? I have buttons called 300, 350 and 400 so when a user clicks on them I want them to change to display the info.
They are the same all of the time. I have radio buttons on the page so when I click on 300 I want the gridview to fill with the pending items that are between 300 - 350.
The way this stored procdure is set up it produces this:
doc cnt
S09 1
S09 2
S09 9
S09 51
S0B 1
S0B 4
S0B 16
S0B 57
How do I change it to give me results as this?
Doc 250 300 350 400
S09 1 2 9 51
S0B 1 4...
My export to excel works fine but now I'm trying to remove the hyperlink when it exports to excel. Here's the info:
Protected Sub BtnExportExcel_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click
Response.Clear()
Response.Buffer = True...
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.