Forum Replies Created

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

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

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

  • 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!!!

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

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

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

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

  • 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

  • RE: Month should be 2 digits

    I would use

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

    but then thats me.

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

  • RE: bcp queryout with delimiters

    I use

    /t ","

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

  • RE: T-SQL

    I use

    select top 0 *

    into anewtable

    from sometable

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

  • RE: client spid

    Sorry about that but yes it pertains to the application connection to SQL.

    e.g. using ADO might use either of these

    Provider=SQLOLEDB;OLE DB Services=-1;Data Source=server;Initial Catalog=dbname;User ID=username;Password=password;APP=text

    DSN=dsnname;UID=username;PWD=password;APP=text

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