Viewing 15 posts - 4,156 through 4,170 (of 5,111 total)
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...
March 2, 2017 at 5:00 am
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.
March 2, 2017 at 3:33 am
March 2, 2017 at 3:05 am
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...
March 2, 2017 at 2:14 am
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...
March 1, 2017 at 10:00 am
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 *
...
March 1, 2017 at 9:29 am
March 1, 2017 at 8:58 am
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...
March 1, 2017 at 7:31 am
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...
March 1, 2017 at 2:28 am
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...
February 28, 2017 at 9:23 am
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...
February 28, 2017 at 8:33 am
Henrico Bekker - Tuesday, February 28, 2017 7:54 AMSELECT DATEADD(month, DATEDIFF(month, 0, getdate()), 0) AS StartOfMonth
Is this what you require?
That...
February 28, 2017 at 8:08 am
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] =...
February 28, 2017 at 6:08 am
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...
February 28, 2017 at 3:56 am
Just declare a static value column?SELECT [YourField] AS Broken, 2000 AS AllCars
FROM [YourTable];
February 28, 2017 at 3:40 am
Viewing 15 posts - 4,156 through 4,170 (of 5,111 total)