Viewing 15 posts - 91 through 105 (of 160 total)
Hi,
I have tried this one already.
It showed the first value I put in and then it shows the table where I know the value exists, but I need to know...
December 19, 2014 at 2:17 am
Don't worry I have the answer.
Use Round:
SELECT ROUND('10.456',2,1)
This will return 10.45
September 19, 2014 at 7:03 am
Well thank you guys for all your help. I have learned a lot and I couldn't have done it with out you guys.
September 3, 2014 at 7:22 am
So it will look something like this then?
DELETE pat FROM PAT_ACCOUNT_MANAGER pat
JOIN
INSERTED I ON I.PAT_account_manager_ID = pat.PAT_ACCOUNT_MANAGER_ID
WHERE pat.NAME_ID = i.NAME_ID
AND pat.ROLE_TYPE_ID = i.ROLE_TYPE_ID
AND pat.LOGIN_ID <> i.LOGIN_ID
September 3, 2014 at 6:52 am
How would I have to change it to handle multiple records then?
September 3, 2014 at 6:33 am
DECLARE @NameID int, @RoleID int, @LoginID char(20)
SET @NameID = (
SELECT
NAME_ID
FROM
inserted
)
SET @RoleID = (
SELECT
NAME_FIELD_NUMBER
FROM
inserted
)
SET @LoginID = (
...
September 3, 2014 at 4:41 am
Just a quick scan, you have an update table, which is the same table I am deleting and inserting to, I cant update because there are no unique identifiers. But...
September 3, 2014 at 4:26 am
That's why in this case I cant do set base, because I need to use data from other tables as well, not just the inserted data. Well thanks for all...
September 2, 2014 at 7:46 am
Sorry:blush: So then I assume that the inserted table does how all the records of you insert a batch?
September 2, 2014 at 7:20 am
Just a quick question. In the inserted/deleted tables, does it contain all of the records of the last single transaction made? And if I use set based logic, how...
September 2, 2014 at 7:08 am
In this specific situation your will never be able to add more than one, because this trigger is just for two people on a single client, one is a supervisor...
September 2, 2014 at 6:50 am
Im not using that @PAMID variable anymore..just forgot to take it out before I posted the code. This trigger will fire for every insert. Is it possible for two or...
September 2, 2014 at 6:08 am
Here is my finished code. I have more than one trigger do get the job done, but it is working now. To determine the appropriate value, is just by using...
September 2, 2014 at 4:18 am
Here is my finished code. I have more than one trigger do get the job done, but it is working now. To determine the appropriate value, is just by using...
September 2, 2014 at 4:18 am
When I take the last delete away, the trigger works perfectly. It adds everything it has to. I would just like it to delete the records from the last table...
September 1, 2014 at 6:05 am
Viewing 15 posts - 91 through 105 (of 160 total)