Forum Replies Created

Viewing 15 posts - 12,211 through 12,225 (of 13,469 total)

  • RE: Adding same foreign key to two columns

    when i reformatted your sql for readability, it was missing a couple of commas.

    this works:

    CREATE TABLE BATCHES_LOTS (

    [BATCHNO] varchar (15),

    [TRANSFERID] int,

    CONSTRAINT PK_BATCHES_LOT PRIMARY KEY (BATCHNO,TRANSFERID ))

    CREATE...

  • RE: loading data from Oracle

    i googled for "oracle epoch date" and found a lot of stuff.

    one of the more obvious selectiosn was where they took the datatime as a double, and subtracted it from...

  • RE: Create trigger on update

    Andras's example of the trigger determining what changed is perfect...but you want to send the email outside of the trigger code, and not inside it.

    remember that a trigger needs to...

  • RE: CASE with SELECT * FROM TableName not possible?!

    the case statment is for a field, I think you thought you needed to identify the table and where for each case, and that's not true:

    this is syntactically correct:

    DECLARE @Ind...

  • RE: update archivedata base from active database

    here's how I do it as a scheduled job; i don't need instant updates via a trigger:

    --new records first

    INSERT INTO ARCHIVETABLE(list_of_Columns)

    SELECT list_of_Columns from ACTIVETABLE

    LEFT OUTER JOIN ARCHIVETABLE ON...

  • RE: Set Query governor in a logon trigger

    SET QUERY_GOVERNOR_COST_LIMIT sets the limit for all commands in a batch, not at a connection or user level. so the limit was invoked during the life of the trigger execution,...

  • RE: VB script for checking whether server is running or shutdown

    there's so many levels you can check, it depends on what you want to do.

    For example:

    --you can ping a server via a script to see if DNS works/server exists on...

  • RE: T-SQL Set NOCOUNT On and Off

    the SET NOCOUNT ON command is to affect all of the subsequent commands in the batch you are running....

    if you were to set it off at the end of a...

  • RE: Extract filename from fully qualified path

    yeah a double reverse will work here; i broke it into a couple of steps to make it a bit more obvious:

    declare @filename varchar(1000)

    set @filename = 'C:\Program Files\Microsoft SQL Server\MSSQL\BACKUP\MyFile.txt'

    select...

  • RE: Calculating stored bytes of data in a varbinary(MAX) field

    damn that is interesting...my first instinct was that the len() function would work on a varchar(max), but it just returns 8000 if it is too big: I'll look some more.....

    create...

  • RE: Help with delete procedure

    Rama (11/14/2007)


    Hi,

    I have a delete procedure that has to check a dependent table (t2) for records before deleting from the main table (t1). If there is records the procedure has...

  • RE: sql server replicatoin requires actual server name to make a connection to the server

    if your other SQL server has a dynamic IP, and you need a real hostname for it, look at the free services at dyndns.org.

    you run a service on your remote...

  • RE: Sponsored Content

    I also have no problem with sponsored articles...a lot of the time,regardless of the source,they have a valueable lesson or tidbit of knowledge in them.

    As long as it's technical, it'd...

  • RE: SQL Server 2000 connecting to a .Net application

    I have a very similar situation: we use virtual machines for testing our application. the virtual machines can connect to dozens of sql servers on our network with no problem.

    ...

  • RE: System Stored Procedure Question

    well i found that SQL2005 has a stored proc to mark a specific object as system, instead of an on/off switch, so I'm still looking:

    -- SS2k5 provides a stored procedure...

Viewing 15 posts - 12,211 through 12,225 (of 13,469 total)