Viewing 15 posts - 721 through 735 (of 3,543 total)
Sean Lange (5/9/2014)
scotsditch (5/8/2014)
I want to create a computed Column in a...
May 9, 2014 at 7:38 am
Or just a Conditional Split with several nested REPLACE to replace 0-9 with empty string and test the result for empty string
May 9, 2014 at 5:08 am
If you mean
If IVA then negative TotalFinal
If DEL then Zero
Otherwise TotalFinal
then use Switch like this
=Switch(Fields!Estado.Value = "IVA", -CDbl(Fields!TotalFinal.Value), Fields!Estado.Value = "DEL", CDbl(0), True, CDbl(Fields!TotalFinal.Value))
May 9, 2014 at 4:20 am
What does tblid represent?
How many previous settings rows are there for a tblid?
How do you want the output to look like (Why PIVOT?)
Please supply table DDL, sample data and expected...
May 9, 2014 at 2:59 am
ALTER TABLE [tablename] ADD [columnname] AS CAST('Y' as char(1))
May 9, 2014 at 1:43 am
Or you could use @Customer in a filter on the dataset
*Edited*
Why are you inserting the results into a temp table?
Use the procedure for the data set and filter by @Customer
May 8, 2014 at 11:22 am
masarzdenka (5/8/2014)
This one gives me an error:=Sum(IIf(Fields!Wait_Status.Value="Within Target",Fields!Surgical_Case_Count.Value,0))
I think I've tried it before.
That is an SSRS expression not T-SQL
What error are you getting?
If it is in SSRS then the only...
May 8, 2014 at 9:52 am
SELECT a.Id,a.Manifest_Id,a.Doc_Num,a.Doc_Type,a.Compart_Id,
b.Compart_Product_Id,b.Compart_Quantity
FROM #InvLogData a
JOIN #InvLogData b ON b.Manifest_Id = a.Manifest_Id
AND b.Doc_Num = a.Doc_Num
AND b.Doc_Type = 'A'
AND a.Compart_Id = b.Compart_Id
WHERE a.Doc_Type IN ('S','E')
May 8, 2014 at 8:40 am
Try
=Sum(IIf(Fields!Wait_Status.Value="Within Target",Fields!Surgical_Case_Count.Value,0))
May 8, 2014 at 7:13 am
Using
=IIF(Fields!col3.Value = "DEL",-CDec(Fields!col2.Value),CDec(Fields!col2.Value))
Will change
col1 col2 col3
test1 10 OK
test1 66 DEL
test2 5 OK
to
col1 col2 col3
test1 10 OK
test1 -66 DEL
test2 5 OK
You introduced SUM Why?
May 8, 2014 at 3:03 am
If the report has multi valued parameters (and there are not too many of them) then you can pass the comma separated values to the procedure and use Jeff Moden's...
May 8, 2014 at 2:45 am
This is similar to another post so I post the same solution here
;WITH cte (patnt_no,patnt_refno,admit_date,discharge_date,min_discharge_date) AS (
SELECT patnt_no,patnt_refno,admit_date,discharge_date,
MIN(discharge_date) OVER (PARTITION BY patnt_no)
FROM patient_table)
SELECT patnt_no,patnt_refno,admit_date,discharge_date
FROM cte
WHERE discharge_date <= DATEADD(month,+6,min_discharge_date)
May 8, 2014 at 1:54 am
Sorry that does not make sense to me
How did you get from
col1 col2 col3
test1 10 OK
test1 60 DEL
test2 5 OK
to this
col1 col2 col3
test1 10 OK
test1 2 DEL
test2...
May 7, 2014 at 11:27 am
amadeu_j (5/7/2014)
There is the solution?
Not sure what you mean.
If your table contained
col1 col2 col3
test1 10 OK
test1 6 DEL
test2 5 OK
what result do you want?
May 7, 2014 at 10:37 am
Viewing 15 posts - 721 through 735 (of 3,543 total)