Forum Replies Created

Viewing 8 posts - 16 through 23 (of 23 total)

  • RE: loops

    USE tempdb

    GO

    Declare @TotalRows int, @minRow int

    CREATE TABLE #Temp

    ( Id int identity(1,1),

    Queue_stub uniqueidentifier

    )

    INSERT INTO #temp

    SELECT Queue_Stub

    FROM <table_name> WHERE condition

    SET @TotalRows=@@Rowcount

    SET @minRow=1

    --Using loops

    DECLARE @queue_stub uniqueidentifier

    SET @queue_stub = ''

    WHILE @minRow <=@TotalRows

    BEGIN

    ...

  • RE: Service broker

    oki,.. thankss

  • RE: Service broker

    hardcode*

  • RE: loops

    all,,

    i got my solution... thanks newaz...

  • RE: Where Clause

    the query will work as

    Select * from <table>

    the Or condition Name = 'Bob' is supressed bt the condition 1 = 1.

  • RE: Select only Names with more than one assigned ID

    exists keyword has its own flaw... you can try the IN keyword( reff in one of the posts)... but make sure to give only 1 select column name in the...

  • RE: Select only Names with more than one assigned ID

    try subquery such as --->

    SELECT agencyName,agencyId

    FROM contactAction

    WHERE EXISTS

    (

    SELECT agencyName,count(*)

    FROM contactAction

    GROUP BY agencyName

    HAVING COUNT(*) <> 1

    )

  • RE: loops

    logic :---

    SELECT @message = queue_message FROM tablename

    WHERE PK= @pk

    IF (@PK is not null...

Viewing 8 posts - 16 through 23 (of 23 total)