DYTPE IN

  • I'm the typical newbie in SQL, but need to understand a query contained in a DTF file (Data Transfer from AS400) it goes like this:

    [DataTransferFromAS400]

    Version=1.2

    [HostInfo]

    HostName=X.X.X.X

    HostFile=DATAMD/IASCP025

    [ClientInfo]

    OutputDevice=2

    PCFileType=16

    PCFile=D:\someexcel.xls

    CrtOpt=1

    SaveFDF=0

    FDFFile=C:\somefile.FDF

    ConvType=1

    ASCIITruncation=1

    FileOps=8281471

    [SQL]

    Select=*

    Where=(DTYPE IN ( 'DEPR','DEAF','FOCO')) AND (YEAR = 2008)

    OrderBy=

    GroupBy=

    Having=

    JoinBy=

    SQLSelect=

    EnableGroup=0

    MissingFields=0

    [Options]

    IgnoreDecErr=0

    TimeSep=[:]

    TimeFmt=HMS

    DateSep=[/]

    DateFmt=MDY

    DecimalSep=.

    SortSeq=0

    SortTable=

    Lang=0

    LangID=

    [HTML]

    AutoSize=0

    AutoSizeKB=128

    OverWrite=1

    Charset=windows-1252

    ConvInd=0

    Title=

    IncDateTime=0

    DateTimeLoc=0

    TabAlign=0

    TabRows=2

    TabCols=2

    TabBW=1

    TabCS=1

    TabCP=1

    TabWidth=100

    TabWidthP=0

    TabMap=1

    CapAlign=0

    CapStyle=1

    What is "DTYPE IN"????

  • It looks like DTYPE is the column name. IN refers to the values inside the parenthesis. Basically it could be rewritten as DTYPE = 'DEPR' OR DTYPE = 'DEAF' OR DTYPE = 'FOCO'.

    Greg

  • Then, and the year 2008?

    Select=* Where=(DTYPE IN ( 'DEPR','DEAF','FOCO')) AND (YEAR = 2008)

  • Year would be another column and the query is looking for 2008.

    Greg

  • And the options:

    OrderBy=

    GroupBy=

    Having=

    JoinBy=

    SQLSelect=

    EnableGroup=0

    MissingFields=0

    How would they affect the output?

  • They're not being used, so they shouldn't affect it at all.

    Greg

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply