No Transaction Data Returned From getItemSummariesForSite - yodlee

When I add a container based account for DagBank, using the following steps.
addItemForContentService1
startRefresh7
getItemSummaryForItem1
I get back transactions under ItemData>Accounts>BankTransactions
However if I follow the steps to add DagBank via the SiteBased approach, I get back no transactions.
addSiteAccount
startSiteRefresh
getItemSummariesForSite
So this is adding the same test bank account registered with the DagSystem https://dag2.yodlee.com/dag/index.do
The XML Response I get back from getItemSummariesForSite is below, if this helps.
<?xml version='1.0' encoding='utf-8'?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<ns30:getItemSummariesForSiteResponse xmlns:ns30="http://dataservice.dataservice.core.soap.yodlee.com">
<getItemSummariesForSiteReturn>
<elements xmlns:ns6="http://common.soap.yodlee.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="ns6:ItemSummary">
<itemId>10105227</itemId>
<contentServiceId>11195</contentServiceId>
<contentServiceInfo>
<contentServiceId>11195</contentServiceId>
<serviceId>0</serviceId>
<contentServiceDisplayName>DagBank</contentServiceDisplayName>
<organizationId>1148</organizationId>
<organizationDisplayName>Demo Bank</organizationDisplayName>
<siteId>8995</siteId>
<siteDisplayName>DagBank</siteDisplayName>
<custom>false</custom>
<loginUrl>http://dag2.yodlee.com/dag/index.do</loginUrl>
<homeUrl>http://64.14.28.129/dag/index.do</homeUrl>
<registrationUrl>http://dag2.yodlee.com/dag/index.do</registrationUrl>
<passwordHelpUrl>http://dag2.yodlee.com/dag/index.do</passwordHelpUrl>
<contactUrl>http://dag2.yodlee.com/dag/index.do</contactUrl>
<containerInfo>
<containerName>bank</containerName>
<assetType>1</assetType>
</containerInfo>
<isCredentialRequired>true</isCredentialRequired>
<autoRegistrationSupported>false</autoRegistrationSupported>
<autoLoginType>1</autoLoginType>
<geographicRegionsServed>
<elements xsi:type="ns6:GeographicRegion_US">
<country>US</country>
</elements>
<elements>
<country>GLOBAL</country>
</elements>
<elements>
<country>CA</country>
</elements>
</geographicRegionsServed>
<autoPayCardSetupSupported>false</autoPayCardSetupSupported>
<directCardPaymentSupported>false</directCardPaymentSupported>
<directCheckPaymentSupported>false</directCheckPaymentSupported>
<autoPayCardCancelSupported>false</autoPayCardCancelSupported>
<paymentVerificationSupported>false</paymentVerificationSupported>
<supportedAutoPaySetupCardTypeIds />
<supportedDirectPaymentCardTypeIds />
<hasPaymentHistory>false</hasPaymentHistory>
<timeToUpdatePaymentHistory>-1</timeToUpdatePaymentHistory>
<timeToPostDirectCardPayment>25200</timeToPostDirectCardPayment>
<isCSCForDirectPaymRequired>false</isCSCForDirectPaymRequired>
<isCSCForAutoPayRequired>false</isCSCForAutoPayRequired>
<timeZoneId>America/New_York</timeZoneId>
<isIAVFastSupported>true</isIAVFastSupported>
<hasSiblingContentServices>false</hasSiblingContentServices>
<isFTEnabled>true</isFTEnabled>
<isOnlinePaymentSupported>false</isOnlinePaymentSupported>
<autoRegistrationPaperBillSuppressionType>NOT_SUPPRESSED</autoRegistrationPaperBillSuppressionType>
<autoPayCardPaperBillSuppressionType>NOT_SUPPRESSED</autoPayCardPaperBillSuppressionType>
<directCardPaymentPaperBillSuppressionType>NOT_SUPPRESSED</directCardPaymentPaperBillSuppressionType>
<addItemAccountSupported>false</addItemAccountSupported>
<isAddAccountMultiFormAction>false</isAddAccountMultiFormAction>
<isAutoRegistrationMultiFormAction>false</isAutoRegistrationMultiFormAction>
<isAddItemAccountMultiFormAction>false</isAddItemAccountMultiFormAction>
<isSiteCredentialsStored>true</isSiteCredentialsStored>
<isPaymentAmountRequiredForAutopay>false</isPaymentAmountRequiredForAutopay>
<isNumberOfPaymentsRequiredForAutopay>false</isNumberOfPaymentsRequiredForAutopay>
<isFrequencyRequiredForAutopay>false</isFrequencyRequiredForAutopay>
<supportedAutopayFrequencyTypes />
<isConveninceFeeChargedForDirectCardPayment>false</isConveninceFeeChargedForDirectCardPayment>
<conveninceFeeRuleMessage>(Canada)</conveninceFeeRuleMessage>
<isEBillPaymSupprtd>false</isEBillPaymSupprtd>
<isBetaSite>false</isBetaSite>
<isBPAASource>false</isBPAASource>
<isBPAADest>false</isBPAADest>
<supportedBPSRecurringFrequencies />
<checkLeadInterval>-1</checkLeadInterval>
<cardLeadInterval>-1</cardLeadInterval>
<isDirectTransferSupported>false</isDirectTransferSupported>
<isSiblingAutoAdditionSafe>false</isSiblingAutoAdditionSafe>
<defaultHelpText>11195</defaultHelpText>
</contentServiceInfo>
<itemDisplayName>DagBank</itemDisplayName>
<refreshInfo>
<itemId>10105227</itemId>
<statusCode>0</statusCode>
<refreshType>2</refreshType>
<refreshRequestTime>0</refreshRequestTime>
<lastUpdatedTime>1429862378</lastUpdatedTime>
<lastUpdateAttemptTime>1429862378</lastUpdateAttemptTime>
<itemAccessStatus>ACCESS_VERIFIED</itemAccessStatus>
<userActionRequiredType>NONE</userActionRequiredType>
<userActionRequiredCode>0</userActionRequiredCode>
<userActionRequiredSince>2015-04-24T00:51:26.000-07:00</userActionRequiredSince>
<lastDataUpdateAttempt>
<date>2015-04-24T00:59:38.000-07:00</date>
<status>SUCCESS</status>
<statusCode>0</statusCode>
<type>USER_REQUESTED</type>
</lastDataUpdateAttempt>
<lastUserRequestedDataUpdateAttempt>
<date>2015-04-24T00:59:38.000-07:00</date>
<status>SUCCESS</status>
<statusCode>0</statusCode>
<type>USER_REQUESTED</type>
</lastUserRequestedDataUpdateAttempt>
<lastSuccessfulDataUpdate>2015-04-24T00:59:38.000-07:00</lastSuccessfulDataUpdate>
<itemCreateDate>2015-04-24T00:51:26.000-07:00</itemCreateDate>
<nextUpdateTime>1429912235</nextUpdateTime>
<responseCodeType>NONE</responseCodeType>
<retryCount>0</retryCount>
<refreshMode>NORMAL</refreshMode>
</refreshInfo>
<isCustom>false</isCustom>
<isDisabled>false</isDisabled>
<itemData>
<accounts>
<elements xmlns:ns21="http://types.dataservice.core.soap.yodlee.com" xsi:type="ns21:BankData">
<cacheItemId>10105427</cacheItemId>
<isItemAccountDeleted>0</isItemAccountDeleted>
<accountId>10087068</accountId>
<level>0</level>
<accountDisplayName>
<accountNames>
<table>
<key xmlns:s737="http://www.w3.org/2001/XMLSchema" xsi:type="s737:string">SITE</key>
<value xmlns:s738="http://www.w3.org/2001/XMLSchema" xsi:type="s738:string">DagBank</value>
</table>
<table>
<key xmlns:s739="http://www.w3.org/2001/XMLSchema" xsi:type="s739:string">ACCNAME_NICKNAME</key>
<value xmlns:s740="http://www.w3.org/2001/XMLSchema" xsi:type="s740:string">Personal Account</value>
</table>
<table>
<key xmlns:s741="http://www.w3.org/2001/XMLSchema" xsi:type="s741:string">SITE_ACCNAME_NICKNAME</key>
<value xmlns:s742="http://www.w3.org/2001/XMLSchema" xsi:type="s742:string">DagBank - Personal Account</value>
</table>
<table>
<key xmlns:s743="http://www.w3.org/2001/XMLSchema" xsi:type="s743:string">SITE_NICKNAME</key>
<value xmlns:s744="http://www.w3.org/2001/XMLSchema" xsi:type="s744:string">DagBank</value>
</table>
<table>
<key xmlns:s745="http://www.w3.org/2001/XMLSchema" xsi:type="s745:string">SITE_ITEMNICKNAME</key>
<value xmlns:s746="http://www.w3.org/2001/XMLSchema" xsi:type="s746:string">DagBank</value>
</table>
<table>
<key xmlns:s747="http://www.w3.org/2001/XMLSchema" xsi:type="s747:string">SITE_ACCNAME_NICKNAME_INLINE_PATT</key>
<value xmlns:s748="http://www.w3.org/2001/XMLSchema" xsi:type="s748:string">DagBank - Personal Account</value>
</table>
<table>
<key xmlns:s749="http://www.w3.org/2001/XMLSchema" xsi:type="s749:string">ACCNAME</key>
<value xmlns:s750="http://www.w3.org/2001/XMLSchema" xsi:type="s750:string">Personal Account</value>
</table>
</accountNames>
<htmlFormattedAccountName>
<table>
<key xmlns:s751="http://www.w3.org/2001/XMLSchema" xsi:type="s751:string">SITE</key>
<value xmlns:s752="http://www.w3.org/2001/XMLSchema" xsi:type="s752:string"><span class="{0}"><a href= "{1}" title= "{2}"><strong>DagBank</strong></a></span></value>
</table>
<table>
<key xmlns:s753="http://www.w3.org/2001/XMLSchema" xsi:type="s753:string">ACCNAME_NICKNAME</key>
<value xmlns:s754="http://www.w3.org/2001/XMLSchema" xsi:type="s754:string"><span class="{0}"><a href= "{1}" title= "{2}">- Personal Account</a></span></value>
</table>
<table>
<key xmlns:s755="http://www.w3.org/2001/XMLSchema" xsi:type="s755:string">SITE_ACCNAME_NICKNAME</key>
<value xmlns:s756="http://www.w3.org/2001/XMLSchema" xsi:type="s756:string"><span class="{0}"><a href= "{1}" title= "{2}"><strong>DagBank</strong> - Personal Account</a></span></value>
</table>
<table>
<key xmlns:s757="http://www.w3.org/2001/XMLSchema" xsi:type="s757:string">SITE_NICKNAME</key>
<value xmlns:s758="http://www.w3.org/2001/XMLSchema" xsi:type="s758:string"><span class="{0}"><a href= "{1}" title= "{2}"><strong>DagBank</strong></a></span></value>
</table>
<table>
<key xmlns:s759="http://www.w3.org/2001/XMLSchema" xsi:type="s759:string">SITE_ITEMNICKNAME</key>
<value xmlns:s760="http://www.w3.org/2001/XMLSchema" xsi:type="s760:string"><span class="{0}"><a href= "{1}" title= "{2}"><strong>DagBank</strong></a></span></value>
</table>
<table>
<key xmlns:s761="http://www.w3.org/2001/XMLSchema" xsi:type="s761:string">SITE_ACCNAME_NICKNAME_INLINE_PATT</key>
<value xmlns:s762="http://www.w3.org/2001/XMLSchema" xsi:type="s762:string"><span class="{0}"><a href= "{1}" title= "{2}"><strong>DagBank</strong> - Personal Account</a></span></value>
</table>
<table>
<key xmlns:s763="http://www.w3.org/2001/XMLSchema" xsi:type="s763:string">ACCNAME</key>
<value xmlns:s764="http://www.w3.org/2001/XMLSchema" xsi:type="s764:string"><span class="{0}"><a href= "{1}" title= "{2}">- Personal Account</a></span></value>
</table>
</htmlFormattedAccountName>
<SPANCLASS>acctbean</SPANCLASS>
</accountDisplayName>
<itemAccountId>10121523</itemAccountId>
<baseTagDataId>BANK_ACCOUNT:10105427:0:10087068</baseTagDataId>
<refreshTime>1429862378</refreshTime>
<itemDataTableId>10</itemDataTableId>
<itemAccountStatusId>1</itemAccountStatusId>
<isTaxDeductible xsi:nil="1" />
<isBusinessExpense xsi:nil="1" />
<isMedicalExpense xsi:nil="1" />
<isReimbursable xsi:nil="1" />
<includeInNetworth>1</includeInNetworth>
<isAsset xsi:nil="1" />
<defTxnCategoryId xsi:nil="1" />
<isLinkedItemAccount>false</isLinkedItemAccount>
<categoryLevelId xsi:nil="1" />
<isUpdatePastTransaction>false</isUpdatePastTransaction>
<isUpdateTxCategory>true</isUpdateTxCategory>
<createOpeningTxn>true</createOpeningTxn>
<isSeidFromDataSource>1</isSeidFromDataSource>
<isSeidMod>0</isSeidMod>
<acctTypeId>3</acctTypeId>
<acctType>checking</acctType>
<localizedAcctType>fixedDeposit</localizedAcctType>
<srcElementId>23232323</srcElementId>
<individualInformationId xsi:nil="1" />
<bankAccountId>10087068</bankAccountId>
<isDeleted>0</isDeleted>
<lastUpdated>1429862378</lastUpdated>
<hasDetails>0</hasDetails>
<interestRate xsi:nil="1" />
<accountNumber>xxxx3xxx</accountNumber>
<accountHolder>John Thompson</accountHolder>
<tranListToDate />
<tranListFromDate />
<availableBalance>
<amount>754.78</amount>
<currencyCode>USD</currencyCode>
</availableBalance>
<currentBalance>
<amount>644.78</amount>
<currencyCode>USD</currencyCode>
</currentBalance>
<accountName>Personal Account</accountName>
<annualPercentYield xsi:nil="1" />
<maturityDate />
<asOfDate />
<isPaperlessStmtOn>0</isPaperlessStmtOn>
<created>1429861899</created>
</elements>
</accounts>
</itemData>
<itemStatus>0</itemStatus>
<isHeld>0</isHeld>
<isSharedItem>false</isSharedItem>
<isPrepop>false</isPrepop>
<memSiteAccId>10063351</memSiteAccId>
</elements>
</getItemSummariesForSiteReturn>
</ns30:getItemSummariesForSiteResponse>

For getting transactions (irrespective of which approach you are using- container based or site based) you should use executeUserSearchRequest API.
getItemSummariesForSite provides account level details not the transactions.

Related

Is the proposed database schema for a machine test database suitable? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 3 years ago.
Improve this question
I am creating a database to store the results of tests on machines. Is the schema I propose suitable/the best, or am I completely misunderstanding how to structure databases?
There are different types of machines which require different tests.
These tests use 'stock solutions', which are tested and dated to ensure they are suitable for use.
Some machines have a syringe, which is also tested.
All the tests are conducted in well-plates, so I need to record what the value was for a specific well in a particular plate.
I need to record who undertook the test, so I have included a users table.
My current schema is the following:
And in XML:
(I am using the viewer here WWW SQL Designer.)
<?xml version="1.0" encoding="UTF-8"?>
<!-- SQL XML created by WWW SQL Designer, https://github.com/ondras/wwwsqldesigner/ -->
<!-- Active URL: https://ondras.zarovi.cz/sql/demo/ -->
<sql>
<datatypes db="mysql">
<group label="Numeric" color="rgb(238,238,170)">
<type label="Integer" length="0" sql="INTEGER" quote="" />
<type label="TINYINT" length="0" sql="TINYINT" quote="" />
<type label="SMALLINT" length="0" sql="SMALLINT" quote="" />
<type label="MEDIUMINT" length="0" sql="MEDIUMINT" quote="" />
<type label="INT" length="0" sql="INT" quote="" />
<type label="BIGINT" length="0" sql="BIGINT" quote="" />
<type label="Decimal" length="1" sql="DECIMAL" re="DEC" quote="" />
<type label="Single precision" length="0" sql="FLOAT" quote="" />
<type label="Double precision" length="0" sql="DOUBLE" re="DOUBLE" quote="" />
</group>
<group label="Character" color="rgb(255,200,200)">
<type label="Char" length="1" sql="CHAR" quote="'" />
<type label="Varchar" length="1" sql="VARCHAR" quote="'" />
<type label="Text" length="0" sql="MEDIUMTEXT" re="TEXT" quote="'" />
<type label="Binary" length="1" sql="BINARY" quote="'" />
<type label="Varbinary" length="1" sql="VARBINARY" quote="'" />
<type label="BLOB" length="0" sql="BLOB" re="BLOB" quote="'" />
</group>
<group label="Date & Time" color="rgb(200,255,200)">
<type label="Date" length="0" sql="DATE" quote="'" />
<type label="Time" length="0" sql="TIME" quote="'" />
<type label="Datetime" length="0" sql="DATETIME" quote="'" />
<type label="Year" length="0" sql="YEAR" quote="" />
<type label="Timestamp" length="0" sql="TIMESTAMP" quote="'" />
</group>
<group label="Miscellaneous" color="rgb(200,200,255)">
<type label="ENUM" length="1" sql="ENUM" quote="" />
<type label="SET" length="1" sql="SET" quote="" />
<type label="Bit" length="0" sql="bit" quote="" />
</group>
</datatypes>
<table x="863" y="197" name="tests">
<row name="id" null="1" autoincrement="1">
<datatype>INTEGER</datatype>
<default>NULL</default>
</row>
<row name="test_name" null="1" autoincrement="0">
<datatype>INTEGER</datatype>
<default>NULL</default>
</row>
<row name="who" null="1" autoincrement="0">
<datatype>INTEGER</datatype>
<default>NULL</default>
<relation table="users" row="id" />
</row>
<row name="results" null="1" autoincrement="0">
<datatype>INTEGER</datatype>
<default>NULL</default>
<relation table="volumetric_test_results" row="id" />
</row>
<row name="overall_pass" null="1" autoincrement="0">
<datatype>INTEGER</datatype>
<default>NULL</default>
</row>
<key type="PRIMARY" name="">
<part>id</part>
</key>
</table>
<table x="166" y="300" name="test_names">
<row name="id" null="1" autoincrement="1">
<datatype>INTEGER</datatype>
<default>NULL</default>
</row>
<row name="test_name" null="1" autoincrement="0">
<datatype>VARCHAR</datatype>
<default>NULL</default>
</row>
<key type="PRIMARY" name="">
<part>id</part>
</key>
</table>
<table x="1002" y="91" name="machines">
<row name="serial" null="1" autoincrement="1">
<datatype>MEDIUMTEXT</datatype>
<default>NULL</default>
</row>
<row name="part_number" null="1" autoincrement="0">
<datatype>MEDIUMTEXT</datatype>
<default>NULL</default>
<relation table="machine_types" row="part_number" />
</row>
<row name="syringe" null="1" autoincrement="0">
<datatype>INTEGER</datatype>
<default>NULL</default>
<relation table="syringes" row="serial_number" />
</row>
<row name="tests_undertaken" null="1" autoincrement="0">
<datatype>INTEGER</datatype>
<default>NULL</default>
<relation table="tests" row="id" />
</row>
<key type="PRIMARY" name="">
<part>serial</part>
</key>
</table>
<table x="1171" y="17" name="machine_types">
<row name="part_number" null="1" autoincrement="1">
<datatype>MEDIUMTEXT</datatype>
<default>NULL</default>
</row>
<row name="description" null="1" autoincrement="0">
<datatype>MEDIUMTEXT</datatype>
<default>NULL</default>
</row>
<key type="PRIMARY" name="">
<part>part_number</part>
</key>
</table>
<table x="600" y="302" name="volumetric_test_results">
<row name="id" null="1" autoincrement="1">
<datatype>INTEGER</datatype>
<default>NULL</default>
</row>
<row name="plate" null="1" autoincrement="0">
<datatype>INTEGER</datatype>
<default>NULL</default>
<relation table="plates" row="id" />
</row>
<row name="criteria" null="1" autoincrement="0">
<datatype>INTEGER</datatype>
<default>NULL</default>
<relation table="volumetric_test_criteria" row="id" />
</row>
<row name="pass" null="1" autoincrement="0">
<datatype>INTEGER</datatype>
<default>NULL</default>
</row>
<row name="stock_solution" null="1" autoincrement="0">
<datatype>INTEGER</datatype>
<default>NULL</default>
<relation table="stock_solutions" row="id" />
</row>
<key type="PRIMARY" name="">
<part>id</part>
</key>
</table>
<table x="363" y="294" name="volumetric_test_criteria">
<row name="id" null="0" autoincrement="1">
<datatype>INTEGER</datatype>
<default>NULL</default>
</row>
<row name="test_name" null="1" autoincrement="0">
<datatype>INTEGER</datatype>
<default>NULL</default>
<relation table="test_names" row="id" />
</row>
<row name="feature" null="1" autoincrement="0">
<datatype>MEDIUMTEXT</datatype>
<default>NULL</default>
</row>
<row name="criterion" null="1" autoincrement="0">
<datatype>INTEGER</datatype>
<default>NULL</default>
</row>
<row name="volume" null="1" autoincrement="0">
<datatype>INTEGER</datatype>
<default>NULL</default>
</row>
<row name="unit" null="1" autoincrement="0">
<datatype>VARCHAR</datatype>
<default>NULL</default>
</row>
<row name="active" null="1" autoincrement="0">
<datatype>INTEGER</datatype>
<default>NULL</default>
</row>
<row name="use_wells" null="1" autoincrement="0">
<datatype>VARCHAR</datatype>
<default>NULL</default>
</row>
<row name="required_to_pass" null="1" autoincrement="0">
<datatype>INTEGER</datatype>
<default>NULL</default>
</row>
<key type="PRIMARY" name="">
<part>id</part>
</key>
</table>
<table x="1220" y="435" name="wells">
<row name="plate" null="1" autoincrement="0">
<datatype>INTEGER</datatype>
<default>NULL</default>
<relation table="plates" row="id" />
</row>
<row name="well" null="0" autoincrement="0">
<datatype>INTEGER</datatype>
<default>NULL</default>
</row>
<row name="absorbance" null="1" autoincrement="0">
<datatype>DOUBLE</datatype>
<default>NULL</default>
</row>
<key type="PRIMARY" name="" />
</table>
<table x="1217" y="285" name="plates">
<row name="id" null="1" autoincrement="0">
<datatype>INTEGER</datatype>
<default>NULL</default>
</row>
<row name="datetime" null="1" autoincrement="0">
<datatype>DATETIME</datatype>
<default>NULL</default>
</row>
<key type="PRIMARY" name="">
<part>id</part>
</key>
</table>
<table x="623" y="616" name="stock_solutions">
<row name="id" null="1" autoincrement="1">
<datatype>INTEGER</datatype>
<default>NULL</default>
</row>
<row name="plate" null="1" autoincrement="0">
<datatype>INTEGER</datatype>
<default>NULL</default>
<relation table="plates" row="id" />
</row>
<row name="criteria" null="1" autoincrement="0">
<datatype>INTEGER</datatype>
<default>NULL</default>
<relation table="stock_criteria" row="id" />
</row>
<row name="who" null="1" autoincrement="0">
<datatype>INTEGER</datatype>
<default>NULL</default>
<relation table="users" row="id" />
</row>
<row name="pass" null="1" autoincrement="0">
<datatype>INTEGER</datatype>
<default>NULL</default>
</row>
<key type="PRIMARY" name="">
<part>id</part>
</key>
</table>
<table x="398" y="603" name="stock_criteria">
<row name="id" null="1" autoincrement="1">
<datatype>INTEGER</datatype>
<default>NULL</default>
</row>
<row name="mean_square_error" null="1" autoincrement="0">
<datatype>INTEGER</datatype>
<default>NULL</default>
</row>
<row name="slope" null="1" autoincrement="0">
<datatype>INTEGER</datatype>
<default>NULL</default>
</row>
<row name="intercept" null="1" autoincrement="0">
<datatype>INTEGER</datatype>
<default>NULL</default>
</row>
<row name="use_wells" null="1" autoincrement="0">
<datatype>VARCHAR</datatype>
<default>NULL</default>
</row>
<key type="PRIMARY" name="">
<part>id</part>
</key>
</table>
<table x="836" y="47" name="syringes">
<row name="serial_number" null="1" autoincrement="1">
<datatype>INTEGER</datatype>
<default>NULL</default>
</row>
<row name="tests_undertaken" null="1" autoincrement="0">
<datatype>INTEGER</datatype>
<default>NULL</default>
<relation table="syringe_tests" row="id" />
</row>
<key type="PRIMARY" name="">
<part>serial_number</part>
</key>
</table>
<table x="617" y="105" name="syringe_tests">
<row name="id" null="1" autoincrement="1">
<datatype>INTEGER</datatype>
<default>NULL</default>
</row>
<row name="criteria" null="1" autoincrement="0">
<datatype>INTEGER</datatype>
<default>NULL</default>
<relation table="syringe_test_criteria" row="id" />
</row>
<row name="who" null="1" autoincrement="0">
<datatype>INTEGER</datatype>
<default>NULL</default>
<relation table="users" row="id" />
</row>
<row name="pass" null="1" autoincrement="0">
<datatype>INTEGER</datatype>
<default>NULL</default>
</row>
<row name="plate" null="1" autoincrement="0">
<datatype>INTEGER</datatype>
<default>NULL</default>
<relation table="plates" row="id" />
</row>
<key type="PRIMARY" name="">
<part>id</part>
</key>
</table>
<table x="365" y="78" name="syringe_test_criteria">
<row name="id" null="1" autoincrement="1">
<datatype>INTEGER</datatype>
<default>NULL</default>
</row>
<row name="volume" null="1" autoincrement="0">
<datatype>INTEGER</datatype>
<default>NULL</default>
</row>
<row name="unit" null="1" autoincrement="0">
<datatype>INTEGER</datatype>
<default>NULL</default>
</row>
<row name="use_wells" null="1" autoincrement="0">
<datatype>VARCHAR</datatype>
<default>NULL</default>
</row>
<row name="feature" null="1" autoincrement="0">
<datatype>MEDIUMTEXT</datatype>
<default>NULL</default>
</row>
<key type="PRIMARY" name="">
<part>id</part>
</key>
</table>
<table x="711" y="771" name="users">
<row name="id" null="1" autoincrement="1">
<datatype>INTEGER</datatype>
<default>NULL</default>
</row>
<row name="first_name" null="1" autoincrement="0">
<datatype>VARCHAR</datatype>
<default>NULL</default>
</row>
<row name="surname" null="1" autoincrement="0">
<datatype>VARCHAR</datatype>
<default>NULL</default>
</row>
<row name="email" null="1" autoincrement="0">
<datatype>VARCHAR</datatype>
<default>NULL</default>
</row>
<row name="password_hash" null="1" autoincrement="0">
<datatype>VARCHAR</datatype>
<default>NULL</default>
</row>
<row name="role" null="1" autoincrement="0">
<datatype>INTEGER</datatype>
<default>NULL</default>
<relation table="roles" row="id" />
</row>
<key type="PRIMARY" name="">
<part>id</part>
</key>
</table>
<table x="858" y="823" name="roles">
<row name="id" null="1" autoincrement="1">
<datatype>INTEGER</datatype>
<default>NULL</default>
</row>
<row name="role" null="1" autoincrement="0">
<datatype>VARCHAR</datatype>
<default>NULL</default>
</row>
<key type="PRIMARY" name="">
<part>id</part>
</key>
</table>
</sql>
It's very hard to review someone's design in the way you presented. However, I did notice some basic issues:
Your machines table (and others) columns such as tests_undertaken which you indicate is of type int. I don't see how this makes sense. (See below).
You have a tests table, but is that for the "types" of test or specific test runs on specific machines? If it's the former, then you should have a separate table that links the tests table to the machines table that contains a record for each test run on a machine and also links to the test results.
Your test_names table seems unnecessary as there is no additional information provided that doesn't seem to be able to be contained in the volumetric_test_criteria table by simply replacing the name's id with the name itself. The space you save by making the extra table is probably overwhelmed by the overhead of always having to JOIN these two tables.
As others have pointed out, you should read up on database normalization, but I hope this helps get you started.

XSL Sorting Numbers by position of nodes

I want to sort out the values of "number" by the Position/or first come in the XML document of the T.number values and display it. Is there a way to do this?
Here is my XML document
<?xml version="1.0" encoding="UTF-8"?>
<JobList>
<Job ID="2" />
<Job ID="3" />
<Job ID="5" />
<Job ID="4" />
<Job ID="6" />
<Job T.number="28" />
<Job T.number="10" />
<Job T.number="24" />
<Job T.number="75" />
<Job T.number="75" />
<Tool number="10" />
<Tool number="24" />
<Tool number="28" />
<Tool number="75" />
<Tool number="75" />
</JobList>
Desired Result:
<?xml version="1.0" encoding="UTF-8"?>
<JobList>
<Job ID="2" />
<Job ID="3" />
<Job ID="5" />
<Job ID="4" />
<Job ID="6" />
<Tool number="28" />
<Tool number="10" />
<Tool number="24" />
<Tool number="75" />
</JobList>
Here is the XSL document:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" encoding="UTF-8" method="xml" />
<xsl:param name="REPORT">joblist</xsl:param>
<xsl:param name="LOCALE">en-US</xsl:param>
<xsl:param name="FORMAT">html</xsl:param>
<xsl:param name="CAPTURE">example,job</xsl:param>
<xsl:template match="/">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<title>Joblist Report</title>
<style type="text/css">
body {font-family: Arial;}
</style>
</head>
<body>
<xsl:apply-templates />
</body>
</html>
</xsl:template>
<xsl:template match="JobList">
<div>
<table width="100" border="1">
<thead>
<tr>
<td>
<xsl:value-of select="Sorted Numbers" />
</td>
</tr>
</thead>
<tbody>
<xsl:variable name="vsortOrder" select="//Job[#T.number]" />
<xsl:for-each select="Tool">
<xsl:sort select="#number" order="{$vsortOrder}" data-type="number" />
<tr>
<td>
<xsl:value-of select="#number" />
</td>
</tr>
</xsl:for-each>
</tbody>
</table>
</div>
</xsl:template>
</xsl:stylesheet>
UPDATE: I have found an attribute that has the same number order I need. I updated the XML with the attribute. But the XSL still doesnt want to sort it out.
Your desired output looks a lot different than what your actual code would produce. But maybe this will help you. This code will get your desired output. Then you can modify it to be what you actually want.
<!-- Change your for-each loop. -->
<xsl:for-each select="$vsortOrder/#T.number">
<xsl:variable name="tnumber" select="."/>
<xsl:copy-of select="//Tool[#number=$tnumber]"/>
</xsl:for-each>
Or, you could modify your code to do this. Since you are only printing out the number, you do not have to lookup the tool.
<!-- Change your for-each loop. -->
<xsl:for-each select="$vsortOrder/#T.number">
<tr>
<td>
<xsl:value-of select="." />
</td>
</tr>
</xsl:for-each>

T-SQL convert xml field to multi column table

I am trying to convert data from a xml field into a table. I have found multiple solutions on this website, but none of them seem to give me exactly what I need.
The xml looks like this:
<table>
<id>{100}</id>
<rows>
<row>
<columns>
<column name="cur" value="EUR" type="System.String" />
<column name="item" value="Item a" type="System.String" />
<column name="price" value="2.5" type="System.Decimal" />
<column name="qty" value="20" type="System.Int32" />
<column name="Key" value="1" type="System.Int32" />
</columns>
</row>
<row>
<columns>
<column name="cur" value="EUR" type="System.String" />
<column name="item" value="Item b" type="System.String" />
<column name="price" value="30" type="System.Decimal" />
<column name="qty" value="30" type="System.Int32" />
<column name="Key" value="2" type="System.Int32" />
</columns>
</row>
</rows>
<key>Key</key>
</table>
I would like the result to look like this:
id key cur item price qty
100 1 EUR Item a 2.5 20
100 2 EUR Item b 30 30
I hope someone can help me.
Try it like this:
DECLARE #x XML=
'<table>
<id>{100}</id>
<rows>
<row>
<columns>
<column name="cur" value="EUR" type="System.String" />
<column name="item" value="Item a" type="System.String" />
<column name="price" value="2.5" type="System.Decimal" />
<column name="qty" value="20" type="System.Int32" />
<column name="Key" value="1" type="System.Int32" />
</columns>
</row>
<row>
<columns>
<column name="cur" value="EUR" type="System.String" />
<column name="item" value="Item b" type="System.String" />
<column name="price" value="30" type="System.Decimal" />
<column name="qty" value="30" type="System.Int32" />
<column name="Key" value="2" type="System.Int32" />
</columns>
</row>
</rows>
<key>Key</key>
</table>';
SELECT #x.value('(/table/id)[1]','varchar(max)') AS id --are the curly brackets there on purpose?
,Rw.value('(columns/column[#name="Key"]/#value)[1]','int') AS [key]
,Rw.value('(columns/column[#name="cur"]/#value)[1]','varchar(max)') AS cur
,Rw.value('(columns/column[#name="item"]/#value)[1]','varchar(max)') AS item
,Rw.value('(columns/column[#name="price"]/#value)[1]','decimal(10,4)') AS price
,Rw.value('(columns/column[#name="qty"]/#value)[1]','int') AS qty
FROM #x.nodes('/table/rows/row') AS A(Rw)

Remove attribute from nested fields in xml column in sql

After trying many answers about how to delete a field from a xml column in SQL, I can't still manage to find a way to delete the same attribute in multiple fields. Currently my xml column looks something like this:
<ArrayOfCodes xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Code code="001 ">
<price xmlns="http://..." xsi:nil="true" />
<salePrice xmlns="http://..." xsi:nil="true" />
<quantity xmlns="http:/...">1</>
</Code>
<Code code="002 ">
<price xmlns="http://..." xsi:nil="true" />
<salePrice xmlns="http://..." xsi:nil="true" />
<quantity xmlns="http:/...">1</>
</Code>
<Code code="003 ">
<price xmlns="http://..." xsi:nil="true" />
<salePrice xmlns="http://..." xsi:nil="true" />
<quantity xmlns="http:/...">1</>
</Code>
</ArrayOfCodes>
My task is to remove the xmlns attributes in all of the fields. Can you please help me with that?

SQL SERVER XML OUTPUT

I am trying to combine these 3 sql statements to output into one XML statement that outputs like this example:
<dataset seriesName="Model A12" color="A66EDD" >
<set value="35" />
<set value="42" />
<set value="31" />
<set value="28" />
<set value="34" />
<set value="30" />
</dataset>
<dataset seriesName="Model A15" color="F6BD0F">
<set value="22" />
<set value="25" />
<set value="18" />
<set value="22" />
<set value="17" />
<set value="16" />
</dataset>
Here are my SQL Statements:
(SELECT CLAIM_NUM as 'CATEGORY_LABEL' from claim_table)
for xml RAW, TYPE,ROOT('CATEGORY');
(SELECT TOTAL_INCURRED_AMT as 'SET_VALUE' from claim_table)
for xml RAW, TYPE, ROOT('DATASET');
SELECT TOTAL_PAID_AMT as 'SET_VALUE' from claim_table
for xml RAW, TYPE, ROOT('DATASET');
I have been looking at other examples, but nothing has come close to what I need the output to be.
Thanks is advance for your assistance!