[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
RE: RE: [xsl] SQL SELECT statement in XSLT!!!!!!!!!!!!
Subject: RE: RE: [xsl] SQL SELECT statement in XSLT!!!!!!!!!!!! From: cknell@xxxxxxxxxx Date: Wed, 06 Aug 2003 11:21:51 -0400 |
I would not suggest replacing the speed and ease of joining tables in an RDBMS with an approximation in XSLT. Make your joins and selects in SQL Server, then use XSLT to massage the format into something you like better. The tables you are now working with may not have many rows, but once you get into the habit of doing something a certain way (as you suggest here), it will be very difficult to set that aside when the size of the tables grows and performance becomes an issue. Suck it up and transform the output of SQL Server (however unintuitive or ugly it may be) via XSLT. -- Charles Knell cknell@xxxxxxxxxx - email -----Original Message----- From: "Greg Johnson" <gjohnson@xxxxxxxxxxxx> Sent: Wed, 6 Aug 2003 10:41:37 -0400 To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Subject: RE: [xsl] SQL SELECT statement in XSLT!!!!!!!!!!!! I've been working with MS SQL Server, and have been doing joins in my SQL queries, and have been stuck with some unintuitive element nesting, from MS's "For XML Auto, Elements" switch. Would dumping each table individually, and linking them with XLST as Michel has done be a better idea, given that the file sizes aren't too astronomical? The benefit being not being stuck with weird nesting. Is the performance cost high for that? I'm just wondering what the best practices are for working with XML from SQL. Greg -----Original Message----- From: owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx [mailto:owner-xsl-list@xxxxxxxxxxxxxxxxxxxxxx]On Behalf Of Jeff Beadle Sent: Wednesday, August 06, 2003 8:22 AM To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx Subject: RE: [xsl] SQL SELECT statement in XSLT!!!!!!!!!!!! <WACCTS> <curr_iso><xsl:value-of select="//CURRENCIES[mappings/curr_code=current()//ACCOUNTS/mappings/curr_co de]/mappings/curr_iso"/></curr_iso> </WACCTS> -----Original Message----- From: michel geadah [mailto:m_ace_g@xxxxxxxxxxx] Sent: Wednesday, August 06, 2003 4:40 AM To: XSL-List@xxxxxxxxxxxxxxxxxxxxxx Subject: [xsl] SQL SELECT statement in XSLT!!!!!!!!!!!! I have three tables:ACCOUNTS, WACCTS and CURRENCIES... In ACCOUNTS i have a field CURR_CODE but i do not have CURR_ISO field and In WACCTS i have a field CURR_ISO and In CURRENCIES i have both CURR_CODE and CURR_ISO The tables are represented in XML like this: <ACCOUNTS> <mappings> <curr_code>1234</curr_code> etc </mappings> <mappings> etc </mappings> </ACCOUNTS> <CURRENCIES> <mappings> <curr_code>1234</curr_code> <curr_iso>12</curr_iso> etc </mappings> <mappings> etc </mappings> </CURRENCIES> i want to write this select statement in XSLT: "Select CURR_ISO from CURRENCIES where CURR_CODE(in ACCOUNTS)=CURR_CODE(in CURRENCIES)" AND THE OUTPUT OF THIS SELECT STATEMET I NEED TO PUT IT IN THE CURR_ISO OF WACCTS i am using the ACCOUNTS table as the xml input to the saxon... The WACCTS xml document is my output.(i.e i get the WACCTS xml document from the saxon and fill in the WACCTS table). THX... _________________________________________________________________ MSN 8 helps eliminate e-mail viruses. Get 2 months FREE*. http://join.msn.com/?page=features/virus XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] SQL SELECT statement in X, Greg Johnson | Thread | RE: [xsl] SQL SELECT statement in X, michel geadah |
AW: [xsl] selecting everything belo, Markus Abt | Date | [xsl] Variables, AROSO Jose Antonio |
Month |