Viewing 15 posts - 3,481 through 3,495 (of 3,544 total)
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.
December 16, 2002 at 9:55 am
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.
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...
Far away is close at hand in the images of elsewhere.
Anon.
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!!!
Far away is close at hand in the images of elsewhere.
Anon.
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...
Far away is close at hand in the images of elsewhere.
Anon.
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...
Far away is close at hand in the images of elsewhere.
Anon.
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.
Far away is close at hand in the images of elsewhere.
Anon.
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...
Far away is close at hand in the images of elsewhere.
Anon.
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
Far away is close at hand in the images of elsewhere.
Anon.
December 12, 2002 at 6:27 am
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.
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.
Far away is close at hand in the images of elsewhere.
Anon.
December 10, 2002 at 2:29 am
I use
/t ","
Far away is close at hand in the images of elsewhere.
Anon.
December 9, 2002 at 11:08 am
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.
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...
Far away is close at hand in the images of elsewhere.
Anon.
December 6, 2002 at 9:42 am
Viewing 15 posts - 3,481 through 3,495 (of 3,544 total)