building queries in sql server 2005

  • hello there. quite recently i got to know how to build queries on a server, running sql server 2000 using client tools such as enterprise manager. after linking tables, filtering the data, adding criteria....after which I viewed the results etc in a grid format. I had no trouble whatsoever editing any cell of data, whichever table the cell data related to or was sourced from. Now, my problem is now that I have sqlserver 2005 on a server, for which I am using sql 2005 managemenet studio. when i build queries and add filtering etc as before with ONE table i do not appear to have any problems editing cell data (results in a grid) but as soon as I had additional tables , all the cells go into a "read only" mode, preventing me from editing data. Can someone please explain to me what they think is happening and what I can do to fix the problem? thanks in advance for any help. Gaz

  • When you join with a second table I don't think you can edit in the grid anymore. In general using an update statement is better than editing in the grid anyway.

    Henry

  • yes, I understand that actually writing up sql code is a good thing anyway, but as for me, I am not quite an expert yet (quite a way from it)....I just thought i would ask about the "not able to edit cells in linked tables" issue etc.....so, the suggestion is that it is more of a standard now rather than some configuration issue?

  • I haven't actually tried editing joined tables in SSMS but you might consider the type of joins you have. In some cases when two or more tables are joined together it can become a (for lack of a better phrase) non-updateable query. If that's the case it wouldn't matter if SSMS allows updates on joined tables.

    What's the relationship between the tables? Is the 2nd table a parent to the original?

  • I just gave it a try and SSMS wouldn't allow an update even on an updateable query.

    If you want to be able to edit your data in grid format you could try linking your tables into an access database.

  • Mmm? Access?....maybe. I have used msAccess a lot when building vb6 apps using ado connections to access tables at the backend. I'd prefer not to use access, I'd rather use ssms really under sql. Oh yes, quesiotn1:is the 2nd table a parent? well, no not really,....the first table represents a sales order and the linked tabled represents order items - a simple ID to ID link. i have found that if I wanted to call up the 1st tableon its own,I can edit some data and sure enough, if I callup the 2nd table on its own, I can edit no probs...it's only when they get linked !...weird !!  Could it be anything to do with constraints in any way?

  • No, it's not because of constraints. I verified that it won't let you modify any data unless you've only got one table open. I wish it weren't so.

  • same here.....it was all so simple with Enterprise Manager (sigh)

  • Oh wow... I can remember thinking that when I first started using SSMS. Now I get so frustrated with EM if I have to use it. I love SSMS now. I'm sure you will too eventually. 😉

Viewing 9 posts - 1 through 8 (of 8 total)

You must be logged in to reply to this topic. Login to reply