Forum Replies Created

Viewing 15 posts - 721 through 735 (of 3,543 total)

  • RE: Computed Column Equal to Letter

    Sean Lange (5/9/2014)


    scotsditch (5/8/2014)


    I'm trying to do something so simple, it's driving me nuts. Especially since I remember doing it before.

    I want to create a computed Column in a...

  • RE: avoid special symobles in ssis

    Or just a Conditional Split with several nested REPLACE to replace 0-9 with empty string and test the result for empty string

  • RE: Table two Column

    You're welcome 🙂

  • RE: Table two Column

    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))

  • RE: Could this be done using PIVOT ?

    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...

  • RE: Computed Column Equal to Letter

    ALTER TABLE [tablename] ADD [columnname] AS CAST('Y' as char(1))

  • RE: ssrs 2008 r2 execute with temp table

    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

  • RE: Sum function where field =

    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...

  • RE: Data Grouping on 2 levels but only returning conditional data

    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')

  • RE: Sum function where field =

    Try

    =Sum(IIf(Fields!Wait_Status.Value="Within Target",Fields!Surgical_Case_Count.Value,0))

  • RE: Table two Column

    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?

  • RE: ssrs pass multivalue parameter values to stored procedure

    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...

  • RE: Urgent help needed..PLZ HELP ME..

    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)

  • RE: Table two Column

    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...

  • RE: Table two Column

    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?

Viewing 15 posts - 721 through 735 (of 3,543 total)