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...
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...
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.
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...
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....
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.
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
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...
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...
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?...
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....
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...
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...
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...
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...
May 10, 2019 at 3:06 pm
Viewing 15 posts - 286 through 300 (of 1,219 total)