| Author |
Topic |
|
returnofthemack
Starting Member
16 Posts |
Posted - 2003-04-08 : 20:04:11
|
| "I'm trying to delete a record in a table using enterprise manager for sql server 7. Right clicking on the row (record) shows a greyed out "delete" option, which obviously I cannot click. I swear I've been able to delete records using enterprise manager while maintaining another sql server 7 database. However, I'm unable to do so on several sql servers here. Is this an installation configuration thing? Is this a function not available on sql server 7?" |
|
|
returnofthemack
Starting Member
16 Posts |
Posted - 2003-04-08 : 20:14:06
|
| By the way, permissions are fine as I'm using the sa account and am able to successfully delete records using SQL commands in query analyzer. |
 |
|
|
KnooKie
Aged Yak Warrior
623 Posts |
Posted - 2003-04-09 : 06:26:19
|
| Never tried deleting records that way before but FYI we're running SQL Server 7 SP2 and it is greyed out in our enterprise manager as well.===========Paul |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-04-10 : 12:42:48
|
| Why are you using Enterprise Manager to perform deletes? Use Query Analyzer instead. I believe that you can delete a row in EM if you just click on the row and then click delete on the keyboard. HTH,Tara |
 |
|
|
returnofthemack
Starting Member
16 Posts |
Posted - 2003-04-10 : 14:57:16
|
| Actually, it's not me - it's a web developer who isn't very experienced with SQL. He's familiar with Access and wants to be able to delete a specific row/rows through EM. |
 |
|
|
returnofthemack
Starting Member
16 Posts |
Posted - 2003-04-10 : 15:00:35
|
| But "oh my God!" clicking the "delete" key works. Sheez.Thanks |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-04-10 : 15:00:43
|
| Just tell him that he can't use EM to do the deletes that way he is forced to use QA. It will make him a better developer in the end anyway.Tara |
 |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2003-04-10 : 17:07:21
|
| I'm just curious (maybe we should take a poll). But how many people use EM Interfaces for edit/adding/deleting records, build views, ect.The only thing I use it for is to script objects.Oh, and does anyone ever edit their sprocs through EM. I always like to keep the code as an independent script and modify that.Just curious.Brett8-) |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-04-10 : 17:09:17
|
| I'm curious as well. What I would like to know is for the people that use EM to edit stored procs or modify data is what is their experience level for SQL Server or SQL in general.Tara |
 |
|
|
robvolk
Most Valuable Yak
15732 Posts |
Posted - 2003-04-10 : 22:02:01
|
I hate to admit that I sometimes use EM to browse tables quickly, instead of opening another QA window. I also used it to edit SP's until recently, when I started using source control for the first time (I LOVE IT!!!) Now I spend 99% of the time checking data and writing sproc's in QA, and I don't miss EM for those tasks.I also never use the query builder in EM, and I'm damn proud to say it! |
 |
|
|
jsmith8858
Dr. Cross Join
7423 Posts |
Posted - 2003-04-11 : 07:52:49
|
| If I need to return like 25 columns from 2 or 3 tables and don't feel like typing them all in, I will sometimes use EM's query thingy to get me started ... but, of course, it gets cut and pasted (and cleaned up) in QA.It can be handy if you have a simple query (not subqueries or CASE's) but with lots of tables joined together to get a quick "picture" of all the relationships.I am not a DBA so I don't do much with permissions, but if I need to look at those I find EM pretty useful.Sometimes to browse a table or do a quick ad-hoc query of a table or view ... actually, that's probably the #1 reason. It is so easy to pick a table or view, grab 10 fields, choose some group by's and summary functions, put in some fitlers, and away you go ...(I hate typing sometimes...i'm too sloppy as you can tell from my posts!)like anything, don't rely on it but don't ignore it either ... it can save time for some tasks.- JeffEdited by - jsmith8858 on 04/11/2003 07:53:38 |
 |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2003-04-11 : 09:01:02
|
| Then why not use INFORMATION_SCHEMA and generate your SQL with SQL?Not only can you do simple things with the concept below, but if you use a standard methodlogy for things (like tracking history) you can go nuts...like generating triggers, ect.Declare @TBName sysnameSelect @TBName = 'Orders'SELECT 'SELECT ' + Column_Name ' + ' From INFORMATION_SCHEMA.Columns WHERE table_name = @TBName and ORDINAL_POSITION = 1UNION ALLSELECT ' , ' + Column_Name ' + ' From INFORMATION_SCHEMA.Columns WHERE table_name = @TBName and ORDINAL_POSITION <> 1UNION ALLSELECT ' FROM ' + Table_Name ' + ' From INFORMATION_SCHEMA.Columns WHERE table_name = @TBName and ORDINAL_POSITION = 1 Brett8-) |
 |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2003-04-11 : 12:56:08
|
| Actually, This ones a little better:Declare @TBName sysnameSelect @TBName = 'Orders'SELECT SQL FROM (SELECT 'SELECT ' + Column_Name As SQL, Table_Name, 1 As SQLGroup, 1 As RowOrder From INFORMATION_SCHEMA.Columns WHERE table_name = @TBName and ORDINAL_POSITION = 1UNION ALLSELECT ' , ' + Column_Name As SQL, Table_Name, 2 As SQLGroup, ORDINAL_POSITION As RowOrder From INFORMATION_SCHEMA.Columns WHERE table_name = @TBName and ORDINAL_POSITION <> 1UNION ALLSELECT ' FROM ' + Table_Name As SQL, Table_Name, 3 As SQLGroup, 1 As RowOrder From INFORMATION_SCHEMA.Columns WHERE table_name = @TBName and ORDINAL_POSITION = 1) AS XXXOrder by Table_Name, SQLGroup, RowOrderBrett8-) |
 |
|
|
|