HI
In order to get data from my udt i have the following query
select *
, (SELECT TOP 1 CAST(udd.[FieldValue] AS varchar(500))
FROM UserDefinedData udd
, userdefinedfields udf
WHERE udd.[UserDefinedRowId] = udr.[UserDefinedRowId]
AND udd.[UserDefinedFieldId] = udf.[UserDefinedFieldId]
AND udf.[ModuleId] = udr.[ModuleId]
AND udf.[FieldTitle] = 'Ttitle'
) AS [Title]
, (SELECT TOP 1 CAST(udd.[FieldValue] AS varchar(500))
FROM UserDefinedData udd
, userdefinedfields udf
WHERE udd.[UserDefinedRowId] = udr.[UserDefinedRowId]
AND udd.[UserDefinedFieldId] = udf.[UserDefinedFieldId]
AND udf.[ModuleId] = udr.[ModuleId]
AND udf.[FieldTitle] = 'url'
) AS [url]
FROM [userdefinedrows] udr
WHERE udr.[moduleid] = 610
ORDER BY UserDefinedRowId ASC
this gives me the following dataset i can call from another webapp to get the content from there.
The downside of this one is that i need to add a query fro each userdefined field in the udt. Has anyone done this before and is there a better way to do it so that i just can enter a moduleid and get the results back as a usuable dataset
thanks in advance
Armand
UserDefinedRowId ModuleId Title url
4 610 Automatisering Gids Studiereis http:/www.whatever.nl
etc.
Armand Datema
Get my new skin ( lots of design variations [18 headers, 30 titlebars, 30 breadcrumbs, 3 footers ], 50+ typography containers , 50+ page templates and an online theme builder for unlimited skin variations) Aura>
For all your skin conversions
2DNN
Follow me on Twitter