PC-Axis and SQL Databases - Statistiska Centralbyrån · PC-Axis and SQL Databases . PC-Axis can...

26
SQL 13-1 __________________________________________________________________________ PC-Axis and SQL Databases PC-Axis can always work with PC-Axis files stored on disk or CD-ROM, but it is also possible to connect to a SQL database which has been stored in accordance with the metadata decided on by Statistics Sweden. In order to work with SQL-databases the following changes are made compared to the earlier described PC-Axis software. - The file pcaxis.exe is enlarged to include a user interface for SQL. - A new dll-file is added, pxsql2008.dll - A new textfile is added, pcasqlen.txt (=language en, if several languages then further text files are added) and new texts in pcaxisen.msg. Starting from meta model 2.1 a textfile pcasqldb21.txt is used for the connection parameters and the names of tables and columns in the database, replacing this information in pcasqlen.txt for that part. For meta model 2.2 a textfile pcasqldb22.txt is used the same way. The structure of the meta database must be kept but the names of tables and columns may differ for different installations. These names are therefore read from the text file pcasqlsv.txt for meta model 2.0, from pcasqldb21.txt for meta model 2.1 and from pcasqldb22.txt for meta model 2.2. 1. Connection to SQL database The file pcasqlen.txt for meta model 2.0 or earlier, Pcasqldb21.txt for meta model 2.1 and Pcasqldb22 for meta model 2.2 contain information on the default server and user, as well as information on whether the connection is to a Sybase database or an ODBC data source (can also be Sybase via ODBC). If ODBC=N it means that logon can only be made to a Sybase database. Temptab=# means that temporary tables have a name starting with #. If an Oracle database is used the Temptab must instead be in the a-z character range. The texts Varorder=StoreColumnNo means that the variables will be shown sorted in this order. Since PC-Axis sql is always used in a LAN where it has already been checked that the user is accepted, there is no extra security when retrieval is made from the official database. As long as the default user is used the password is automatic. When the user logs in on another server he has to enter a userid and a password which are acceptable on that server/database. This is especially the case when logon is to a micro database. Information on which micro database has been used is therefore stored in the pcax2000.ini file. When a user logs in with a user identity other than the default user he also get the possibility to save sql tables. The name of the database used to store sql tables is also stored in the pcax2000.ini file after having been entered once. It is up to the user to get permission to create tables in a database beforehand. Example: Connect to an ODBC source Section: [Metabase] Name Example Explanation Metabase SDB_Metabase The name of the default metabase to use Server Internetdatabase The name of a default ODBC dsn

Transcript of PC-Axis and SQL Databases - Statistiska Centralbyrån · PC-Axis and SQL Databases . PC-Axis can...

Page 1: PC-Axis and SQL Databases - Statistiska Centralbyrån · PC-Axis and SQL Databases . PC-Axis can always work with PC-Axis files stored on disk or CD-ROM, ... Server=Database1 . Server1=Database2

SQL 13-1 __________________________________________________________________________

PC-Axis and SQL Databases PC-Axis can always work with PC-Axis files stored on disk or CD-ROM, but it is also possible to connect to a SQL database which has been stored in accordance with the metadata decided on by Statistics Sweden. In order to work with SQL-databases the following changes are made compared to the earlier described PC-Axis software. - The file pcaxis.exe is enlarged to include a user interface for SQL. - A new dll-file is added, pxsql2008.dll - A new textfile is added, pcasqlen.txt (=language en, if several languages then further text files are added) and new texts in pcaxisen.msg. Starting from meta model 2.1 a textfile pcasqldb21.txt is used for the connection parameters and the names of tables and columns in the database, replacing this information in pcasqlen.txt for that part. For meta model 2.2 a textfile pcasqldb22.txt is used the same way. The structure of the meta database must be kept but the names of tables and columns may differ for different installations. These names are therefore read from the text file pcasqlsv.txt for meta model 2.0, from pcasqldb21.txt for meta model 2.1 and from pcasqldb22.txt for meta model 2.2.

1. Connection to SQL database The file pcasqlen.txt for meta model 2.0 or earlier, Pcasqldb21.txt for meta model 2.1 and Pcasqldb22 for meta model 2.2 contain information on the default server and user, as well as information on whether the connection is to a Sybase database or an ODBC data source (can also be Sybase via ODBC). If ODBC=N it means that logon can only be made to a Sybase database. Temptab=# means that temporary tables have a name starting with #. If an Oracle database is used the Temptab must instead be in the a-z character range. The texts Varorder=StoreColumnNo means that the variables will be shown sorted in this order. Since PC-Axis sql is always used in a LAN where it has already been checked that the user is accepted, there is no extra security when retrieval is made from the official database. As long as the default user is used the password is automatic. When the user logs in on another server he has to enter a userid and a password which are acceptable on that server/database. This is especially the case when logon is to a micro database. Information on which micro database has been used is therefore stored in the pcax2000.ini file. When a user logs in with a user identity other than the default user he also get the possibility to save sql tables. The name of the database used to store sql tables is also stored in the pcax2000.ini file after having been entered once. It is up to the user to get permission to create tables in a database beforehand. Example: Connect to an ODBC source Section: [Metabase] Name Example Explanation

Metabase SDB_Metabase The name of the default metabase to use

Server Internetdatabase The name of a default ODBC dsn

Page 2: PC-Axis and SQL Databases - Statistiska Centralbyrån · PC-Axis and SQL Databases . PC-Axis can always work with PC-Axis files stored on disk or CD-ROM, ... Server=Database1 . Server1=Database2

SQL 13-2 __________________________________________________________________________

Server1 Productiondatabase The name of a default ODBC dsn.

Used for MS SQL server MServer Q1 The name of the server for a default ODBC

data source. Used for MS SQL Server

PServer Q2 The name of the server for a default ODBC data source. Used for MS SQL Server

DefUser SCB The default login. PC-Axis checks if this has been changed by the user.

Blip 1 1 or 2 (single or double ’ in queries)

Temptab # For MS and Sybase. For Oracle change to chars from a-z

Metatables statmeta For Oracle if an owner has to be given when retrieving metadata

Datatables statdata For Oracle if an owner has to be given when retrieving data

ODBC Y Use an ODBC DSN

Access Y If MS Access database

SAorder OmradeText Order by subject for micro meta data (will not be moved to dot net). Obsolete.

Varorder StoreColumnNo or PresText

Order the variables according to this column value

Language1 Svenska main language in SQL database

Language2 English second language in SQL database

LangCode1 sv code for main language

LangCode2 en code for second language

LangMeta1 From version 2.1 onwards

LangMeta2 Eng From version 2.1 onwards. suffix for tables with the second language

UpdateIgnore=0 UpdateIgnore=0 1=Ignore if data has been updated for a maintable 0=Check if user is allowed to see updated maintables before publication

PresCatIgnore=0 PresCatIgnore=0 1=Ignore the presentation category and let everybody see all maintables 0=Check if user is allowed to see private maintables

LoggSql 0 If 1 write a log file

TestSql 1 If 1 write created sql queries in a text file

Page 3: PC-Axis and SQL Databases - Statistiska Centralbyrån · PC-Axis and SQL Databases . PC-Axis can always work with PC-Axis files stored on disk or CD-ROM, ... Server=Database1 . Server1=Database2

SQL 13-3 __________________________________________________________________________

LogUser 1 If 1 log the retrieval in an sql table

LogDatabase ABC If LogUser=1, the name of the sql database

for log

LogTable UserLog If LogUser=1, the name of the sql table for log

LogServer Q3 If LogUser=1, the name of the sql server for log

LogDSN UserReg If logUser=1, the name of the ODBC dsn for log

LogDriver MS The log server is MS SQL server (special treatment of user/password)

InLogUser 1 IF LogUser=1 and the entered userid/password is to be used to write in the logtable

MatrixCode TableId

If the keyword Matrix is to be filled with information from TableId in Maintable Default is Contents.PrsCode

ContentsCode new 2008

PresCode Content

Default. PresCode is used when more than one content is selected to make the keyword CODES for contents variable. Content, new 2008, use Content instead of PresCode for CODES keyword.

ValueUpperCase 1 Make the first char of a value text upper case, when code+text is retrieved and stored in Values

SCBspec 1 Special for SCB. Allow a user to see all tables for a product if he is allowed to see at least one.

Example: Connect using ODBC [Metabase] Metabase=SDB_Metabas Server=Database1 Server1=Database2 MServer=Q0x PServer=Q0y DefUser=SCB Blip=1 Temptab=# ODBC=Y SAorder=OmradeText order by subject for micro meta data Varorder=StoreColumnNo order the variable according to this Language1=Svenska Language2=English

Page 4: PC-Axis and SQL Databases - Statistiska Centralbyrån · PC-Axis and SQL Databases . PC-Axis can always work with PC-Axis files stored on disk or CD-ROM, ... Server=Database1 . Server1=Database2

SQL 13-4 __________________________________________________________________________

LangCode1=sv LangCode2=en UpdateIgnore=0 take into account that data can have been updated PresCatIgnore=0 take into account that data can be private LoggSql=0 if 1 write a log file TestSql=1 if 1 write created sql queries in a text file LogUser=1 if 1 log the retrieval in an sql table LogDatabase=inter if LogUser=1, the name of the database LogTable=UserLog if LogUser=1, the name of the sql table LogServer=Q0z if LogUser=1, the name of the db server LogDSN=ReguserMS dsn if log using ODBC LogDriver=MS if MS SQL server If the keyword Matrix is to be filled with information from TableId in Maintable then MatrixCode=TableId If the first char of a value text should be upper case when code+text is retrieved and stored in Values ValueUpperCase=1 Special for SCB. Allow a user to see all tables for a product if he is allowed to see at least one. SCBspec=1 Example: Connect to a Sybase database [Metabase] Metabase=SDB_Metabas Server=Q0xx DefUser=SCB Blip=1 Temptab=# ODBC=N SAorder=OmradeText order by subject for micro meta data Varorder=StoreColumnNo order the variable according to this Language1=Svenska Language2=English LangCode1=sv LangCode2=en UpdateIgnore=0 take into account that data can have been updated PresCatIgnore=0 take into account that data can be private LoggSql=0 if 1 write a log file TestSql=1 if 1 write created sql queries in a text file LogUser=1 if 1 log the retrieval in an sql table LogDatabase= if LogUser=1, the name of the database LogTable= if LogUser=1, the name of the sql table LogServer= if LogUser=1, the name of the db server LogDSN= dsn if log using ODBC If the keyword Matrix is to be filled with information from TableId in Maintable then MatrixCode=TableId

Page 5: PC-Axis and SQL Databases - Statistiska Centralbyrån · PC-Axis and SQL Databases . PC-Axis can always work with PC-Axis files stored on disk or CD-ROM, ... Server=Database1 . Server1=Database2

SQL 13-5 __________________________________________________________________________

2. SQL - codes The text file contains information on which codes are used in the installation of the SQL meta base Pcasqlen.txt for meta model 2.0 or earlier Pcasqldb21.txt for meta model 2.1 Pcasqldb22.txt for meta model 2.2 PC-Axis SQL reads the file and compares the codes with the content in the meta base tables. If meta model 2.1 or 2.2 are used the text file Pcasqlen.txt is still used for the texts in menus and labels in PC-Axis SQL interface. Section: [Codes] Name Example Explanation

SQL table Column

CFPricesC C Current prices

Contents CFPrices

CFPricesF F Fixed prices

Contents CFPrices

StockFAS S Stock

Contents StockFA

StockFAF F Flow

Contents StockFA

StockFAA

A Average Contents StockFA

Copyright1 1 Official statistics no Copyright

Contents Copyright

Copyright2 2 Not official statistics and not Copyright

Contents Copyright

Copyright3 3 Not official statistics. Copyright

Contents Copyright

VariableTypeC C Common (ordinary) variable

SubTableVariable VariableType

VariableTypeT T Time variable

SubTableVariable VariableType

VariableTypeG G Geographical variable

SubTableVariable VariableType

FootnoteM O Mandatory footnote exists

Contents ValueSet Value Footenote

FootnoteContents FootnoteVariable FootnoteValue FootnoteTime Footnote Footnote MandOpt

FootnoteR R Footnote on request exists

Contents

FootnoteContents FootnoteVariable FootnoteValue

Page 6: PC-Axis and SQL Databases - Statistiska Centralbyrån · PC-Axis and SQL Databases . PC-Axis can always work with PC-Axis files stored on disk or CD-ROM, ... Server=Database1 . Server1=Database2

SQL 13-6 __________________________________________________________________________

ValueSet Value Footnote

FootnoteTime Footnote Footnote MandOpt

FootnoteB B

Both mandatory and request footnotes exist

Contents ValueSet Value

FootnoteContents FootnoteVariable FootnoteValue FootnoteTime Footnote Footnote

FootnoteN N No footnote exists

Contents ValueSet Value

FootnoteContents FootnoteVariable FootnoteValue FootnoteTime Footnote Footnote

TimeUnitA A Annual

TimeScale TimeUnit

TimeUnitH H Half yearly

TimeScale TimeUnit

TimeUnitQ Q Quarterly

TimeScale TimeUnit

TimeUnitM M Monthly

TimeScale TimeUnit

TimeUnitW W Weekly

TimeScale TimeUnit

ValueTextExistsS S Short text exists

ValuePool ValueTextExists

ValueTextExistsL L Long text exists

ValuePool ValueTextExists

ValueTextExistsB B Both short and long

ValuePool ValueTextExists

ValueTextExistsN N No text

ValuePool ValueTextExists

ValueTextExistsX X ValueExtra

ValuePool ValueTextExists

ValuePresC C Code presented

ValuePool ValueSet

ValuePres

ValuePresT T Long text presented

ValuePool ValueSet

ValuePres

ValuePresB B Code + long text presented

ValuePool ValueSet

ValuePres

ValuePresA A Code + short text presented

ValuePool ValueSet

ValuePres

ValuePresS S Short text presented

ValuePool ValueSet

ValuePres

ValuePresV V ValuePres from Valuepool used

ValueSet ValuePres

EliminationA A Aggregate values for variable to eliminate

ValueSet Elimination

EliminationN N No elimination for the ValueSet Elimination

Page 7: PC-Axis and SQL Databases - Statistiska Centralbyrån · PC-Axis and SQL Databases . PC-Axis can always work with PC-Axis files stored on disk or CD-ROM, ... Server=Database1 . Server1=Database2

SQL 13-7 __________________________________________________________________________

variable

SpecialSignColumnY Y Column with special characters exists and is used

MainTable SpecCharExists

SpecialSignColumnN N Column with special characters does not exist

MainTable SpecCharExists

SpecialSignColumnE E Column with special characters exists but is not used

MainTable SpecCharExists

Yes Y Yes

All with Y/N see below

All with Y/N

No N No

All with Y/N All with Y/N

StatusAll A Can be seen by all

MainTable TableStatus

StatusEmpty E Data table created but empty

MainTable TableStatus

StatusNew N New data, only to be seen by person with permission

MainTable TableStatus

StatusMeta M Only meta data

MainTable TableStatus

StatusOrder O Ordered for publishing

MainTable TableStatus

StatusUpdate U Update is running

MainTable TableStatus

StatusEng T Total English translation ready

MainTable up to version 2.0, MainTable_Eng from version 2.1

TableStatus Status

RoleHead H Head contact person

MainTablePerson RolePerson

RoleContact C Contact person

MainTablePerson RolePerson

RoleVerify V Person who can verify data

MainTablePerson RolePerson

FootnoteShowS S Show footnote when selection is made

Footnote ShowFootnote

FootnoteShowP P Show footnote when presentation is made

Footnote ShowFootnote

FootnoteShowB B Show footnote both at selection and presentation

Footnote ShowFootnote

MenuLevels 7 Number of levels used in MenuSelection. The level which contains MainTables

MetaAdm Value

Page 8: PC-Axis and SQL Databases - Statistiska Centralbyrån · PC-Axis and SQL Databases . PC-Axis can always work with PC-Axis files stored on disk or CD-ROM, ... Server=Database1 . Server1=Database2

SQL 13-8 __________________________________________________________________________

Y/N – Yes or No options SQL table

Column Explanation

TimeScale Regular Y it is a regular timescale. Timeval can be created

Contents DayAdj Y data is day adjusted SeasAdj Y data is seasonal adjusted PresCellsZero Y show missing lines as 0

N show missing lines as .. AggrePossible Y can be aggregated ValueSet SortCodeExists Y sortcode exists in ValueSet.

N use Sortcode from ValuePool FootnoteContTime Cellnote Y this is a cellnote. May be

omitted if the other variable values are not selected

FootnoteContValue Cellnote Y this is a cellnote. May be omitted if the other variable values are not selected

MainTableVariableHierarchy AllLevelsStored

All levels in the hierarchy are stored. PC-Axis 2007 only works with hierarchies where all are stored.

Exception Codes that are the same in all languages and are not read from the text file: SQL table

Column Explanation

MainTable PresCategory O official P private I internal Grouping Hierarchy U unbalanced B balanced N not a hierarchy

3. Names of tables and columns, meta model 2.0 [TextCatalogue] TextCatalogue=TextCatalog CatalogueNo=TextCatalogNo TextType=TextType PresText=PresText [TextCatalogueLang2] TextCatalogueLang2=TextCatalog_eng [MetaAdm] MetaAdm=MetaAdm Value=Value Property=Property

Page 9: PC-Axis and SQL Databases - Statistiska Centralbyrån · PC-Axis and SQL Databases . PC-Axis can always work with PC-Axis files stored on disk or CD-ROM, ... Server=Database1 . Server1=Database2

SQL 13-9 __________________________________________________________________________

[MetabaseInfo] MetabaseInfo=MetabaseInfo Modelversion=ModelVersion Model=Model [MenuSel] MenuSel=MenuSelection Menu=Menu Select=Selection PresText=PresText LevelNo=LevelNo SortCode=SortCode Presentation=Presentation [MenuSelLang2] MenuSelLang2=MenuSelection_Eng [MainTable] MainTable=MainTable TableStatus=TableStatus PresText=PresText PresTextS=PresTextS PresCategory=PresCategory Server=Server Database=Databas StatusEng=StatusEng ContentsVariable=ContentsVariable TableId=TableId SubjectCode=SubjectCode ProductCode=ProductId [MainTableLang2] MainTableLang2=MainTable_Eng [MainTablePerson] MainTablePerson=MainTablePerson MainTable=MainTable PersonCode=PersonCode Role=RolePerson [Datastorage] Datastorage=Datastorage ProductId=ProductId Database=DatabaseName [Organization] Organization=Organization OrganizationCode=OrganizationCode OrganizationName=OrganizationName Department=Department Unit=Unit [OrganizationLang2] OrganizationLang2=Organization_Eng [Person] Person=Person PersonCode=PersonCode PersonFirstName=Forename PersonLastName=Surname PhonePrefix=PhonePrefix Phoneno=PhoneNo Faxno=FaxNo Email=Email

Page 10: PC-Axis and SQL Databases - Statistiska Centralbyrån · PC-Axis and SQL Databases . PC-Axis can always work with PC-Axis files stored on disk or CD-ROM, ... Server=Database1 . Server1=Database2

SQL 13-10 __________________________________________________________________________

[Contents] Contents=Contents PresText=PresText PresTextS=PresTextS PresCode=PresCode Copyright=Copyright StatisticsId=ProductId StatResponsOrg=StatAuthority LastUpdated=LastUpdated Unit=Unit PresDecimals=PresDecimals PresCellsZero=PresCellsZero RefPeriod=RefPeriod StockFA=StockFA Baseperiod=BasePeriod CFPrices=CFPrices Dayadj=DayAdj Seasadj=SeasAdj FootnoteContents=FootnoteContents FootnoteVariable=FootnoteVariable FootnoteValue=FootnoteValue FootnoteTime=FootnoteTime StoreColNumber=StoreColumnNo StoreFormat=StoreFormat StoreNoChars=StoreNoChar StoreDecimals=StoreDecimals Published=Published AggregPossible=AggregPossible [ContentsLang2] ContentsLang2=Contents_Eng [ContentsTime] ContentsTime=ContentsTime TimePeriod=TimePeriod [TimeScale] TimeScale=TimeScale PresText=PresText TimeScalePres=TimeScalePres Regular=Regular TimeUnit=TimeUnit Frequency=Frequency [TimeScalelang2] TimeScalelang2=TimeScale_Eng [Subtable] Subtable=SubTable PresText=PresText [SubtableLang2] SubtableLang2=SubTable_Eng [SubtableVariable] SubtableVariable=SubTableVariable VariableType=VariableType StoreColNumber=StoreColumnNo [ValueSet] ValueSet=ValueSet Description=Description Elimination=Elimination

Page 11: PC-Axis and SQL Databases - Statistiska Centralbyrån · PC-Axis and SQL Databases . PC-Axis can always work with PC-Axis files stored on disk or CD-ROM, ... Server=Database1 . Server1=Database2

SQL 13-11 __________________________________________________________________________

SortCodeExists=SortCodeExists Footnote=Footnote GeoAreaNo=GeoAreaNo [ValuePool] ValuePool=ValuePool ValueTextExists=ValueTextExists ValuePres=ValuePres [ValuePoolLang2] ValuePoolLang2=ValuePool_Eng ValuePoolEng=ValuePoolEng [VSValue] VSValue=VSValue [VSValueLang2] VSValueLang2=VSValue_Eng [Value] Value=Value ValueCode=ValueCode SortCode=SortCode ValueTextS=ValueTextS ValueTextL=ValueTextL Footnote=Footnote [ValueLang2] ValueLang2=Value_Eng [Variable] Variable=Variable PresText=PresText Footnote=Footnote [VariableLang2] VariableLang2=Variable_Eng [FootnoteMenuSel] FootnoteMenuSel=FootnoteMenuSel [FootnoteMainTable] FootnoteMainTable=FootnoteMainTable [FootnoteSubTable] FootnoteSubTable=FootnoteSubTable [FootnoteContents] FootnoteContents=FootnoteContents [FootnoteSubject] FootnoteSubject=FotnotOmrade [FootnoteContVbl] FootnoteContVbl=FootnoteContVbl [Footnote] Footnote=Footnote FootnoteNo=FootnoteNo FootnoteType=FootnoteType MandRequest=MandOpt FootnoteText=FootnoteText ShowFootnote=ShowFootnote [FootnoteLang2] FootnoteLang2=Footnote_Eng [FootnoteVariable] FootnoteVariable=FootnoteVariable [FootnoteContValue] FootnoteContValue=FootnoteContValue Cellnote=Cellnote

Page 12: PC-Axis and SQL Databases - Statistiska Centralbyrån · PC-Axis and SQL Databases . PC-Axis can always work with PC-Axis files stored on disk or CD-ROM, ... Server=Database1 . Server1=Database2

SQL 13-12 __________________________________________________________________________

[FootnoteValue] FootnoteValue=FootnoteValue [FootnoteContTime] FootnoteContTime=FootnoteContTime Cellnote=Cellnote [Grouping] Valuepool=Valuepool Grouping=Grouping PresText=PresText GeoAreaNo=GeoAreaNo Sortcode=SortCode [GroupingLang2] GroupingLang2=Grouping_Eng [VSGroup] VSGroup=VSGroup GroupCode=GroupCode Valuepool=Valuepool Sortcode=SortCode [VSGroupLang2] VSGroupLang2=VSGroup_Eng

4. Names of tables and columns, meta model 2.1 [TextCatalogue] TextCatalogue=TextCatalog CatalogueNo=TextCatalogNo TextType=TextType PresText=PresText [TextCatalogueLang2] TextCatalogueLang2=TextCatalog_ [MetaAdm] MetaAdm=MetaAdm Value=Value Property=Property [MetabaseInfo] MetabaseInfo=MetabaseInfo Modelversion=ModelVersion Model=Model [MenuSel] MenuSel=MenuSelection Menu=Menu Select=Selection PresText=PresText LevelNo=LevelNo SortCode=SortCode Presentation=Presentation [MenuSelLang2] MenuSelLang2=MenuSelection_ [MainTable] MainTable=MainTable TableStatus=TableStatus PresText=PresText PresTextS=PresTextS ContentsVariable=ContentsVariable

Page 13: PC-Axis and SQL Databases - Statistiska Centralbyrån · PC-Axis and SQL Databases . PC-Axis can always work with PC-Axis files stored on disk or CD-ROM, ... Server=Database1 . Server1=Database2

SQL 13-13 __________________________________________________________________________

TableId=TableId PresCategory=PresCategory SpecCharExists=SpecCharExists SubjectCode=SubjectCode ProductCode=ProductId [MainTableLang2] MainTableLang2=MainTable_ Status=Status [MainTablePerson] MainTablePerson=MainTablePerson MainTable=MainTable PersonCode=PersonCode Role=RolePerson [Datastorage] Datastorage=Datastorage ProductId=ProductId Database=DatabaseName [Organization] Organization=Organization OrganizationCode=OrganizationCode OrganizationName=OrganizationName Department=Department Unit=Unit [OrganizationLang2] OrganizationLang2=Organization_ [Person] Person=Person PersonCode=PersonCode PersonFirstName=Forename PersonLastName=Surname PhonePrefix=PhonePrefix Phoneno=PhoneNo Faxno=FaxNo Email=Email [Contents] Contents=Contents PresText=PresText PresTextS=PresTextS PresCode=PresCode Copyright=Copyright StatResponsOrg=StatAuthority LastUpdated=LastUpdated Unit=Unit PresDecimals=PresDecimals PresCellsZero=PresCellsZero RefPeriod=RefPeriod StockFA=StockFA Baseperiod=BasePeriod CFPrices=CFPrices Dayadj=DayAdj Seasadj=SeasAdj FootnoteContents=FootnoteContents FootnoteVariable=FootnoteVariable FootnoteValue=FootnoteValue FootnoteTime=FootnoteTime

Page 14: PC-Axis and SQL Databases - Statistiska Centralbyrån · PC-Axis and SQL Databases . PC-Axis can always work with PC-Axis files stored on disk or CD-ROM, ... Server=Database1 . Server1=Database2

SQL 13-14 __________________________________________________________________________

StoreColNumber=StoreColumnNo StoreFormat=StoreFormat StoreNoChars=StoreNoChar StoreDecimals=StoreDecimals Published=Published AggregPossible=AggregPossible PresMissingLine=PresMissingLine [ContentsLang2] ContentsLang2=Contents_ [ContentsTime] ContentsTime=ContentsTime TimePeriod=TimePeriod [TimeScale] TimeScale=TimeScale PresText=PresText TimeScalePres=TimeScalepres Regular=Regular TimeUnit=TimeUnit Frequency=Frequency [TimeScalelang2] TimeScalelang2=TimeScale_ [Subtable] Subtable=SubTable PresText=PresText [SubtableLang2] SubtableLang2=SubTable_ [SubtableVariable] SubtableVariable=SubTableVariable VariableType=VariableType StoreColNumber=StoreColumnNo [ValueSet] ValueSet=ValueSet Description=Description Elimination=Elimination SortCodeExists=SortCodeExists Footnote=Footnote GeoAreaNo=GeoAreaNo [ValueSetLang2] ValueSetLang2=ValueSet_ [ValuePool] ValuePool=ValuePool ValueTextExists=ValueTextExists ValuePres=ValuePres [ValuePoolLang2] ValuePoolLang2=ValuePool_ ValuePoolEng=ValuePoolEng [VSValue] VSValue=VSValue [VSValueLang2] VSValueLang2=VSValue_ [Value] Value=Value ValueCode=ValueCode SortCode=SortCode ValueTextS=ValueTextS

Page 15: PC-Axis and SQL Databases - Statistiska Centralbyrån · PC-Axis and SQL Databases . PC-Axis can always work with PC-Axis files stored on disk or CD-ROM, ... Server=Database1 . Server1=Database2

SQL 13-15 __________________________________________________________________________

ValueTextL=ValueTextL Footnote=Footnote [ValueLang2] ValueLang2=Value_ [Variable] Variable=Variable PresText=PresText Footnote=Footnote [VariableLang2] VariableLang2=Variable_ [FootnoteMenuSel] FootnoteMenuSel=FootnoteMenuSel [FootnoteMainTable] FootnoteMainTable=FootnoteMainTable [FootnoteMainTValue] FootnoteMainTValue=FootnoteMainTValue [FootnoteSubTable] FootnoteSubTable=FootnoteSubTable [FootnoteContents] FootnoteContents=FootnoteContents [FootnoteSubject] FootnoteSubject=FotnotOmrade [FootnoteContVbl] FootnoteContVbl=FootnoteContVbl [Footnote] Footnote=Footnote FootnoteNo=FootnoteNo FootnoteType=FootnoteType MandRequest=MandOpt FootnoteText=FootnoteText ShowFootnote=ShowFootnote [FootnoteLang2] FootnoteLang2=Footnote_ [FootnoteVariable] FootnoteVariable=FootnoteVariable [FootnoteContValue] FootnoteContValue=FootnoteContValue Cellnote=Cellnote [FootnoteValue] FootnoteValue=FootnoteValue [FootnoteContTime] FootnoteContTime=FootnoteContTime Cellnote=Cellnote [Grouping] Valuepool=Valuepool Grouping=Grouping PresText=PresText GeoAreaNo=GeoAreaNo Sortcode=SortCode [GroupingLang2] GroupingLang2=Grouping_ [VSGroup] VSGroup=VSGroup GroupCode=GroupCode Valuepool=Valuepool

Page 16: PC-Axis and SQL Databases - Statistiska Centralbyrån · PC-Axis and SQL Databases . PC-Axis can always work with PC-Axis files stored on disk or CD-ROM, ... Server=Database1 . Server1=Database2

SQL 13-16 __________________________________________________________________________

Sortcode=SortCode [VSGroupLang2] VSGroupLang2=VSGroup_ [SpecialCharacter] SpecialCharacter=SpecialCharacter CharacterType=CharacterType PresCharacter=PresCharacter AggregPossible=AggregPossible DataCellPres=DataCellPres DataCellFilled=DataCellFilled PresText=PresText [SpecialCharacterLang2] SpecialCharacterLang2=SpecialCharacter_

5. Names of tables and columns, meta model 2.2 [TextCatalogue] TextCatalogue=TextCatalog CatalogueNo=TextCatalogNo TextType=TextType PresText=PresText [TextCatalogueLang2] TextCatalogueLang2=TextCatalog_ [MetaAdm] MetaAdm=MetaAdm Value=Value Property=Property [MetabaseInfo] MetabaseInfo=MetabaseInfo Modelversion=ModelVersion Model=Model [MenuSel] MenuSel=MenuSelection Menu=Menu Select=Selection PresText=PresText LevelNo=LevelNo SortCode=SortCode Presentation=Presentation [MenuSelLang2] MenuSelLang2=MenuSelection_ [MainTable] MainTable=MainTable TableStatus=TableStatus PresText=PresText PresTextS=PresTextS ContentsVariable=ContentsVariable TableId=TableId PresCategory=PresCategory SpecCharExists=SpecCharExists SubjectCode=SubjectCode ProductCode=ProductId [MainTableLang2] MainTableLang2=MainTable_ Status=Status

Page 17: PC-Axis and SQL Databases - Statistiska Centralbyrån · PC-Axis and SQL Databases . PC-Axis can always work with PC-Axis files stored on disk or CD-ROM, ... Server=Database1 . Server1=Database2

SQL 13-17 __________________________________________________________________________

[MainTablePerson] MainTablePerson=MainTablePerson MainTable=MainTable PersonCode=PersonCode Role=RolePerson [Datastorage] Datastorage=Datastorage ProductId=ProductId Database=DatabaseName [Organization] Organization=Organization OrganizationCode=OrganizationCode OrganizationName=OrganizationName Department=Department Unit=Unit [OrganizationLang2] OrganizationLang2=Organization_ [Person] Person=Person PersonCode=PersonCode PersonFirstName=Forename PersonLastName=Surname PhonePrefix=PhonePrefix Phoneno=PhoneNo Faxno=FaxNo Email=Email [Contents] Contents=Contents PresText=PresText PresTextS=PresTextS PresCode=PresCode Copyright=Copyright StatResponsOrg=StatAuthority LastUpdated=LastUpdated Published=Published Unit=Unit PresDecimals=PresDecimals PresCellsZero=PresCellsZero PresMissingLine=PresMissingLine AggregPossible=AggregPossible RefPeriod=RefPeriod StockFA=StockFA Baseperiod=BasePeriod CFPrices=CFPrices Dayadj=DayAdj Seasadj=SeasAdj FootnoteContents=FootnoteContents FootnoteVariable=FootnoteVariable FootnoteValue=FootnoteValue FootnoteTime=FootnoteTime StoreColNumber=StoreColumnNo StoreFormat=StoreFormat StoreNoChars=StoreNoChar StoreDecimals=StoreDecimals [ContentsLang2]

Page 18: PC-Axis and SQL Databases - Statistiska Centralbyrån · PC-Axis and SQL Databases . PC-Axis can always work with PC-Axis files stored on disk or CD-ROM, ... Server=Database1 . Server1=Database2

SQL 13-18 __________________________________________________________________________

ContentsLang2=Contents_ [ContentsTime] ContentsTime=ContentsTime TimePeriod=TimePeriod [TimeScale] TimeScale=TimeScale PresText=PresText TimeScalePres=TimeScalepres Regular=Regular TimeUnit=TimeUnit Frequency=Frequency [TimeScalelang2] TimeScalelang2=TimeScale_ [Subtable] Subtable=SubTable PresText=PresText [SubtableLang2] SubtableLang2=SubTable_ [SubtableVariable] SubtableVariable=SubTableVariable VariableType=VariableType StoreColNumber=StoreColumnNo [ValueSet] ValueSet=ValueSet Description=Description Elimination=Elimination SortCodeExists=SortCodeExists Footnote=Footnote GeoAreaNo=GeoAreaNo [ValueSetLang2] ValueSetLang2=ValueSet_ [ValuePool] ValuePool=ValuePool ValueTextExists=ValueTextExists ValuePres=ValuePres [ValuePoolLang2] ValuePoolLang2=ValuePool_ ValuePoolEng=ValuePoolAlias [VSValue] VSValue=VSValue [VSValueLang2] VSValueLang2=VSValue_ [Value] Value=Value ValueCode=ValueCode SortCode=SortCode ValueTextS=ValueTextS ValueTextL=ValueTextL Footnote=Footnote [ValueLang2] ValueLang2=Value_ [Variable] Variable=Variable PresText=PresText Footnote=Footnote

Page 19: PC-Axis and SQL Databases - Statistiska Centralbyrån · PC-Axis and SQL Databases . PC-Axis can always work with PC-Axis files stored on disk or CD-ROM, ... Server=Database1 . Server1=Database2

SQL 13-19 __________________________________________________________________________

[VariableLang2] VariableLang2=Variable_ [FootnoteMenuSel] FootnoteMenuSel=FootnoteMenuSel [FootnoteMainTable] FootnoteMainTable=FootnoteMainTable [FootnoteMainTValue] FootnoteMainTValue=FootnoteMainTValue [FootnoteSubTable] FootnoteSubTable=FootnoteSubTable [FootnoteContents] FootnoteContents=FootnoteContents [FootnoteSubject] FootnoteSubject=FotnotOmrade [FootnoteContVbl] FootnoteContVbl=FootnoteContVbl [Footnote] Footnote=Footnote FootnoteNo=FootnoteNo FootnoteType=FootnoteType MandRequest=MandOpt FootnoteText=FootnoteText ShowFootnote=ShowFootnote [FootnoteLang2] FootnoteLang2=Footnote_ [FootnoteVariable] FootnoteVariable=FootnoteVariable [FootnoteContValue] FootnoteContValue=FootnoteContValue Cellnote=Cellnote [FootnoteValue] FootnoteValue=FootnoteValue [FootnoteContTime] FootnoteContTime=FootnoteContTime Cellnote=Cellnote [Grouping] Valuepool=Valuepool Grouping=Grouping PresText=PresText Hierarchy=Hierarchy Sortcode=SortCode GroupPres=GroupPres [GroupingLang2] GroupingLang2=Grouping_ [GroupingLevel] GroupingLevel=GroupingLevel Grouping=Grouping Level=Level LevelText=LevelText GeoAreaNo=GeoAreaNo [GroupingLevelLang2] GroupingLevelLang2=GroupingLevel_ [ValueGroup] ValueGroup=ValueGroup Grouping=Grouping

Page 20: PC-Axis and SQL Databases - Statistiska Centralbyrån · PC-Axis and SQL Databases . PC-Axis can always work with PC-Axis files stored on disk or CD-ROM, ... Server=Database1 . Server1=Database2

SQL 13-20 __________________________________________________________________________

GroupCode=GroupCode ValueCode=ValueCode Valuepool=Valuepool GroupLevel=GroupLevel ValueLevel=ValueLevel SortCode=SortCode [ValueGroupLang2] ValueGroupLang2=ValueGroup_ [ValueSetGrouping] ValueSetGrouping=ValueSetGrouping ValueSet=ValueSet Grouping=Grouping [MainTableVariableHierarchy] MainTableVariableHierarchy=MainTableVariableHierarchy MainTable=MainTable Variable=Variable Grouping=Grouping ShowLevels=ShowLevels AllLevelsStored=AllLevelsStored [SpecialCharacter] SpecialCharacter=SpecialCharacter CharacterType=CharacterType PresCharacter=PresCharacter AggregPossible=AggregPossible DataCellPres=DataCellPres DataCellFilled=DataCellFilled PresText=PresText [SpecialCharacterLang2] SpecialCharacterLang2=SpecialCharacter_

6. Texts for menus, labels, etc Texts are always in pcasqlxx.txt, where xx is the code for the language, for instance pcasqlen.txt for English texts [Caption] Metabase=SDB_Metabas Classes=Classification of a variable Information=Information on Inlog=Log in NewGroup=New Aggregate UseQuery=Use Query SaveQuery=Save Query Search=Find Values=Values Select=Select SaveReg=Save List VarSel=Select Variable SaveHow=Create table Sumvar=Select sum variables MicInfo=Information on micro register MicInfoVar=Information on variables Class=Classifications

Page 21: PC-Axis and SQL Databases - Statistiska Centralbyrån · PC-Axis and SQL Databases . PC-Axis can always work with PC-Axis files stored on disk or CD-ROM, ... Server=Database1 . Server1=Database2

SQL 13-21 __________________________________________________________________________

Partition=Partitioned variable NewDsn=New Datasource [Buttons] Valuetext=Value &Text Valuecode=Value &Code Valuecodet=Code &+ Text Classes=&Classification... Information=&Information... Parttable=&Part Table... Maintable=&Main Table SaveQuery=&Save Query... UseQuery=&Use Query... Search=S&earch... Find=F&ind UndoClass=&Undo Classes Newgroup=&New Aggregate... SaveList=&Save List... Change=&Change Class.Dir... Continue=&More Notes... SearchOr=Search+&or SearchAnd=Search+&and Values=&Values... SaveVal=S&ave Value set... FootTime=&Info for time FootVar=I&nfo for variables FootVal=Inf&o for values ChangeVa=&Change SumVar=Sum Variables... SelVar=Select variables VarInfo=Info for variable... ValueInfo=Inf&o for value... Calculate=&Calculate... SqlTable=&SQL-table... Unselect=&Unselect Partition=Partition... All=&All F2 UndoList=&Undo select TableInfo=Info for &table... SubTableInfo=Info for &subtable... MenuInfo=Info for &menu... ContentsInfo=Info for &contents... Gesmes=&Gesmes/TS... [Labels] Server=Server DSN=Data Source User=User Password=Password Subject=Subject Area Table=Table Variable=Variables Time=Time Contents=Contents Values=Values Responsible=Responsible for the Statistics Official=Official

Page 22: PC-Axis and SQL Databases - Statistiska Centralbyrån · PC-Axis and SQL Databases . PC-Axis can always work with PC-Axis files stored on disk or CD-ROM, ... Server=Database1 . Server1=Database2

SQL 13-22 __________________________________________________________________________

Reference=Reference Updated=Latest Update Footnotes=Footnotes Quality=Quality Information Reftime=Reference Time Unit=Unit Decimals=Decimals Valuesleft=Values left Valueset=Value Sets Groupsval=Aggregates/values Groups=Aggregates Valset=Used values Groupreg=Aggregation Lists General=General Personal=Personal Valuesnonmatch=Not Found NewGroup=Name of new aggregate PresText=Presentation Text UseVal=Value to Use FindVal=Find values for variable FindSel=Condition FoundVal=Found Values: Sorting=Sort Descend=Descending Ascend=Ascending Data=Data: FoundTables=Found in Tables: SaveFile=Save File InDatabase=in PC-AXIS Database Convert=Convert Display=Display CompleteTab=Complete Table PartTab=Part of Table Close=Close Metadata Window ListName=List Name: Domain=Valuepool: Aggreg=Aggregate AggVal=Single values OtherVal=Other values Including=Including Joker=? for wildcard, * for wildcards optSelected=&Selected time periods optLatest=&Only last time period optMoving=&Moving time interval optMovLast=&Fixed start time, moving stop time fraTime=Time Option number=number variable=Variable valuecode=Valuecode for number valuetext=Value name for number sumvariables=Sum variables Codes=Codes Code=Code Text=Text CodeText=Code+text

Page 23: PC-Axis and SQL Databases - Statistiska Centralbyrån · PC-Axis and SQL Databases . PC-Axis can always work with PC-Axis files stored on disk or CD-ROM, ... Server=Database1 . Server1=Database2

SQL 13-23 __________________________________________________________________________

EmptyTable=Empty table ShowTable=Show table SaveTable=Save table in database or convert AfterRetr=After retrieval RegVer=Register/Version DBMatrix=Database/Matrix Register=Register Version=Version Database=Database DataMatrix=Datamatrix Description=Description Definition=Definition Source=Source Heading1=Variable order stub (rows) and heading (columns) Heading2=Mark the variable which is to be the first in heading MaxVar=Select max 15 variables Metabase=Metabase optMacro=&Macro Description optMicro=M&icro Description MetaStore=Metadata CalcText=Calculate with SqlSave=Save as SQL-table Replace=Replace if table already exists AddTo=Add if table already exists Abort=Abolish if table already exists Tablename=Table name CalculVar=Select factor SaveQuery=File name and directory VarOrder=Variable order SelCodetext=Select if variable values shown as codes only, as texts or both codes and texts Parttext=Part texts Partstart=Start Partlength=Length PartElim=Elimination should be allowed Sparse=Treat as sparse Sparsetext=The table is estimated to contain a large number of zero cells DepVar=Depending Variables DepVarAll=All starting with the same code Parttable=Subtable Product=Product Overlap=Allow overlapping MenuSel=Menu select Id=Id Status=Status Text=Text TimePeriods=Time periods Cellnote=indicates that footnote is cellnote continuepxq=Retrieve and start recording for edit and calculate NewDsn=Select server for new datasource prodmetabase=Production metabase extmetabase=External metabase other=Other AllValues=All values for this variable AllValuesSelect=Mark to select all values, which exist at time of retrieval optPxs=PXS in ini file format

Page 24: PC-Axis and SQL Databases - Statistiska Centralbyrån · PC-Axis and SQL Databases . PC-Axis can always work with PC-Axis files stored on disk or CD-ROM, ... Server=Database1 . Server1=Database2

SQL 13-24 __________________________________________________________________________

optXml=PXS in XML format (test) hierarchy=Hierarchy hierarchyTot=Full Hierarchy hierarchy1=Level 2 hierarchy2=Level 3 hierarchy3=Level 4 hierarchyLast=Last level [Texts] Database=SDB TimeScale=Timescale Regular=Regular Footnote=Footnote for NoFootnote=No footnote for OblFootnote=Mandatory note for ReqFootnote=Note on request for NoOblFoot=No mandatory footnote for NoReqFoot=No footnote on request for Value=value Variable=variable Time=time Contents=contents Yes=Yes No=No Stock=Stock Flow=Flow Average=Average Groupbase=Aggregation list based on Reading=Extracting data CheckFoot=Checking footnotes CheckMeta=Checking metadata By=by Type=Type Codedepending=Code dependant TablestatusEx=Explanation: TablestatusU=Updated but not published TablestatusM=Only metadata TablestatusI=Internal TablestatusP=Private Selected=Selected Of=of NoOfTables=No of tables [Statustext] Cancel=Close metadata window Class=Select values, value sets, aggregates for current variable Code=Change between code, text and code+text for values English=Change language for the retrieval from the database Info=Show information for selected material OK=Selection ready, read data and create a PC-AXIS file PartTable=Select a part of the table from a menu of subtables MainTable=Return to the complete table SaveQuery=Save the selection in a file Search=Search for tables with specific variables, contents or values UndoClass=Undo the classification performed for selected variable UseQuery=Use a previously saved selection

Page 25: PC-Axis and SQL Databases - Statistiska Centralbyrån · PC-Axis and SQL Databases . PC-Axis can always work with PC-Axis files stored on disk or CD-ROM, ... Server=Database1 . Server1=Database2

SQL 13-25 __________________________________________________________________________

Zoom=Enlarge the active (blue framed) listbox Unzoom=Return to normal size All=Select all values for the active variable InfoValue=Show information for the selected value InfoVar=Show information for the selected variable [PXBATCH] Options=Options Savebase=Save Database: Logfile=Log File: Createfile=Create file: Queryfile=Query File: Updatedat=Update Database Updatedat99=Year 1999 database format HTMLlist=Web List of Contents Replace=Replace if file already exists SQLTables=SQL-tables Readlist=Select list... HTMLonly=Only web list of contents will be created Servermiss=Enter server name Usermiss=Enter user name Passwordmiss=Enter password Querymiss=Enter name of query file Outnamemiss=Enter name of output file Nonexist=File does not exist Outputmiss=File name missing Outpxerr=The PC-Axis file must have extension .px DBmiss=Catalogue for Save database missing Logmiss=Name of log file missing NonAuth=The user SCB cannot create sql-tables Userret=User or password is wrong Serverret=Cannot log on to server Logonret=Error at login: LogonOK=Log in done process=processing HTMLcreate=Creating Web file CreateReady=File has been created Logoff=Logging off NameOptions=Select SameName=Same name as file PromptName=Prompt for name TableName=Table name ExistOptions=Select NoChangeSQL=Abort if table already exists ReplaceSql=Replace if table already exists AddSql=Add to existing table Sqldatabase=Sql-database Valuetexts=Select Codeonly=Only codes TextQuery=Value text as in query Tablemiss=Table name missing DriveErr=Error when changing drive: Nofile=The file does not exist Validname=The specified name is not correct

Page 26: PC-Axis and SQL Databases - Statistiska Centralbyrån · PC-Axis and SQL Databases . PC-Axis can always work with PC-Axis files stored on disk or CD-ROM, ... Server=Database1 . Server1=Database2

SQL 13-26 __________________________________________________________________________

7. Saved query Because large retrievals can take a long time and there often is a need to make the same retrieval every month, quarter or year, when new time periods are added, it is possible to save a query in PC-Axis sql interface. Such a saved query is stored in a file with extension .pxs and looks like this: See Chapter 14 for details.

7. PX-Batch A saved query of type pxs can be used in PX-Batch. The only information the user needs to give is where the saved query is to be found and where the PC-Axis file is to be written. If the user has a lot of saved queries he can make a pxt file and list all files in this. That enables him to just select the pxt file in PX-Batch instead of selecting all the pxs files. Example of a pxt file: L:\SOS97\SPARFR\AM0401B1.PXS L:\SOS97\SPARFR\AM0401B3.PXS L:\SOS97\SPARFR\AM0401B4.PXS More in chapter 14.