Forum Replies Created

Viewing 15 posts - 3,481 through 3,495 (of 3,544 total)

  • RE: ContainsTable query

    SQL7 BOL states that variables are not allowed for search conditions. If you have a lot of these then I suggest you build a sql string and use executesql. Try

    declare...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Table design / Relationship problem

    I use SQL7 and have used keys on one table as foreign keys on several other tables. Where did you read 'I can not use The DGuserID from the DogGroomers...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Advanced Stored Procedure Help

    If you want the return value

    in tsql you can use @reply = EXEC procname, in ADO the return is in the parameter RETURN_VALUE.

    If you want other variables then add OUTPUT...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: SQL Agent odbc logs

    Win2K & SQL7. No problem switching trace on/off in odbc manager. SQLAgent logged to c:\sql.log. Changed log file name on odbc manager but sqlagent did not always take notice!!!

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Emulate FIRST aggregate function with T-SQL?

    Just to add to this I use to use subqueries and joins to aggregate values for one table to update another. But found performance dropped like a lead weight when...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Error Messages

    In your case I would use the folowing proc

    CREATE proc tblMMStudentTestScoresCOPYInsert

    (

    @PERMNUM varchar (12),

    @TestShortName nvarchar (8),

    @TestScore smallint,

    @DateEntered smalldatetime

    )

    as

    IF EXISTS

    (SELECT *

    FROM tblMMStudentTestScoresCOPY

    WHERE PERMNUM = @PERMNUM

    AND TestShortName = @TestShortName)

    Begin

    RAISERROR('You already have this...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Net-Library error 10060: ConnectionOpen (PreLoginH

    Is the server on a different network? ie thru firewall. I have to change clients here that access SQL the other side of a firewall.

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Error Messages

    I agree. I usually trap such errors in my app before calling upd or if using a stored proc then I trap in the proc and use RAISERROR to notify...

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: udapte query across 2 db's

    Nice one Don, did'nt know could do it that way. I always did

    update TableToUpdate

    set <your fields go here>

    from TableToUpdate u

    join TableInOtherDatabase o

    on u.KeyField = o.KeyField

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Month should be 2 digits

    I would use

    SELECT @TMonth = REPLACE(STR(MONTH(@T1),2,0),' ','0')

    but then thats me.

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: bcp queryout with delimiters

    Are you exec'ing the SQL. You will need to

    exec master.dbo.xp_cmdshell @sql.

    And you will need /c parameter as well.

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: bcp queryout with delimiters

    I use

    /t ","

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Log file resize

    In SQL7 I have never been able to shrink log files even by following BOL. I always detach and re attach my databases.

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: T-SQL

    I use

    select top 0 *

    into anewtable

    from sometable

    Far away is close at hand in the images of elsewhere.
    Anon.

  • RE: Left Outer Join w/ Not In criteria = Inner Join

    I reckon that

    SELECT A.*

    FROM TABLE_1 A LEFT OUTER JOIN TABLE_2 B

    ON (A.KEY = B.KEY AND B.FLD_1 = 'criteria')

    is an outer join and as you say will return all rows...

    Far away is close at hand in the images of elsewhere.
    Anon.

Viewing 15 posts - 3,481 through 3,495 (of 3,544 total)