cancel
Showing results for 
Search instead for 
Did you mean: 

UDF's in excel not showing - empty columns (SQL native client query)

Former Member
0 Kudos

Hi All,

I am doing excel queries but other than date and hours UDF are empty in SQL native client/excel.... and I need to work on all of them in excel and I can't.

Does anyone know if there is any solution to this SQL/excel problem ?

I already tried giving the UDF a name in query but it didn't help.

Please help, thank you in advance.

Accepted Solutions (0)

Answers (3)

Answers (3)

lovinodo
Explorer
0 Kudos

Hi,

try casting the UDF: CAST(T0.U_z2 As nvarchar(10)) AS 'trans'

Former Member
0 Kudos

example:


SELECT ORDR.DocNum AS 'dok.nr', RDR1.ItemCode AS 'indeks', RDR1.Dscription AS 'opis', 
RDR1.SlpCode AS 'kod.sp', RDR1.Quantity AS 'il.', RDR1.VatPrcnt AS 'VAT', 
RDR1.U_p15 AS 'c.z.n', RDR1.Price AS 'c.s.n', ORDR.U_z2 AS 'trans'

FROM DB01.dbo.ORDR ORDR, DB01.dbo.RDR1 RDR1

WHERE ORDR.DocEntry = RDR1.DocEntry AND ((ORDR.DocNum=?) 
AND (RDR1.ItemCode Not Like '02.P%'))

UDF's > Marketing Documents:

Title: z2

Alphanumeric (10)

Structure: Regular

Title: awizacja_data (this one is displayed properly in excel)

Type: Date/Time

Structure: Date

Rows (this one is displayed properly in excel):

Title: p15

Type: Units and Totals

Structure: Price

Another example is Row UDF Alphanumeric (10) linked to a table that doesn't fetch (or display) anything also.

So it might be that data from alphanumeric UDF's is not fetched (or displayed) to excel..

Edited by: Tomasz Bolesta on Dec 23, 2011 11:51 AM

Former Member
0 Kudos

Is there any way to get the Alphanumeric (10) UDF's to excel ?

Any help would be appreciated.

Thank you,

Tomasz

Former Member
0 Kudos

Try:

SELECT T0.DocNum AS 'dok.nr', T1.ItemCode AS 'indeks', T1.Dscription AS 'opis',

T1.SlpCode AS 'kod.sp', T1.Quantity AS 'il.', T1.VatPrcnt AS 'VAT',

T1.U_p15 AS 'c.z.n', T1.Price AS 'c.s.n', T0.U_z2 AS 'trans'

FROM DB01.dbo.ORDR T0

INNER JOIN DB01.dbo.RDR1 T1 ON T0.DocEntry = T1.DocEntry

WHERE T0.DocNum=[%0\] AND T1.ItemCode Not Like '02.P%'

Former Member
0 Kudos

nope, sadly it's still not getting the U_z2 value in excel (empty column).

Do you have other ideas ?

Thank you,

Tomasz

Former Member
0 Kudos

Have you tried run in B1?

Former Member
0 Kudos

I've tried in B1 and it shows fine... but it was always showing in B1 and in excel its not.

Thank you,

Tomasz

Former Member
0 Kudos

Try a simple query in Excel to see:

SELECT T0.DocNum AS 'dok.nr', T0.SlpCode AS 'kod.sp', T0.U_z2 AS 'trans'

FROM DB01.dbo.ORDR T0

Former Member
0 Kudos

Hi,

Could you post your query here and mention the type of the UDF?

Thanks,

Gordon