How can we help you today? How can we help you today?

Incorrect candidate list when referring to other database

While trying to reference a table in another database on the same server, I get the candidatelist of the current database of the connection (in Query Analyzer).

So, in Query Analyzer with a connection to database DB1

select * from DB2.dbo.<candidatelist>

The <candidatelist> shows the tables of DB1 instead of DB2.


Both databases are already cached by SQL Prompt.
ErikVorstenbosch
0

Comments

8 comments

  • Tilman
    Hi,

    I'm afraid what you want to do is not supported in SQL Prompt 3.

    You can, however, type a USE statement and Prompt will use the specified database.

    E.g.

    USE DB1
    GO

    -- candidate list displays objects from DB1 here

    USE DB2
    GO

    -- candidate list displays objects from DB2 here

    Regards,

    Tilman
    Tilman
    0
  • SloopJohnB
    I'd like to see this back in if possible at some point. I frequently work with cross-DB queries, and telling me to use USE bascially means that I have to give up intellisense for one or the other DB that I am working with.

    This was something that actually worked under V2, and was quite handy.
    SloopJohnB
    0
  • Bart Read
    It will definitely make a comeback at some point in the not too distant future, but for this version we really had to focus on getting the basics right, which unfortunately turned out to be a lot more difficult than we'd originally anticipated. From where we are now it's not that big a deal to add it in, but it won't be in there for the initial 3.0 release since we don't have the QA resources available at present to make sure it's fully tested.

    Sorry I can't give you a more positive answer for now.


    Thanks,
    Bart
    Bart Read
    0
  • WayneMcWhorter
    I'm glad to hear that this capability will be coming back. Naturally, disappointed that I can't have it now but understand the reasoning.

    This database system I inherited is spread out over 9 different databases. Cross database joins are a major part of my coding day and intellisence helps me out a lot.
    WayneMcWhorter
    0
  • Bart Read
    Yeuch, that sounds horrible. I can see why you're so desperate for cross-database support. Tell me, are these databases on the same or different servers?
    Thanks,
    Bart
    Bart Read
    0
  • ErikVorstenbosch
    Much of my coding is done in a database for reporting purposes. This databases contains stored procedures to collect data from multiple databases (most of them on the same server, but on some occasions on different servers too). These procedures are then consumed by reporting tools.
    Due to this design almost all queries need to reference an other database.

    So, if "the not too distant future" would be "a (very) near future", I would be very glad.
    ErikVorstenbosch
    0
  • RogueDog
    The cross database intellisense was a big selling point for me as well. I too am constantly working across multiple databases on the same and different servers.

    One feature beyond same server cross database intellisense that I would like to see is cross server intellisense, as our main database system resides on 4 seperate servers and is synced with a propietary synchronization app that works most of the time. It seems to me that with fully qualified names and the caching structure in SP, it would not be that big of a stretch to incorporate cross server intellisense.
    RogueDog
    0
  • lemasterc
    This is a feature that I use consistently as well. Our db structure has separate databases for several modules as well as a Reporting database that separates all the report views/stored procs, etc. from all the object tables. As a result 98% of the tables I need to access for the reports are in other databases - sometimes other servers. The loss of that feature made the v3 unusable for my purposes and I have uninstalled the newer version. It would be great to hear that soon would be as soon as possible.
    lemasterc
    0

Add comment

Please sign in to leave a comment.