Showing posts with label teh. Show all posts
Showing posts with label teh. Show all posts

Monday, March 26, 2012

Query with another query input parameter

Dear Friends,

I have a long query with an input parameter. I want this input parameter be all teh values returned from another query.

SELECT DIR FROM DIRECCAO

BIG QUERY with DIR input parameter.

How can I do?

Thanks.

SELECT @.DIR = DIR FROM DIRECCAO

EXEC BIG_QUERY @.DIR

HTH,

Babu

|||

IT WORKS AND THE QUERY IS:

ALTER PROCEDURE [dbo].[GD_SP_FACTURA_GLOBAL]

AS

DECLARE @.DIR nvarchar(10)

SELECT @.DIR = DIR_NOME FROM Direccao

EXECUTE dbo.GD_SP_FACTURA_ValorTotal @.DIR

BUT How can I SUM all the values returned by the BIGQuery?

THANKS!!

|||How can I have the sum and it's possible to return a list of all values returned by the bigQuery? THANKS!!!|||

Could anyone help me?

Thanks!

Friday, March 9, 2012

query to detemine trigger status

I know how to retrieve the list of triggers in teh database.
Select * from sysobjects where xtype = 'TR'
What I want to know is how do i tell whether the trigger is disabled or
enabled. I would appreciate if anybody can help me this.
thanks
MB...and status&2048=2048
will tell you if it's disabled
Mohan wrote:

>I know how to retrieve the list of triggers in teh database.
>Select * from sysobjects where xtype = 'TR'
>What I want to know is how do i tell whether the trigger is disabled or
>enabled. I would appreciate if anybody can help me this.
>thanks
>MB
>
>|||Lookup the argument ExecIsTriggerDisabled for the meta-data function
OBJECTPROPERTY in SQL Server Books Online.
Anith