Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2004-01-14 : 07:57:16
|
| Ken writes "I'd like to create a text file with xml data and yet my problem is that I want to increment one field in that from a set point of values - say 1000 to 2000. This is the following data and the field is the "TransactionAmount". Can you help me with this statement?<RECORD type="010"> <FIELD name="Bank">Main</FIELD> <FIELD name="AccountNumber">9900000001</FIELD> <FIELD name="AccountType">01</FIELD> <FIELD name="AccountStatus">OPEN</FIELD> <FIELD name="Currency">840</FIELD> <FIELD name="TransactionAmount" sqlType="DECIMAL">1000</FIELD> <FIELD name="PreviousBalance" sqlType="DECIMAL">23538</FIELD> <FIELD name="NewBalance" sqlType="DECIMAL">24538</FIELD></RECORD>" |
|
|
AndrewMurphy
Master Smack Fu Yak Hacker
2916 Posts |
Posted - 2004-01-14 : 10:19:40
|
| XML is just a complication to yourt problem....ans is really a presentation/output issue....Your key problem is incrementing a field between 2 consecutative records in your output result set...there are solutions to similar problems here...search for "tally table" + "row numbers"you should be able to find what will work for you amongst the returned answers....(and along the way learn some more SQL)Also....showing us some sample, ddl, input data and expected results (using more than 1 record)....will advance the process. |
 |
|
|
|
|
|