Forum Replies Created

Viewing 15 posts - 10,351 through 10,365 (of 13,461 total)

  • RE: Basic trigger help?

    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...

  • RE: Basic trigger help?

    Thanks Bru; i posted my example before the schema got posted, and i edited my examples to use RepNum

  • RE: Basic trigger help?

    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...

  • RE: How to convert some Access SQL into TSQL?

    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...

  • RE: Need to show HH and "AM" or "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'...

  • RE: SQL Pager alerts

    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

  • RE: qouestion about Index

    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...

  • RE: Autometic Kill

    einman33 (11/3/2009)


    Automatic kill can be a death sentence especially when the rollback kicks in. I would personally go a different route to figure out why this spid is...

  • RE: Finding Space occupied by a row

    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...

  • RE: Invalid object name 'DDLTriggerTest..EventTableData'.

    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.

  • RE: Invalid object name 'DDLTriggerTest..EventTableData'.

    Feebie (11/2/2009)


    hi,

    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...

  • RE: Access SQL Server via .NET acpplication and not by SSMS

    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,...

  • RE: When resultset of count is nothing

    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...

  • RE: how to put quotations to the field value

    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...

  • RE: how to put quotations to the field value

    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,',',''',''') +...

Viewing 15 posts - 10,351 through 10,365 (of 13,461 total)