Sei sulla pagina 1di 388

EMC

Documentum
®

®

Content

Server

ersion

V

6.5

SP2

DQL

Reference

Manual

300-009-310

A01

EMC

Corporation

Corporate

Headquarters:

Hopkinton,

www.EMC.com

1-508-435-1000

01748-9103

MA

Published

Copyright

©

1992

-

2009

June

2009

EMC

Corporation.All

rights

reserved.

EMC

believes

the

information

in

this

publication

is

accurate

as

of

its

publication

date.The

information

is

subject

to

change

without

notice.

 

THE

INFORMATION

IN

THIS

PUBLICATION

IS

PROVIDED

AS

IS.

EMC

CORPORATION

MAKES

NO

REPRESENTATIONS

OR

WARRANTIES

OF

ANY

KIND

WITH

RESPECT

TO

THE

INFORMATION

IN

THIS

PUBLICATION,

AND

SPECIFICALLY

DISCLAIMS

IMPLIED

WARRANTIES

OF

MERCHANTABILITY

OR

FITNESS

FOR

A

PARTICULAR

PURPOSE.

 

Use,

copying,

and

distribution

of

any

EMC

software

described

in

this

publication

requires

an

applicable

software

license.

For

the

most

up-to-date

listing

of

EMC

product

names,

see

EMC

Corporation

Trademarks

on

EMC.com.

All

other

trademarks

used

herein

are

the

property

of

their

respective

owners.

Table

of

Contents

Preface

11

Chapter

1DQL

Language

Elements

13

Literals

13

Integer

literals

 

13

Floating

point

literals

14

Character

string

literals

14

ID

literals

15

Date

literals

15

 

Default

formats

15

Short

date

formats

16

ANSI

format

16

Other

character

string

formats

16

Date

literal

keywords

17

Date

output

formats

18

Date

storage

and

handling

18

 

Special

keywords

18

Functions

 

19

 

Scalar

functions

20

ASCII

20

BITAND,

BITCLR,

BITSET

20

UPPER

21

LOWER

21

SUBSTR

21

 

Aggregate

functions

 

22

 

COUNT

22

MIN

23

MAX

23

AVG

24

SUM

24

 

Date

functions

24

 

DATEDIFF

25

DATEADD

25

DATEFLOOR

26

DATETOSTRING

26

 

The

ID

function

27

The

MFILE_URL

function

27

 

Examples

28

 

Predicates

 

28

Arithmetic

operators

29

Comparison

operators

29

Column

and

property

predicates

29

 

Predicates

for

columns

and

single-valued

properties

30

Predicates

for

repeating

properties

30

Pattern

matching

with

LIKE

32

The

percent

sign

33

The

underbar

33

EMC

Documentum

Content

Server

Version

6.5

SP2

DQL

Reference

Manual3

Table

of

Contents

 

Matching

cases

34

The

ESCAPE

character

34

SysObject

predicates

34

The

TYPE

predicate

35

The

FOLDER

predicate

35

The

CABINET

predicate

36

Logical

operators

36

AND

and

OR

37

NOT

37

Order

of

precedence

37

DQL

reserved

words

38

Chapter

2DQL

Statements

39

Chapter

3Administration

Methods

159

Invoking

administration

methods

159

Scope

of

the

administration

methods

 

160

Administration

method

operations

160

Chapter

4Using

DQL

315

Introducing

DQL

315

Quoting

object

type

and

property

names

317

NULLs,

default

values,

and

DQL

317

Testing

for

default

and

NULL

values

 

318

Default

values

and

aggregate

functions

319

Sorting

and

nulls

320

Repeating

properties

in

queries

320

Modifying

repeating

attributes

320

Adding

new

values

321

Inserting

values

321

Appending

values

321

Updating

values

322

Deleting

values

322

Forcing

index

correspondence

in

query

results

322

Performance

note

for

Sybase

or

MS

SQL

Server

users

323

Querying

virtual

documents

324

Full-text

searching

and

virtual

documents

 

324

Querying

registered

tables

325

Referencing

registered

tables

in

queries

325

Security

controls

326

Default

object-level

permissions

and

table

permits

326

Caching

queries

326

Privileges,

permissions,

and

queries

326

Appendix

AUsing

DQL

Hints

329

General

guidelines

for

all

329

SQL_DEF_RESULT_SET

N

330

FORCE_ORDER

331

RETURN_TOP

N

331

Database-specific

implementations

331

SQL

Server

332

Subqueries

and

the

hint

332

4EMC

Documentum

Content

Server

Version

6.5

SP2

DQL

Reference

Manual

Table

of

Contents

 

DB2

332

Oracle

and

Sybase

333

Effects

of

a

SEARCH

clause

 

333

Recommended

use

333

OPTIMIZE_TOP

N

333

FETCH_ALL_RESULTS

N

 

334

SQL

Server,

the

hint,

and

subqueries

334

OPTIMIZATION_LEVEL

level_1

level_2

 

334

UNCOMMITTED_READ

335

IN

and

EXISTS

335

ROW_BASED

336

Effects

on

returned

results

 

336

Effects

on

query

syntax

rules

337

FTDQL

and

NOFTDQL

 

337

TRY_FTDQL_FIRST

338

FT_CONTAIN_FRAGMENT

 

338

GROUP_LIST_LIMIT

N

338

HIDE_SHARED_PARENT

DQL

Hint

339

Including

multiple

hints

limiting

rows

returned

339

Passthrough

hints

339

Syntax

340

Error

handling

and

debugging

340

Appendix

BImplementing

Java

Evaluation

of

Docbasic

Expressions

343

Docbasic

expression

handling

by

Content

Server

 

343

How

DFC

Version

6

and

later

handles

the

expressions

344

Migrating

the

expressions

for

pre-6

clients

 

344

Repository

storage

of

migrated

expressions

345

Migrating

Docbasic

expressions

to

Java

346

Disabling

or

re-enabling

Java

evaluation

347

Docbasic

expression

components

support

 

348

Operators

348

Supported

functions

for

Java

evaluation

 

349

Unsupported

functions

for

Java

evaluation

353

Supported

constants

 

354

Unsupported

constants

355

Implicit

objects

355

Appendix

CDQL

Quick

Reference

 

357

The

DQL

statements

357

Execute

360

DQL

reserved

words

364

Appendix

DDocument

Query

Language

Examples

 

369

Basic

examples

369

The

simplest

format

 

369

Using

the

WHERE

clause

370

Searching

repeating

properties

in

a

WHERE

Clause

370

Using

aggregate

functions

370

Using

the

GROUP

BY

clause

 

371

Using

the

HAVING

clause

371

EMC

Documentum

Content

Server

Version

6.5

SP2

DQL

Reference

Manual5

Table

of

Contents

The

ORDER

BY

clause

 

371

Using

the

asterisk

(*)

in

queries

372

Searching

cabinets

and

folders

372

Querying

registered

tables

373

Querying

virtual

documents

373

Determining

the

components

374

6EMC

Documentum

Content

Server

Version

6.5

SP2

DQL

Reference

Manual

Table

of

Contents

List

of

Figures

Figure

1.Sample

virtual

document

 

124

Figure

2.Repository

storage

of

Docbasic

expressions

for

object

types

344

Figure

3.Repository

storage

of

manually

migrated

Docbasic

expressions

345

Figure

4.Virtual

document

model

374

EMC

Documentum

Content

Server

Version

6.5

SP2

DQL

Reference

Manual7

Table

of

Contents

List

of

Tables

Table

Table

Table

Table

Table

Table

Table

Table

Table

Table

Table

Table

Table

Table

Table

Table

Table

Table

Table

Table

Table

Table

Table

Table

Table

Table

Table

Table

Table

Table

Table

Table

Table

Table

Table

Table

Table

14.CREATE

13.CREATE

12.CHANGE

11.Alter

10.ALTER

9.Syntax

8.ALTER

7.ALTER

6.Predicates

5.Predicates

4.Valid

3.Arithmetic

2.Default

1.Valid

ranges

for

floating

string

point

formats

for

for

literals

character

dates

operators

comparison

for

for

GROUP

TYPE

Type

operators

and

DQL

statements

repeating

columns

single-valued

properties

properties

argument

argument

for

descriptions

descriptions

of

descriptions

variations

ASPECT

full-text-indexing

descriptions

aspect

properties

argument

operations

OBJECT

GROUP

argument

argument

argument

descriptions

descriptions

OBJECT

36.CHECK_RETENTION_EXPIRED

35.Properties

34.CHECK_CACHE_CONFIG

33.BATCH_PROMOTE

32.Administration

31.UPDATE

30.UPDATE

29.UNREGISTER

28.DQL

27.SELECT

26.REVOKE

25.REGISTER

24.INSERT

23.GRANT

22.Administration

21.EXECUTE

20.DROP

19.DROP

18.DELETE

17.DELETE

16.DB2

15.CREATE

by

tablespace

TYPE

page

argument

descriptions

and

sizes

associated

descriptions

maximum

row

lengths

argument

OBJECT

descriptions

argument

GROUP

TYPE

syntax

description

argument

argument

methods

argument

argument

argument

argument

argument

hints

descriptions

descriptions

by

category

for

the

EXECUTE

statement

descriptions

descriptions

descriptions

descriptions

descriptions

standard

argument

methods

the

descriptions

argument

OBJECT

descriptions

argument

descriptions

category

arguments

arguments

in

arguments

CHECK_CACHE_CONFIG

result

object

37.CHECK_SECURITY

arguments

8EMC

Documentum

Content

Server

Version

6.5

SP2

DQL

Reference

175

171

169

.168

165

160

151

148

146

142

112

110

106

103

101

96

95

94

93

89

87

75

72

69

67

63

49

46

45

43

41

31

30

29

29

15

14

Manual

Table

of

Contents

Table

38.CLEAN_DELETED_OBJECTS

arguments

 

177

Table

39.DB_STATS

arguments

180

Table

40.Query

result

object

properties

for

DB_STATS

administration

method

180

Table

41.DELETE_REPLICA

arguments

 

182

Table

42.DO_METHOD

arguments

186

Table

43.Properties

of

the

query

result

object

returned

by

DO_METHOD

188

Table

44.DROP_INDEX

arguments

193

Table

45.ESTIMATE_SEARCH

arguments

195

Table

46.EXEC_SQL

arguments

197

Table

47.EXPORT_TICKET_KEY

arguments

199

Table

48.GENERATE_PARTITION_SCHEME_SQL

arguments

 

203

Table

49.GET_FILE_URL

arguments

 

208

Table

50.GET_INBOX

arguments

210

Table

51.SysObject-related

property

names

for

GET_INBOX

query

result

objects

211

Table

52.GET_PATH

arguments

 

214

Table

53.HTTP_POST

arguments

217

Table

54.Query

result

object

properties

for

HTTP_POST

218

Table

55.IMPORT_REPLICA

arguments

 

221

Table

56.IMPORT_TICKET_KEY

arguments

223

Table

57.LIST_RESOURCES

arguments

226

Table

58.Collection

properties

for

LIST_RESOURCES

226

Table

59.Collection

properties

for

LIST_RESOURCES

227

Table

60.LIST_SESSIONS

arguments

 

230

Table

61.Complete

information

returned

by

LIST_SESSIONS

230

Table

62.Query

result

object

properties

for

LIST_TARGETS

233

Table

63.LOG_OFF

arguments

236

Table

64.MAKE_INDEX

arguments

 

238

Table

65.MARK_FOR_RETRY

arguments

242

Table

66.MIGRATE_CONTENT

arguments

244

Table

67.MIGRATE_TO_LITE

arguments

257

Table

68.MODIFY_TRACE

arguments

264

Table

69.MOVE_INDEX

arguments

266

Table

70.PING

arguments

268

Table

71.PURGE_AUDIT

arguments

 

269

Table

72.PUSH_CONTENT_ATTRS

arguments

276

Table

73.RECOVER_AUTO_TASKS

arguments

278

Table

74.REGISTER_ASSET

arguments

280

Table

75.Queue

item

property

values

set

by

REGISTER_ASSET

 

281

Table

76.REGISTER_ASSET

arguments

 

282

Table

77.REORGANZE_TABLE

arguments

283

Table

78.REPLICATE

arguments

285

Table

79.RESTORE_CONTENT

arguments

288

Table

80.ROLES_FOR_USER

arguments

290

EMC

Documentum

Content

Server

Version

6.5

SP2

DQL

Reference

Manual9

Table

of

Contents

Table

81.SET_APIDEADLOCK

arguments

 

292

Table

82.Valid

operation

names

for

SET_APIDEADLOCK

 

293

Table

83.SET_CONTENT_ATTRS

arguments

 

295

Table

84.Example

settings

for

content

metadata

properties

in

content

objects

297

Table

85.SET_OPTIONS

arguments

 

299

Table

86.Trace

options

for

SET_OPTIONS

300

Table

87.SET_STORAGE_STATE

arguments

 

302

Table

88.TRANSCODE_CONTENT

arguments

306

Table

89.Queue

item

properties

set

by

TRANSCODE_CONTENT

 

307

Table

90.UPDATE_STATISTICS

arguments

 

309

Table

91.WEBCACHE_PUBLISH

arguments

312

Table

92.Valid

arguments

for

ARGUMENTS

312

Table

93.DQL

basic

query

statements

316

Table

94.Default

property

values

by

datatype

317

Table

95.Predicates

that

test

for

NULL

and

default

values

 

318

Table

96.Comparison

of

logical

reads

with

and

without

default

result

sets

330

Table

97.Example

of

object-based

query

results

 

336

Table

98.Example

of

row-based

query

results

337

Table

99.Arguments

for

the

Docbasic

expression

migration

methods

 

346

Table

100.dmc_SetJavaExprEnabled

arguments

 

348

Table

101.Docbasic

operators

supported

by

Java

evaluation

348

Table

102.Docbasic

functions

supported

for

Java

evaluation

349

Table

103.Docbasic

functions

not

supported

for

Java

evaluation

353

Table

104.Docbasic

constants

supported

for

Java

evaluation

354

Table

105.Constants

not

supported

for

Java

evaluation

 

355

Table

106.Summary

of

FTDQL

query

rules

 

361

Table

107.DQL

reserved

words

364

10EMC

Documentum

Content

Server

Version

6.5

SP2

DQL

Reference

Manual

Preface

This

manual

is

the

reference

manual

for

Documentum’

s

Document

Query

Language,

supported

by

Content

Server.It

is

a

companion

to

Documentum

Object

Reference

Manual

,

Content

Server

Fundamentals

,

Content

Server

Administration

Guide

,

and

Documentum

Distributed

Configuration

Guide

.

Intended

audience

This

manual

is

written

for

application

developers

and

system

administrators

and

 

any

others

who

want

to

build

a

content

or

workgroup

management

application

that

uses

DQL.

It

assumes

that

you

are

familiar

with

the

concepts

of

document

processing,

object-oriented

programming,

and

client-server

applications.It

also

assumes

working

knowledge

of

SQL.

 

Conventions

 

This

manual

uses

the

following

conventions

in

the

syntax

descriptions

and

examples.

 

Syntax

conventions

 

ConventionIdentifies

italicsA

variable

for

which

you

must

provide

a

value.

square [

]

bracketsAn

optional

argument

that

may

be

included

only

once

curly {

}

bracesAn

optional

argument

that

may

be

included

multiple

times

|

vertical

lineA

Revision

history

The

following

changes

have

been

made

choice

to

this

between

two

document.

or

more

options

EMC

Documentum

Content

Server

Version

6.5

SP2

DQL

Reference

Manual11

Preface

Revision

history

Revision

DateDescription

June

2009First

Publication

12EMC

Documentum

Content

Server

Version

6.5

SP2

DQL

Reference

Manual

Chapter

1

DQL

Language

Elements

This

chapter

describes

the

building

blocks

of

a

DQL

statement,

including:

Literals,

page

which , 13

describes

the

literal

formats

for

the

Documentum

datatypes

Special

keywords,

page

which , 18

describes

the

special

keywords

that

you

can

use

in

DQL

queries

Functions,

page

19

,

which

describes

the

functions

that

you

can

use

in

DQL

queries

Predicates,

page

28

,

which

describes

the

predicates

that

you

can

use

in

expressions

in

queries

Logical

operators,

page

which , 36

describes

the

logical

operators

supported

by

DQL

DQL

reserved

words,

page

38

,

which

cross-references

you

to

a

list

of

the

words

reserved

in

DQL

Literals

Literals

are

values

that

are

interpreted

by

the

server

exactly

as

they

are

entered.Content

Server

recognizes

five

types

of

literals:

Integer

literals,

page

13

Floating

point

literals,

page

14

Character

string

literals,

page

14

 

ID

literals,

page

15

Date

literals,

page

15

Integer

literals

 

An

integer

literal

specifies

any

whole

number

and

is

expressed

in

the

following

format:

 

[+|-]n

 

where

n

is

any

number

between

-2147483647

and

+2147483647.

 

DQL

does

not

support

the

negative

integer

value

-2147483648

because

this

number

is

not

supported

in

a

EMC

number

of

Documentum

relational

databases.If

Content

Server

Version

6.5

you

enter

this

number,

your

results

are

unpredictable.

SP2

DQL

Reference

Manual13

DQL

Language

Elements

Floating

point

literals

A

floating

0.45

21.

5.347

following

.66

-4.12

A

floating

10.4e-6

12e-3

or

-3.6E7

or

point

literal

format:

point

literal

specifies

can

also

any

number

be

expressed

that

contains

a

decimal

point

and

is

in

scientific

notation.For

example:

expressed

in

the

DQL

accepts

either

uppercase

or

lowercase

in

the

notation.

 

If

you

assign

an

integer

literal

to

a

property

that

has

a

floating

point

datatype,

the

system

floating

The

automatically

point

converts

RDBMS

the

integer

to

the

a

floating

lists

point

number.

and

underlying

determines

page

14

maximum

the

ranges

minimum

for

supported

values

that

you

literal.Table

1,

databases.

can

assign

as

a

Note:

Do

not

reset

the

decimal

symbol

at

the

operating

system

level

to

a

comma.Doing

so

results

in

incorrect

execution

of

some

Documentum

Administration

jobs.

Table

1.Valid

ranges

for

floating

point

literals

RDBMSRangeSignificant

digits

Oracle1.0

x

10-129

to

9.99

x

10-12915

DB21.0

x

10-307

to

1.798

x

10+30815

Sybase

MS

SQL

Server

and

1.7e-308

1.7e+30815 to

Character

string

literals

literal.To

cannot

Character

string

non-printable

literals

are

strings

of

printable

of

such

as

the

characters

line

feeds

or

literal,

include

and

are

enclosed

in

returns,

in

single

string

quotes.You

place

characters,

quote

as

part

carriage

a

character

include

a

single

it

twice.For

example:

'Thecompany''sthirdquarterresultswereverygood.'

you

If

underlying

The

maximum

a

length

defined

in

the

but

of

character

in

a

no

case

a

string

is

string

will

the

datatype,

by

literal

the

is

length

determined

by

the

maximum

bytes.

character

you

allowed

string

attempt

by

the

RDBMS,

is

maximum

the

exceed

length

of

defined

length.If

the

1999

property

can

place

property

as

maximum

property’

s

literal

to

place

defined

a

14EMC

Documentum

Content

Server

Version

6.5

SP2

DQL

Reference

Manual

DQL

Language

Elements

longer

value

in

the

property,

DFC

will

throw

an

exception.You

can

change

the

behavior

and

allow

DFC

to

truncate

the

character

string

value

to

fit

the

property

by

setting

the

dfc

preference

called

dfc.compatibility.truncate_long_values

in