CREATE DATABASE IF NOT EXISTS SampleDBTutorials; DROP FUNCTION IF EXISTS SampleDBTutorials.dbo.WeblogsView; //TVF WeblogsView ...

CREATE DATABASE IF NOT EXISTS SampleDBTutorials;

DROP FUNCTION IF EXISTS SampleDBTutorials.dbo.WeblogsView;

//TVF WeblogsView in durch Leerzeichen getrennten Websiteprotokolldaten erstellen
CREATE FUNCTION SampleDBTutorials.dbo.WeblogsView()
RETURNS @result TABLE
(
    s_date DateTime,
    s_time string,
    s_sitename string,
    cs_method string, 
    cs_uristem string,
    cs_uriquery string,
    s_port int,
    cs_username string, 
    c_ip string,
    cs_useragent string,
    cs_cookie string,
    cs_referer string, 
    cs_host string,
    sc_status int,
    sc_substatus int,
    sc_win32status int, 
    sc_bytes int,
    cs_bytes int,
    s_timetaken int
)
AS
BEGIN

    @result = EXTRACT
        s_date DateTime,
        s_time string,
        s_sitename string,
        cs_method string,
        cs_uristem string,
        cs_uriquery string,
        s_port int,
        cs_username string,
        c_ip string,
        cs_useragent string,
        cs_cookie string,
        cs_referer string,
        cs_host string,
        sc_status int,
        sc_substatus int,
        sc_win32status int,
        sc_bytes int,
        cs_bytes int,
        s_timetaken int
    FROM @"{0}"
    USING Extractors.Text(delimiter:' ');

END;
English
English (United States)
Deutsch (Deutschland)
German (Germany)
Español (España)
Spanish (Spain)
Français (France)
French (France)
日本語
Japanese
한국어
Korean
Русский
Russian