Viewing 15 posts - 121 through 135 (of 154 total)
try this query
SELECT p.sku, p.name, p.Quantities, p.price, M2.QTY, M2.Cost, M2.UpdateDate
FROM product p
(
SELECT Sku ,
MAX(UpdateDate) As UpdateDate,
FROM MonthlyInv
WHERE UpdateDate <= CONVERT(datetime,'9/20/2001 2:26:57 AM')
GROUP...
September 22, 2001 at 6:17 am
That Should be SET @cmd = @cmd + <string>
September 21, 2001 at 7:53 am
not sure whether this is what you need but , for rounding off amounts in my systems i keep a field which stores how many decimals to round of to...
September 19, 2001 at 6:23 am
never had any problems with creating temp tables explicitly , i prefer it to the select into method , as Steve pointed out this was a problem with 6.5
personally i...
September 5, 2001 at 3:27 pm
CREATE PROCEDURE SP_SMTPSTATS @RETCODE INT OUTPUT
AS
SELECT @RETCODE = COUNT (*)
FROM smtpstats
Where clienthost = "10.0.0.64" AND Operation = "Data" AND bytesrecvd > 200 AND
bytesrecvd < 2000
you can call this using...
August 30, 2001 at 12:36 pm
doesnt DROP TABLE #123 work???
usually if you're using temp tables in a proc - they are automatically dropped as soon as the execution is complete
August 30, 2001 at 4:58 am
oh and you would also need to loop thru all records in inserted . currently the trigger is geared to manage single records only.. read up on triggers in BOL
...
August 30, 2001 at 4:56 am
this query is the problem
select @city = city
from testcity --
This should be
select @city = city
from inserted
also it would be better if you replaced this
if @city in (select city...
August 30, 2001 at 4:54 am
i've not heard of any "tools" as such but the encryption algorithm for version 7 and 6.5 are pretty straightforward to crack. 2000 uses a different encryption algorithm and has...
August 29, 2001 at 9:08 am
This should work
declare @qry nvarchar(500)
declare @qry1 nvarchar(500)
declare @tabName nvarchar(50)
declare @x int
set @tabName= 'tblCenters'
set @qry = ('select @ident = ident_current('''+@tabName+''')')
set @qry1 = ('@ident int output')
exec sp_executesql @qry , @qry1 ,...
August 29, 2001 at 5:21 am
you can use the osql utility
here's a example of how to call it from Sql Server
xp_cmdshell 'osql /U [User] /P [Password] /d [Database] /S [Server] /Q "sp_helpdb" -o C:\HelpDb.txt'
you can...
August 24, 2001 at 1:41 pm
only way to reference objects of another database in a proc is to use the full name of the object i.e server.database.user.object
you can possibly use dynamic sql .. i don't...
August 24, 2001 at 8:40 am
why don't you take the values from the inserted table into variables and build the insert statement with these variables instead of selecting from inserted
August 24, 2001 at 6:36 am
how about using a temporary table or a table variable .. insert the values in this table and at the end of the procedure just run a select on the...
August 21, 2001 at 4:46 am
have not tested this code for decrypting encrypted objects - this should work for sql 7.0 ,it uses the decrypt function .pass the object name and the proc should print...
August 18, 2001 at 6:36 am
Viewing 15 posts - 121 through 135 (of 154 total)