Question: I am using Grails 1.3.7, and I have two service, and I call a method of BService in AService as following:

```
BService {
  static boolean transactional = true

  public void bDoThings() {
    //doThings
    b.save()
  }
}

AService {

  static boolean transactional = true

  BService bProxy

  public void aDoThings() {
    //doSomethings
    bProxy.bDoThings()
    //doSomeOtherThings
    throw new RuntimeException()
  }
}

```

I think after throwing RuntimeException, aDoThings will be roll back, and b will not be saved. But only aDotThings is roll back, b is still persisted.

But when I change

```
BService bProxy

```

to

```
BService bService

```

or to

```
def bService

```

Everything works fine.So I wonder why this happens, because I think bProxy is just a variable name, it shouldn't affect the behavior of transaction.
Can anyone explain why?

Answer: 
try this

```
DECLARE @tmp TABLE(field1 VARCHAR(50),field2 VARCHAR(50))
CURSOR START
    INSERT INTO @tmp
        ( field1, field2 )
    SELECT OBJECT, REVENUE

CURSOR END
SELECT * FROM @tmp

```
`Insert` the **returned** values into a **temporary table / table variable** and then `select` from that after the cursor.