Refactor issue

PowerwayPowerway Posts: 29
edited September 17, 2007 10:22AM in SQL Refactor Previous Versions
I have these two queries. I have my rules to format like the top query and it does indeed format correctly. However the lower query insists on putting the inner SELECT next to the left paranthesis.

Why?

select
filename
from
dmsrepositorydigitalassets
where
repositoryguid in (
select
parametervalue
from
drsworkqueueparameters rwqp
join drsworkqueuemessages rwqm on rwqp.messageid = rwqm.messageid
where
dmseventid in (195520, 195527, 195528, 195526)
and parametertypeid = 15603)

select
*
from
dmsrepositorydigitalassets
where
repositoryguid in (select
repositoryguid
from
dmsdocumentrevisions
where
documentid = 122)

Comments

  • Hi there,

    Sorry about this issue that you are suffering, it looks like we have a bit of an issue here, we will look into fixing this for the next release.

    From

    Jonathan
    Jonathan Watts

    -Project Manager
    -Red Gate Software Ltd
  • Jonathon,

    All the formatting was lost in my post. Is there another way I can get the queries to you.
  • Hi Powerway,

    If you put the code inside a [code] [/code] block the formatting should be preserved.

    Ta,

    Jonathan
    Jonathan Watts

    -Project Manager
    -Red Gate Software Ltd
  • Note the differences in the location of the subquery. I my formatting set to produce format of the first query.
    select
      filename
    from
      dmsrepositorydigitalassets
    where
      repositoryguid in (
      select
        parametervalue
      from
        drsworkqueueparameters rwqp
        join drsworkqueuemessages rwqm on rwqp.messageid = rwqm.messageid
      where
        dmseventid in (195520, 195527, 195528, 195526)
        and parametertypeid = 15603)
    
    select
      *
    from
      dmsrepositorydigitalassets
    where
      repositoryguid = (
                        select
                          repositoryguid
                        from
                          dmsdocumentrevisions
                        where
                          documentid = 122
                       )
    
    
  • Powerway,

    Thanks, can you email me (see below) a copy of your current settings file?

    Thanks,

    Jonathan
    Jonathan Watts

    -Project Manager
    -Red Gate Software Ltd
Sign In or Register to comment.