Thursday, September 09, 2010 Register
XLeratorDB/engineering Online Documentation
IMSUM_q
No Comments Yet
 
Updated: 01 March 2009 

Use wct.IMSUM_q to return the sum of a dataset of complex numbers in x + yi or x + yj text format. The sum of 2 complex numbers is computed as:
 
IMSUM_q
Syntax
SELECT [wctEngineering].[wct].[IMSUM_q] (
   <@IMValues_RangeQuery, nvarchar(4000),>)
Arguments
@IMValues_RangeQuery
the select statement, as text, used to determine the complex numbers to be used in the IMSUM_q calculation.
Return Types
varchar(4000)
Remarks
·         Use COMPLEX to convert real and imaginary coefficients into a complex number.
·         For simpler queries consider using the IMSUM function.
Examples

create
table #s1 (inumber varchar(50))
insert into #s1 values ('2+i')
insert into #s1 values ('2-i')
insert into #s1 values ('3+2i')
insert into #s1 values ('3-2i')

select
wct.imsum_q('select inumber from #s1')

This produces the following result
------------------------
10
 
(1 row(s) affected)


select
wct.IMADD(wct.IMADD('2+i','2-i'), wct.IMADD('3+2i','3-2i'))

This produces the following result
------------------------
10
 
(1 row(s) affected)


  Comments

 |  View Topic History  |
Print  
Privacy StatementTerms Of UseCopyright 2010 WestClinTech LLC

BorderBoxedGrayBoxedGreenBlue Small width layoutMedium width layoutMaximum width layoutMaximum textMedium textSmall textBack Top!