Viewing 4 posts - 1 through 5 (of 5 total)
I Found It:
Select min(PK), fld2,fld3,fld4
from table1
group by fld2,fld3,fld4
it would work since I did not care which Pk is being returned.
July 31, 2002 at 1:58 pm
create a stored procedure with three parameters: @InvoiceNum, @InvoiceTotal, and @InvoicePayments
in your sproc you need to write two sql queries, one to get the Total Invoice:
SELECT @InvoiceTotal=SUM(b.strCost)
FROM ...
June 25, 2002 at 2:31 pm
Preview
Try using echo:
declare @lvar varchar(500)
select @lvar='"@ECHO '+ @yourlocalvariable +' >> C:\YourOutputFile.txt"'
exec master..xp_cmdshell @lvar
Another way is to store your local var in a temp table and...
June 25, 2002 at 2:01 pm
Viewing 4 posts - 1 through 5 (of 5 total)