Forum Replies Created

Viewing 15 posts - 136 through 150 (of 173 total)

  • RE: TRIGGER QUESTION

    Do you need to check for inserts also?

    create trigger trg_members_upd ON members

    AFTER INSERT

    AS

    declare @memberNbr int, @status1 int, @status2 int

    set @memberNbr = 0

    WHILE exists (select * from inserted where memberNbr >...

  • RE: Parse data for recurring value?

    Pretty sure i do not want to run this against mucho rows but...

    declare @values varchar(1000), @sIdx1 int

    set @sIdx1 = 0

    declare @myVal table (id int identity, rptr varchar(10))

    set @values =...

  • RE: Need a fresh approach to something quite simple

    This may do the trick

    SELECT convert(varchar(10), citrixfarm.SDB_SESSION.SESSIONSTART, 103),

    count(*) mycount

    FROM citrixfarm.SDB_SESSION

    INNER JOIN

    citrixfarm.LU_APPNAME

    ON

    citrixfarm.SDB_SESSION.FK_APPNAMEID = citrixfarm.LU_APPNAME.PK_APPNAMEID

    WHERE...

  • RE: Creating one row view or table

    This is a stab at it. But I'm sure I am missing a rule...

    create view v_yada

    as

    select personid, chd1.id, chd2.id

    from master

    left join

    (select personid, id from child where id = 1)...

  • RE: Sum value of 2 columns?

    select voterid, questiontest,

    case when tab1.answertext is not null then tab1.answertext when tab2.answertext is not null then tab2.answertext end as answertext

    from yada

  • RE: Creating one row view or table

    Are you trying to get a row for each person with all id's. Basically de-normalize and have a list personid, id1, id2, id3....?

    If so then you are talking

    child

    1. ...

  • RE: Query performance to linked server

    thanks, guess I was just confirming that my eyes were focused...

  • RE: Nested Query Problem

    If I am reading the specs correctly... no need for a derived table / sub query

    SELECT yada...

    FROM dbo.tbl_NSP_QuestionTree

    WHERE QuestionNoteTypeUID 6 OR

    (QuestionNoteTypeUID = 6 AND ParentUID QuestionTreeUID)

  • RE: trigger error

    For multiple inserts/updates

    CREATE trigger UpdateWinMasterDueList on dbo.[Manager_List]

    for INSERT, UPDATE

    as

    begin

    Update tblWinMasterDueList set mst.Manager= ist.Manager

    FROM tblWinMasterDueList mst INNER JOIN @Insert ist ON mst.jobCostCenter = ist.home_jobcost_nbr

    end

  • RE: trigger error

    #1

    I would look at the table defs for tblWinMasterDueList, possibly some of the fields are different lengths then similar fields on ManagerList.

    #2

    The trigger is not built for mulitple inserts.

  • RE: how to insert "time only" into a datetime field

    If you only want time then store the 11:00.

    It will store 1900/01/01 11:00 (or something similar). But always remember when using that field, the data is mis-leading unless...

  • RE: SQL Security 2005 - viewable tables from Access

    Informational:

    My desktop has both SQLExpress2005 & SQL2005 installed, new desktop, new job. When connecting I failed to connect-the-dots that it was my machinename/sqlexpress. I connected to SQL (versus...

  • RE: SQL Security 2005 - viewable tables from Access

    The default database is set to the correct database.

    The id used to go against the SQL2000 was sa. The ID for SQL2005 is domain/user.

    thanks, still looking...

  • RE: Search for string occurrence

    The MMC is the enterprise consule. Basically right click on the database and script to file. It should let you select all objects.

    The 2nd option appears to work...

  • RE: Search for string occurrence

    You can script all database objects into one file. Then simply search through the file for all objects. Works with the MMC plugin for 7/2000.

Viewing 15 posts - 136 through 150 (of 173 total)