Viewing 15 posts - 3,481 through 3,495 (of 3,543 total)
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...
December 16, 2002 at 4:36 am
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...
December 16, 2002 at 4:18 am
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!!!
December 13, 2002 at 10:55 am
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...
December 13, 2002 at 2:31 am
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...
December 12, 2002 at 11:45 am
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.
December 12, 2002 at 7:03 am
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...
December 12, 2002 at 6:31 am
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
December 12, 2002 at 6:27 am
I would use
SELECT @TMonth = REPLACE(STR(MONTH(@T1),2,0),' ','0')
but then thats me.
December 12, 2002 at 6:11 am
Are you exec'ing the SQL. You will need to
exec master.dbo.xp_cmdshell @sql.
And you will need /c parameter as well.
December 10, 2002 at 2:29 am
In SQL7 I have never been able to shrink log files even by following BOL. I always detach and re attach my databases.
December 9, 2002 at 10:56 am
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...
December 6, 2002 at 9:42 am
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
December 6, 2002 at 8:27 am
Viewing 15 posts - 3,481 through 3,495 (of 3,543 total)