Viewing 15 posts - 46 through 60 (of 507 total)
I'm with Lowell on this one. The few times I've come across aggregates maintained by triggers, they were flaky and I replaced them with aggregate views, which performed well...
December 12, 2011 at 2:46 pm
breakwater,
Is there something you didn't get about using a UNION ALL query? I'd be happy to explain.
Your original post doesn't really have the full query and it's very difficult...
December 7, 2011 at 6:25 pm
It looks like you are trying to concatenate the 3rd column based on the first 2 columns. If so, here is an excellent article on concatenating columns (turning rows...
December 7, 2011 at 6:09 pm
For something like this you are probably better off doing 2 mutually exclusive queries and a UNION between them.
In the first one do something like:
-- OR the bits. This...
December 7, 2011 at 6:00 pm
Jason,
I can't make out from your posted query any sort of relationships between the 3 tables. The way you posted the queries, they look like a CROSS JOIN of...
December 7, 2011 at 5:43 pm
DucatiRider (12/7/2011)
December 7, 2011 at 12:27 pm
Bubs,
Your best bet in this is to create an actual calendar table. Search calendar table on the forum and you'll come up with some articles I wrote and some...
December 7, 2011 at 12:18 pm
Please post a script to create the table, some test data and the expected results. I can't figure out what you want based on what you posted.
Todd Fifield
December 7, 2011 at 11:55 am
Glad to help.
Todd Fifield
December 7, 2011 at 10:10 am
Jason,
Is there a business reason for this?
Todd Fifield
December 6, 2011 at 5:09 pm
Kyle,
The trigger as it stands won't do anything for an INSERT since the inserted table won't join to the deleted table. The IF UPDATE(STK_COSTPRICE) will always test true for...
December 6, 2011 at 12:49 pm
You will probably find that <> is just a little bit easier for others to understand since it is more common.
Todd Fifield
December 6, 2011 at 11:59 am
Ninja's_RGR'us (12/2/2011)
Ninja's_RGR'us (11/30/2011)
December 2, 2011 at 6:04 pm
Ninja's_RGR'us (11/30/2011)
Is it echo in here :Whistling:?
Remi,
What I meant was that WHERE NOT EXISTS () prevents an insert based on what's in the SELECT list already existing in the destination...
December 2, 2011 at 12:52 pm
Grant,
Feel free to promote that product any time. Like Gail, it's saved my bacon when everyone is breathing down my neck to fix some procedure that was basically unreadable...
December 2, 2011 at 12:00 pm
Viewing 15 posts - 46 through 60 (of 507 total)