No, the table name is just showed differently in those two places. In SQL Server 2000, properties shows the literal value of the column name, whereas design table shows an escaped version of it.
You can use one enclosing set of square brackets and each ] that is not part of the enclosing set of square brackets needs to be escaped with a second ].
i.e.
SELECT [[Items]].[ItemID]]] FROM MyTable
Once an identity value has been used it will not be reused again, so deletions can mean that the numbers in identity columns are not contiguous.
If there was an insertion and then the transaction was rolled back the side effects of the insert trigger which are not logged database actions (such...
Here is an example solution to this type of problem I have made using the Northwind database, you can add additional selection criteria to the subquery as needed:
use Northwind
select a.*
FROM
(select TOP 10 PERCENT * from orders) as a
JOIN orders b
ON b.CustomerID = a.CustomerID
ORDER BY...
Try using this code. It will work on a table called MyTable with an identity field called id. It should log the id value along with new values for the columns that have been affected by the update statement that fired the trigger. I had to create a temporary table to duplicate the inserted table...
You can make multiple linked server definitions for the same db instance, with different connection information. Then you can just use different linked server names to connect with different logins.
Just a bit of a clarification (I've been away from a computer for a few days and this has been bugging me).
In the case above the IF EXISTS check is probably not neccesary, however the insert trigger fires once for every insert statement that is executed and it is possible that the inserted...
To find all databases in an instance of SQL Server that have the simple recovery model use:
SELECT name
FROM sysdatabases
WHERE DATABASEPROPERTYEX(name, 'RECOVERY') = 'SIMPLE'
The problem is that you are using a variable that can only hold a single value. SET @Value = (SELECT REC_PartNo from inserted) will set @Value to the last REC_PartNo retrieved by the SELECT statement. Try something like this:
CREATE TRIGGER tr_recipe_insert
ON RecipeTable
FOR INSERT
AS
IF...
OK, I think I understand what you are trying to do now.
I think you want to include the contents of the view and the table in one resultset and the QtyAlloc and Total_Pcs_Needed totals are used in the same way.
If this is true, rather than doing a FULL OUTER JOIN and adding a whole lot of...
The deleted table stores copies of the affected rows during DELETE and UPDATE statements.
The inserted table stores copies of the affected rows during INSERT and UPDATE statements.
The deleted table is not used during inserts.
Try checking the deleted table in your delete and update triggers...
Aside from the REFNM field the two sets of results differ when Grand_Tot_Pcs is NULL. When you add a non-null integral value to NULL, you will get NULL, so maybe ISNULL should be applied to the result of the addition instead of SUM(CAWB.Total_Pcs_Needed):
ISNULL(SUM(CAWB.Total_Pcs_Needed) +...
Have a look at http://www.sqlteam.com/item.asp?ItemID=3856
It shows 3 different approaches to this class of problem and the performance of each approach with test data.
Try these styles with your own db and see which works best for you. In their case they found that cursor solution was the...
Use two consecutive ' (single quote) characters inside a string (which is itself delimited with single quotes) to denote a literal ' character.
For example:
use pubs
select au_lname from authors where au_lname like '%''%'
au_lname...
AFAIK you can't mix assignment with data retrieval in the one select statement.
How about iterating over the result set of the select with a cursor, and performing a string concatenation and a row insertion each time around the loop?
Sam
Hi all.
Does anyone know an <<easy>> way to check that at a given point in time, object references in a stored procedure can be resolved and are accessible without actually executing the stored procedure?
Sam
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.