KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: Getting a list of SQL Reserved Words for a particular version of 4D
PRODUCT: 4D | VERSION: 13.2 | PLATFORM: Mac & Win
Published On: January 7, 2013

4D uses the STR# 1123 in {4D_Application}/Resources/4D.rsrc

On Windows this may be located here:
C:\Program Files (x86)\4D\4D v13.2 Custom\4D\Resources\4D.rsr

On Mac OS X this would be located inside of the .app package which may be located here:
Macintosh HD:Applications:4D:4D v13.2 Custom:4D.app:Contents:Resources:4D.rsr

In this situation, you can obtain a list of SQL Reserved Words by using the following code:

ARRAY TEXT($SqlReservedWords_at;0)
C_TEXT($words_t;$crlf)
C_TIME($vhRef)
C_LONGINT($wordsFound;$a)
$crlf:=Char(Carriage return)+Char(Line feed)
$vhRef:=Open resource file("C:\\Program Files (x86)\\4D\\4D v13.2 Custom\\4D\\Resources\\4D.rsr")
If (OK=1)
   STRING LIST TO ARRAY(1123;$SqlReservedWords_at;$vhRef)
   CLOSE RESOURCE FILE($vhRef)
   $wordsFound:=Size of array($SqlReservedWords_at)
   $words_t:=""
   For ($a;1;$wordsFound)
      $words_t:=$words_t+$SqlReservedWords_at{$a}+$crlf
   End for
   SET TEXT TO PASTEBOARD($words_t)
   ALERT(String($wordsFound)+" SQL Reserved Words were copied to your clipboard")
End if



Here is the current list as of 4D v13.2:
ABSOLUTE
ACTION
ADD
ADMIN
AFTER
AGGREGATE
ALIAS
ALL
ALLOCATE
ALTER
AND
ANY
ARE
ARRAY
AS
ASC
ASSERTION
AT
AUTHORIZATION
BEFORE
BEGIN
BINARY
BIT
BLOB
BOOLEAN
BOTH
BREADTH
BY
CALL
CASCADE
CASCADED
CASE
CAST
CATALOG
CHAR
CHARACTER
CHECK
CLASS
CLOB
CLOSE
COLLATE
COLLATION
COLUMN
COMMIT
COMPLETION
CONNECT
CONNECTION
CONSTRAINT
CONSTRAINTS
CONSTRUCTOR
CONTINUE
CORRESPONDING
CREATE
CROSS
CUBE
CURRENT
CURRENT_DATE
CURRENT_PATH
CURRENT_ROLE
CURRENT_TIME
CURRENT_TIMESTAMP
CURRENT_USER
CURSOR
CYCLE
DATA
DATE
DAY
DEALLOCATE
DEC
DECIMAL
DECLARE
DEFAULT
DEFERRABLE
DEFERRED
DELETE
DEPTH
DEREF
DESC
DESCRIBE
DESCRIPTOR
DESTROY
DESTRUCTOR
DETERMINISTIC
DIAGNOSTICS
DICTIONARY
DISCONNECT
DISTINCT
DOMAIN
DOUBLE
DROP
DYNAMIC
EACH
ELSE
END
END-EXEC
EQUALS
ESCAPE
EVERY
EXCEPT
EXCEPTION
EXEC
EXECUTE
EXTERNAL
FALSE
FETCH
FIRST
FLOAT
FOR
FOREIGN
FOUND
FREE
FROM
FULL
FUNCTION
GENERAL
GET
GLOBAL
GO
GOTO
GRANT
GROUP
GROUPING
HAVING
HOST
HOUR
IDENTITY
IGNORE
IMMEDIATE
IN
INDICATOR
INITIALIZE
INITIALLY
INNER
INOUT
INPUT
INSERT
INT
INTEGER
INTERSECT
INTERVAL
INTO
IS
ISOLATION
ITERATE
JOIN
KEY
LANGUAGE
LARGE
LAST
LATERAL
LEADING
LEFT
LESS
LEVEL
LIKE
LIMIT
LOCAL
LOCALTIME
LOCALTIMESTAMP
LOCATOR
MAP
MATCH
MINUTE
MODIFIES
MODIFY
MODULE
MONTH
NAMES
NATIONAL
NATURAL
NCHAR
NCLOB
NEW
NEXT
NO
NONE
NOT
NULL
NUMERIC
OBJECT
OF
OFF
OLD
ON
ONLY
OPEN
OPERATION
OPTION
OR
ORDER
ORDINALITY
OUT
OUTER
OUTPUT
PAD
PARAMETER
PARAMETERS
PARTIAL
PATH
POSTFIX
PRECISION
PREFIX
PREORDER
PREPARE
PRESERVE
PRIMARY
PRIOR
PRIVILEGES
PROCEDURE
PUBLIC
READ
READS
REAL
RECURSIVE
REF
REFERENCES
REFERENCING
RELATIVE
RESTRICT
RESULT
RETURN
RETURNS
REVOKE
RIGHT
ROLE
ROLLBACK
ROLLUP
ROUTINE
ROW
ROWS
SAVEPOINT
SCHEMA
SCOPE
SCROLL
SEARCH
SECOND
SECTION
SELECT
SEQUENCE
SESSION
SESSION_USER
SET
SETS
SIZE
SMALLINT
SOME
SPACE
SPECIFIC
SPECIFICTYPE
SQL
SQLEXCEPTION
SQLSTATE
SQLWARNING
START
STATE
STATEMENT
STATIC
STRUCTURE
SYSTEM_USER
TABLE
TEMPORARY
TERMINATE
THAN
THEN
TIME
TIMESTAMP
TIMEZONE_HOUR
TIMEZONE_MINUTE
TO
TRAILING
TRANSACTION
TRANSLATION
TREAT
TRIGGER
TRUE
UNDER
UNION
UNIQUE
UNKNOWN
UNNEST
UPDATE
USAGE
USER
USING
VALUE
VALUES
VARCHAR
VARIABLE
VARYING
VIEW
WHEN
WHENEVER
WHERE
WITH
WITHOUT
WORK
WRITE
YEAR
ZONE