February 27, 2009 at 11:16 am
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"????
February 27, 2009 at 11:25 am
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
February 27, 2009 at 11:37 am
Then, and the year 2008?
Select=* Where=(DTYPE IN ( 'DEPR','DEAF','FOCO')) AND (YEAR = 2008)
February 27, 2009 at 11:41 am
Year would be another column and the query is looking for 2008.
Greg
February 27, 2009 at 11:58 am
And the options:
OrderBy=
GroupBy=
Having=
JoinBy=
SQLSelect=
EnableGroup=0
MissingFields=0
How would they affect the output?
February 27, 2009 at 12:03 pm
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