Viewing 15 posts - 10,351 through 10,365 (of 13,461 total)
i would still strongly recommend using a view instead of triggers: it will never be wrong.
CREATE VIEW VW_REP
AS
SELECT
Rep.*,MyAlias.CustomerCount
From Rep
Left Outer Join (Select Count(CustomerNum)AS CustomerCount, RepNum From Customer Group...
November 3, 2009 at 7:43 pm
Thanks Bru; i posted my example before the schema got posted, and i edited my examples to use RepNum
November 3, 2009 at 7:25 pm
two things..first, your trigger model is for ORACLE/PLSQL..SQL Server is slightly different.
second it just a logical solution...instead of updating a static table because of an INSERT, you could just replace...
November 3, 2009 at 6:31 pm
george.greiner (11/3/2009)
Yes it does. What is the purpose of having a table with 10000 integers in it?
a Tally/Numbers table lets you leverage the way SQL server uses Set Based...
November 3, 2009 at 12:53 pm
here's one way to do it, i'm sure you'll get other examples to choose from:
select CONVERT(varchar,datepart(hour,getdate()) % 12 ) + ' ' + CASE WHEN datepart(hour,getdate()) > =12 THEN 'PM'...
November 3, 2009 at 12:43 pm
with att for example, i send a plaintext email my attphone: the address is your 10-digit number@txt.att.net.
ie email 9545551212@txt.att.net
November 3, 2009 at 10:51 am
Gail's "it depends" answer is spot on...it depends on how your data gets accessed; indexes help find the data faster.
ok 10 million records, but which columns are actually used for...
November 3, 2009 at 9:07 am
einman33 (11/3/2009)
November 3, 2009 at 8:19 am
Jeff Moden (11/3/2009)
This is about the 3rd time this question has been asked in as many days... why do you need to know this?
homework questions, you think? trying to make...
November 3, 2009 at 6:18 am
lol no, MS does not issue any default system triggers, that's for sure...also you can kind of tell by the name:'DDLTriggerTest'
definitely some trying out some code.
November 2, 2009 at 9:28 am
Feebie (11/2/2009)
when u tried to modify the procedure then it gives me error like this...
Procedure tr_ProcedureEvents, Line 6
Invalid object name 'DDLTriggerTest..EventTableData'.
please let me know what causes this...
November 2, 2009 at 8:37 am
the answer is yes and no.
once I have a username and password, I'm good to connect with anything i can get my grubby fingers on...SSMS, a program i write, Access,Excel,...
November 2, 2009 at 8:28 am
without more details, all i can offer is an example:
in this case, I've wrapped the counting sql with another query to get me the isnull of the count.
SELECT ISNULL(CNT,0) As...
November 2, 2009 at 8:00 am
ahh, that's the difference between a variable and an array of values:
SQL will not auto convert a string(@var) into an array of values...you have to explicitly do it.
select name...
November 1, 2009 at 5:07 am
simple i think:
ad a preceeding and ending single quote, and replace every comma with singlequote-comma-singlequote
that will work weather there is one value or lots of values.
SELECT '''' + REPLACE(YourColumn,',',''',''') +...
October 31, 2009 at 7:22 pm
Viewing 15 posts - 10,351 through 10,365 (of 13,461 total)