Forum Replies Created

Viewing 15 posts - 4,156 through 4,170 (of 5,111 total)

  • RE: Disable and enable foreign key constraints

    I actually wonder why you would want to delete it in the first place anyway. If it's a foreign key, then those other tables are relying on it for referential...

  • RE: Evaluating a Text Expression based on Values from another table

    Could you perhaps provide the data in a consumable SQL format? Many of us are unable/not allowed to download untrusted Excel files, as we use the forums while at work.

  • RE: Rename File in SSIS

    mayurpatel.ce - Wednesday, March 1, 2017 3:22 PM

    SSIS\SSRS\SSAS - Thursday, August 28, 2008 4:34 PM

  • RE: Eliminating Weekend Dates in an expression

    Personally, I'd use a calendar table (Bones of SQL - The Calendar Table) and calculate from that..

    Then, using a Function, you could do something like this...

  • RE: RDP into SQL server BAD or not

    I rarely RDP to the server either. The only times I do is, like Lynn said, when it's something I'd want to be at the physical server for anyway. Last...

  • RE: Nearest date

    No sample,or DDL, so untested, and no expected result set, but maybe...:
    SELECT cr.ReferralId, o.CustomerID, o.OrderID
    FROM orders o
        CROSS APPLY (SELECT TOP 1 *
       ...

  • RE: Using a WHERE clause as a parameter

    John Mitchell-245523 - Wednesday, March 1, 2017 8:35 AM

    I know this has already been rejected, but I thought I'd comment anyway....

  • RE: Using a WHERE clause as a parameter

    Personally, I would go with a Stored Procedure and parametrise it. One, problem, however, is that you do have several options, and ideally, you want to use an IF statement...

  • RE: TRIGGERS ON VIEWS

    You can set up something yes, but how depends. If, for example, you use a Stored procedure, you'd need to look for records that have been added. How do you...

  • RE: TRIGGERS ON VIEWS

    You don't "delete" from views. Views are simply a predefined SELECT statement. If you need something deleted that is displayed in a view, you have to delete it from the...

  • RE: Show 1st day of previous month.

    Hadn't noticed this was SSRS (after seeing the first answer). An SSRS expression would be:
    =DATEADD("M", DATEDIFF("M", "01/01/2000", DATEADD("d", -1, TODAY())), "01/01/2000")
    Effectively, like John said, the same, but SSRS...

  • RE: Show 1st day of previous month.

    Henrico Bekker - Tuesday, February 28, 2017 7:54 AM

    SELECT DATEADD(month, DATEDIFF(month, 0, getdate()), 0) AS StartOfMonth

    Is this what you require?

    That...

  • RE: Filter based on a condition

    If you have two expressions, maybe combine the two into a filter and a BOOLEAN result? In simple terms, effectively:
    =IIF(([SUM EXPRESSION 1] = 0) AND ([SUM Expression 2] =...

  • RE: T-SQL - Testing for specific versions of SQL Server

    The reason it doesn't pick it up as an issue is that currently, that format is still permitted. In SQL 2016, 'string_alias' = expression will be accepted, however, it will...

  • RE: SSRS Pie chart

    Just declare a static value column?
    SELECT [YourField] AS Broken, 2000 AS AllCars
    FROM [YourTable];

Viewing 15 posts - 4,156 through 4,170 (of 5,111 total)