Forum Replies Created

Viewing 15 posts - 106 through 120 (of 402 total)

  • RE: Search yesterdays date:

    Hi

    Add another parameter something like @DisplayYesterday

    then in your dataset:

    IF @DisplayYesterday = 1

    SELECT UserId, Class, SumInvoiceValue, SumCostPrice, Margin, Invoice_Date

    FROM View_telesales

    WHERE (Invoice_Date > = DATEADD(day, DATEDIFF(day, 0, GETDATE()), 0) AND Invoice_Date <=...

  • RE: create YTD in a Table

    Lynn Pettis (9/5/2012)


    Andy Hyslop (9/5/2012)


    CELKO (9/5/2012)


    I want to obtain an YTD value for every year and on the same row I have to put the ytd value of previous year...

  • RE: create YTD in a Table

    CELKO (9/5/2012)


    I want to obtain an YTD value for every year and on the same row I have to put the ytd value of previous year .

    Your DDL is not...

  • RE: Extracting From Oracle View Returns NULL for VARCHAR2 (4000) Columns

    No-one at all got any ideas on this? :blink:

  • RE: Need help with SQL Query

    Do you mean something like this:

    SELECT

    CASE

    WHEN DATEDIFF('m', firstseen, getdate()) = 0 then 'AUG'

    WHEN DATEDIFF('m', firstseen, getdate()) = 1 then 'JULY'

    WHEN DATEDIFF('m', firstseen, getdate()) = 2 then 'JUN'

    WHEN DATEDIFF('m', firstseen,...

  • RE: Query in Having Clause

    I don't fully understand what you mean, but I think you want something like this, more info would be good (a stab in the dark!)

    SELECT Lnno FROM Temp_Check

    WHERE det_trantype =...

  • RE: ssis null valus

    All swings and roundabouts but there is always the COALESCE function...

  • RE: Change values of date pickers from drop down

    Ahh sorry I forgot that SSRS parameter would not allow the edit.

    There is one option I can think off but I don't think your going to like it (maybe someone...

  • RE: Nested Select

    Probably better ways of doing, sure someone will improve on this!

    WITH MED

    AS

    (

    SELECT

    *

    ,LEFT(obsv_cd,7) Med

    FROM

    #JeffTest

    WHERE

    obsv_cd_name <> 'Status'

    AND RIGHT(obsv_cd,4) = 'Name'

    )

    ,

    STAT

    AS

    (

    SELECT

    *

    ,LEFT(obsv_cd,7) Med

    FROM

    #JeffTest

    WHERE

    obsv_cd_name = 'Status'

    AND RIGHT(obsv_cd,6) = 'Status'

    )

    SELECT

    M.obsv_cd

    ,M.dsply_val AS 'MedName'

    ,S.dsply_val...

  • RE: Nested Select

    Hi

    Do you mean something like this:

    WITH MED

    AS

    (

    SELECT

    *

    ,LEFT(obsv_cd,7) Med

    FROM

    #JeffTest

    WHERE

    obsv_cd_name <> 'Status'

    )

    ,

    STAT

    AS

    (

    SELECT

    *

    ,LEFT(obsv_cd,7) Med

    FROM

    #JeffTest

    WHERE

    obsv_cd_name = 'Status'

    )

    SELECT

    M.obsv_cd

    ,M.dsply_val AS 'MedName'

    ,S.dsply_val AS 'MedStatus'

    FROM MED AS M

    INNER JOIN STAT AS...

  • RE: ssrs null values

    If you are using a SQL statement as your dataset wrap the column(s) in an ISNULL() or a COALESCE()

  • RE: Change values of date pickers from drop down

    Yep thats possible

    Use the above and pass your first parameter (yesterday, last week ect) into your @StartDate and @EndDate param's (the ones you will use in your dataset)

    Users will be...

  • RE: Change values of date pickers from drop down

    Hi

    Assuming your parameters are derived from queries you can use cascading parameters.

    Create your first Param for Yesterday, last week ect and pass the results from this SQL into your...

  • RE: Cast and count in a single statement

    May be misunderstanding as you've not given much to work with.

    Do you mean you want to display the SELECT results in one string?

    SELECT ServerName + ' ' + dbname ...

  • RE: SQL Dimensions & Fact Tables

    There is no requirement to record history, basically a UPSERT/MERGE (upload record if exist, insert if it does not).

    OK so in this case you actually don't need surrogate keys, since...

Viewing 15 posts - 106 through 120 (of 402 total)