|
| Hi!
I have the 4 following fields in my table defined as nvarchar (255) and the
my user defined function.
I want that my user defined function is running in an Access 2002 Project by
double clicking on the inline function.
The User wants to fillout only one Parameter of these four.
For example when he writes in Vorname 'KL' - he wants all firstnames
beginning with KL - the other 3 parameters are equal.
The same is also for the other 3 parameters.
The User should also be able to fill only two or three parameters.
When the user runs the query without any parameter he should get the whole
table.
Can you help me with the right where clause and how I should declare my
table fields, function parameters and initial settings.
I dont not any more understand the difference between char, varchar and
nchar.
Thanks - Fred
CREATE FUNCTION dbo.K10
(@Vorname_ nvarchar (255) = null, ??????
@Hausnummer_ nvarchar (255) = null, ??????
@Name1_ nvarchar (255) = null, ??????
@Sparte_ nvarchar (255) = null)
RETURNS TABLE
AS
RETURN ( SELECT dbo.DATKUN.Sparte, dbo.DATKUN.KundenNr,
dbo.DATKUN.Status, dbo.DATKUN.Vorname, dbo.DATKUN.Name1, dbo.DATKUN.Name2,
dbo.DATKUN.HausNr, dbo.DATKUN.Stiege, dbo.DATKUN.Tür,
dbo.DATKUN.Memo,
dbo.DATKUN.[Info Feld], dbo.DATKUN.[Nachfolge
KundenNr], dbo.DATKUN.PLZ2, dbo.DATKUN.Ort2, dbo.DATKUN.Strasse2,
dbo.DATKUN.HausNr2,
dbo.DATKUN.Stiege2, dbo.DATKUN.Tuer2,
dbo.DATKUN.Zahlungsart, dbo.DATKUN.Kundengruppe, dbo.DATKUN.Beitrittsdatum,
dbo.DATKUN.Anlagedatum, dbo.DATKUN.[Datum letzte
Änderung], dbo.DATKUN.Mahnung, dbo.DATKUN.[Abrechng Rhythmus],
dbo.DATKUN.BLZ,
dbo.DATKUN.Konto, dbo.DATKUN.Gebiet, dbo.DATKUN.[Lösch
Vormerk], dbo.DATKUN.Saldo
FROM dbo.DATKUN
WHERE ?????????
|
|