Viewing 15 posts - 286 through 300 (of 1,219 total)
Using the query editor is the correct way to do it. The view/query designer in SSMS is fairly useless. There are a lot of SQL constructs it does not support...
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
June 7, 2019 at 6:16 am
If you want to ask a question which is related to an error message you get, you should always include that error message.
It would also have helped if you and...
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
June 5, 2019 at 5:57 pm
Duplicate post. See https://www.sqlservercentral.com/forums/topic/rows-and-column-wise-total-in-sql-pivot-table for answer.
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
May 31, 2019 at 3:48 pm
Here is a query for you. Note that I don't use the PIVOT operator, but instead uses SUM(CASE for the pivoting. This is somewhat more verbose, but also a lot...
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
May 31, 2019 at 3:47 pm
I think the reason I and others assumed that you UDF made data access and a trigger therefore would be better is that your initial post talked about two tables....
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
May 29, 2019 at 7:00 pm
That's not a valid XML document. Not even a valid fragment. Please post something that can stored in a variable of the xml data type.
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
May 28, 2019 at 9:34 pm
Don't you have to specify the quotes as "?
It could help if you could include a sample XML document
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
May 28, 2019 at 9:25 pm
A computed column with a scalar UDF that performs data access? That's an absolute no-no in my book. Scalar UDFs are not inlined(*), and the the optimizer does not know...
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
May 28, 2019 at 8:13 pm
It's not clear what you are asking for. The result set you post, suggests that you want to blank out tot_ship for rows but one. This can be done in...
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
May 28, 2019 at 7:47 pm
Huh? There is no such limit. If you are only able to save images > 2MB ins size, you are doing something wrong.
How are you saving the images? Plain INSERT?...
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
May 26, 2019 at 9:43 pm
The problem with EXECUTE AS OWNER is that the code runs with full powers of dbo, so if there is an SQL injection hole the possibilities for exploit is bigger....
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
May 24, 2019 at 8:17 am
The root cause is that you want the table and column names to be dynamic. In a relational database a table is supposed to model a unique entity and a...
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
May 23, 2019 at 9:14 am
It is always difficult to say without seeing the code and not knowing the system. But if you only pass a key around and read data in every procedure this...
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
May 22, 2019 at 11:25 am
The solution is simple. Don't shrink. There is no point in shrinking if you are going to fill up the space again. Also, shrinking the data files introduces a ton...
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
May 16, 2019 at 1:19 pm
Two solutions. The first is somewhat obscure when you see it the first time, but works on all versions from SQL 2005 and up. The latter is more straightforward, but...
[font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]
May 10, 2019 at 3:06 pm
Viewing 15 posts - 286 through 300 (of 1,219 total)