You can alter it in syscolumns. That's a REALLY, REALLY bad idea. But, it does work. And.....I just happen to have a script just for this (which I never use on my stuff):--Create the table to fix this problem, that's not really a problem. It's just people not getting databases.CREATE TABLE djl_test_colid( int1 INT, int2 INT, value VARCHAR(55), int3 INT)INSERT djl_test_colid(int1, int2, value, int3) SELECT 1,2,'Here''s the problem',4SELECT * FROM djl_test_colid--Notice that the colid is what "physically" orders the table. It doesn't really, but hey that's another issue. ---Because of this, you would have to recreate the table to reorder, which is what EM does because EM is stupid.SELECT so.name, sc.name AS column_name, sc.colidFROM sysobjects so INNER JOIN syscolumns sc ON so.id = sc.id WHERE so.name = 'djl_test_colid'--The other option is to muck around with the system tables, which I highly recommend against.UPDATE scSET colid = CASE WHEN colid = 3 THEN 4 WHEN colid = 4 THEN 3 ELSE colid ENDFROM sysobjects so INNER JOIN syscolumns sc ON so.id = sc.id WHERE so.name = 'djl_test_colid'SELECT * FROM djl_test_colid--Notice now that everything is right in the order of orderdom.SELECT so.name, sc.name AS column_name, sc.colidFROM sysobjects so INNER JOIN syscolumns sc ON so.id = sc.id WHERE so.name = 'djl_test_colid'--Clean up after yourself. gheeshDROP TABLE djl_test_colid
MeanOldDBAderrickleggett@hotmail.comWhen life gives you a lemon, fire the DBA.