sql server table function

Solutions on MaxInterview for sql server table function by the best coders in the world

showing results for - "sql server table function"
Avaline
08 Sep 2016
1.wp-block-code {
2	border: 0;
3	padding: 0;
4}
5
6.wp-block-code > div {
7	overflow: auto;
8}
9
10.shcb-language {
11	border: 0;
12	clip: rect(1px, 1px, 1px, 1px);
13	-webkit-clip-path: inset(50%);
14	clip-path: inset(50%);
15	height: 1px;
16	margin: -1px;
17	overflow: hidden;
18	padding: 0;
19	position: absolute;
20	width: 1px;
21	word-wrap: normal;
22	word-break: normal;
23}
24
25.hljs {
26	box-sizing: border-box;
27}
28
29.hljs.shcb-code-table {
30	display: table;
31	width: 100%;
32}
33
34.hljs.shcb-code-table > .shcb-loc {
35	color: inherit;
36	display: table-row;
37	width: 100%;
38}
39
40.hljs.shcb-code-table .shcb-loc > span {
41	display: table-cell;
42}
43
44.wp-block-code code.hljs:not(.shcb-wrap-lines) {
45	white-space: pre;
46}
47
48.wp-block-code code.hljs.shcb-wrap-lines {
49	white-space: pre-wrap;
50}
51
52.hljs.shcb-line-numbers {
53	border-spacing: 0;
54	counter-reset: line;
55}
56
57.hljs.shcb-line-numbers > .shcb-loc {
58	counter-increment: line;
59}
60
61.hljs.shcb-line-numbers .shcb-loc > span {
62	padding-left: 0.75em;
63}
64
65.hljs.shcb-line-numbers .shcb-loc::before {
66	border-right: 1px solid #ddd;
67	content: counter(line);
68	display: table-cell;
69	padding: 0 0.75em;
70	text-align: right;
71	-webkit-user-select: none;
72	-moz-user-select: none;
73	-ms-user-select: none;
74	user-select: none;
75	white-space: nowrap;
76	width: 1%;
77}CREATE FUNCTION udfProductInYear (
78    @model_year INT
79)
80RETURNS TABLE
81AS
82RETURN
83    SELECT 
84        product_name,
85        model_year,
86        list_price
87    FROM
88        production.products
89    WHERE
90        model_year = @model_year;
91Code language: SQL (Structured Query Language) (sql)