Forum Replies Created

Viewing 15 posts - 8,071 through 8,085 (of 13,469 total)

  • RE: Flawed Trigger in SQL 2005

    blandry (2/23/2011)


    Lowell, there will NEVER be any deleted records, but I think I see what you are doing with your suggestion that way, eg, test for update that way, yes?

    I...

  • RE: Flawed Trigger in SQL 2005

    ok, you should be able to streamline your trigger, and configure it for multiple rows as well.

    see if this makes sence to you:

    ALTER TRIGGER [dbo].[Update2ndTable]

    ON [dbo].[Table1]

    AFTER INSERT, UPDATE

    AS

    --if there is...

  • RE: The Oddest Interview Questions

    mzettler (2/23/2011)


    SKYBVI (2/22/2011)


    3) What is the angle between the minute hand and the hour hand of a wall clock when the time is

    3:40

    with no...

  • RE: generating a string with values from database table

    you'd need a lot more details to get a more refined answer, but offhand, this might get you started:

    SELECT

    'http://tgl.test.com/plc/login/confirm.asp?'

    + 'c=' ...

  • RE: Multi threading in SQL Server 2005

    there's no need;

    SQL server is designed to work in sets; so the time it takes to apply a calculation against 1 row of data is about the same as 10K...

  • RE: Delete tables script

    this is a fairly common requirement.....delete lots of data, but not the look up tables kind of thing.

    the things to watch out for are the order of the deletes...you can't...

  • RE: Need To store true or False

    personally i use an integer with a check constraint limiting values to 0 and 1;you could use a BIT data type,but I like an integer to anticipate those situations where...

  • RE: SQL xp_cmdshell COPY inside of a loop.

    here's a cursor example that is based on what you posted:

    DECLARE @CustNo VARCHAR(MAX)

    DECLARE @SQLQUERY VARCHAR(MAX);

    SET @SQLQUERY = ''

    declare c1 cursor for

    select

    CustNo

    ...

  • RE: variable column count txt files to sql server table

    there are a number of posts by Jeff Moden to do this via BCP; he refer's to the issue as "ragged right";

    here's one example he posted to address the issue...it's...

  • RE: INVENTORY ONE TABLE CREATE HOW TO BALANCE QTY CARRY IN NEXT ROW

    consumable data for the next poster:

    With [MY DATE](ITEM_NAME , CODE , [DATE] , OB_QTY , RECD_QTY , ISSUE_QTY, BALANCE_QTY)

    AS

    (

    SELECT '5 PR CABLE','05','01/04/10','25','0','0','25' UNION ALL

    SELECT '5 PR CABLE','05','02/04/10','0','2','0','2' UNION ALL

    SELECT '5...

  • RE: Trigger help

    you might need to explicitly define the columns:

    INSERT INTO tblHistorySource(Column1,ColumnList,CreationDate)

    select Column1,ColumnList, getdate()

    from DELETED --the old values...new values are ijnt eht able if you need to compare them.

    also, completely remove this...

  • RE: database tables change suggestion(urgent help pleasee)

    wouldn't the new to SQL2008 Change Data Capture do what you need? plenty of articles on that, when i tested it it worked really nice.

  • RE: Capturing Index script programmatically

    The scripts for an index, like the scripts for a table, don't actually get saved/stored the way a procedure or function's body does;

    it goes straight into the metadata, so you...

  • RE: find top 50 values from 90% records of table.

    abhas (2/21/2011)


    Thank u Lowell

    But i need avarage upon time not on date.and time is in miliseconds.So i have to find largest 90% avarage from table.How can we do?

    Regards

    Abhas.

    details....

  • RE: Shuffling Data in sql 2005 table

    I've got a nice example where a replace all the Last Names of a table with one of the standard HTML colors;

    I use variations of this to munge data so...

Viewing 15 posts - 8,071 through 8,085 (of 13,469 total)