Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
ProperCase SQL Reserved Words
#1
This will fix the case on your selected SQL statements for all reserved words (my list is for microsoft sqlserver).
Macro ProperCase SQL Reserved Words
Code:
Select All      Help
str s.getsel

str w = "ADD[]ALL[]ALTER[]AND[]ANY[]AS[]ASC[]AUTHORIZATION[]BACKUP[]BEGIN[]BETWEEN[]BREAK[]BROWSE[]BULK[]BY[]CASCADE[]CASE[]CHECK[]CHECKPOINT[]CLOSE[]CLUSTERED[]COALESCE[]COLLATE[]COLUMN[]COMMIT[]COMPUTE[]CONSTRAINT[]CONTAINS[]CONTAINSTABLE[]CONTINUE[]CONVERT[]CREATE[]CROSS[]CURRENT[]CURRENT_DATE[]CURRENT_TIME[]CURRENT_TIMESTAMP[]CURRENT_USER[]CURSOR[]DATABASE[]DBCC[]DEALLOCATE[]DECLARE[]DEFAULT[]DELETE[]DENY[]DESC[]DISK[]DISTINCT[]DISTRIBUTED[]DOUBLE[]DROP[]DUMP[]ELSE[]END[]ERRLVL[]ESCAPE[]EXCEPT[]EXEC[]EXECUTE[]EXISTS[]EXIT[]EXTERNAL[]FETCH[]FILE[]FILLFACTOR[]FOR[]FOREIGN[]FREETEXT[]FREETEXTTABLE[]FROM[]FULL[]FUNCTION[]GOTO[]GRANT[]GROUP[]HAVING[]HOLDLOCK[]IDENTITY[]IDENTITY_INSERT[]IDENTITYCOL[]IF[]IN[]INDEX[]INNER[]INSERT[]INTERSECT[]INTO[]IS[]JOIN[]KEY[]KILL[]LEFT[]LIKE[]LINENO[]LOAD[]NATIONAL[]NOCHECK[]NONCLUSTERED[]NOT[]NULL[]NULLIF[]OF[]OFF[]OFFSETS[]ON[]OPEN[]OPENDATASOURCE[]OPENQUERY[]OPENROWSET[]OPENXML[]OPTION[]OR[]ORDER[]OUTER[]OVER[]PERCENT[]PIVOT[]PLAN[]PRECISION[]PRIMARY[]PRINT[]PROC[]PROCEDURE[]PUBLIC[]RAISERROR[]READ[]READTEXT[]RECONFIGURE[]REFERENCES[]REPLICATION[]RESTORE[]RESTRICT[]RETURN[]REVERT[]REVOKE[]RIGHT[]ROLLBACK[]ROWCOUNT[]ROWGUIDCOL[]RULE[]SAVE[]SCHEMA[]SECURITYAUDIT[]SELECT[]SESSION_USER[]SET[]SETUSER[]SHUTDOWN[]SOME[]STATISTICS[]SYSTEM_USER[]TABLE[]TABLESAMPLE[]TEXTSIZE[]THEN[]TO[]TOP[]TRAN[]TRANSACTION[]TRIGGER[]TRUNCATE[]TSEQUAL[]UNION[]UNIQUE[]UNPIVOT[]UPDATE[]UPDATETEXT[]USE[]USER[]VALUES[]VARYING[]VIEW[]WAITFOR[]WHEN[]WHERE[]WHILE[]WITH[]WRITETEXT"
ARRAY(str) a=w
int r
for r 0 a.len(1)
,s.replacerx(a[r],a[r],3)

s.setsel
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)