1

Topic: What not so?

Tell please;

SELECT
a. UniqueId;
a. StartDate;
a. EndDate;
b.dats
FROM dbo. Appointments a
left join (select id, dats from dbo.f_datsIntervalGant (a. UniqueId, a. StartDate, a. EndDate)) b on a. UniqueId=b.id
 Msg 4104, Level 16, State 1, Line 7
It was not possible to anchor the composite identifier "a. UniqueId".
Msg 4104, Level 16, State 1, Line 7
It was not possible to anchor the composite identifier "a. StartDate".
Msg 4104, Level 16, State 1, Line 7
It was not possible to anchor the composite identifier "a. EndDate". 

Thankful in advance.

2

Re: What not so?

vah;
All. So it is impossible

3

Re: What not so?

Your variant probably

OUTER APPLY dbo.f_datsIntervalGant (a. UniqueId, a. StartDate, a. EndDate) b

4

Re: What not so?

vah wrote:

Tell please;

SELECT
a. UniqueId;
a. StartDate;
a. EndDate;
b.dats
FROM dbo. Appointments a
left join (select id, dats from dbo.f_datsIntervalGant (a. UniqueId, a. StartDate, a. EndDate)) b on a. UniqueId=b.id
 Msg 4104, Level 16, State 1, Line 7
It was not possible to anchor the composite identifier "a. UniqueId".
Msg 4104, Level 16, State 1, Line 7
It was not possible to anchor the composite identifier "a. StartDate".
Msg 4104, Level 16, State 1, Line 7
It was not possible to anchor the composite identifier "a. EndDate". 

Thankful in advance.

Table valued functions "join-jatsja" through corss/outer apply

SELECT
a. UniqueId;
a. StartDate;
a. EndDate;
b.dats
FROM dbo. Appointments a
outer apply dbo.f_datsIntervalGant (a. UniqueId, a. StartDate, a. EndDate) b
--where a. UniqueId=b.id is most likely superfluous, you UniqueId in function in parameter transfer

5

Re: What not so?

msLex;

wrote:

Table valued functions "join-jatsja"

it is very short and it is not correct

6

Re: What not so?

TaPaK wrote:

msLex;
it is passed...
Very shortly and not correctly

It is very torn

7

Re: What not so?

msLex wrote:

it is passed...
It is very torn

Who me  a table valued function without parameters  tables apply? You?

8

Re: What not so?

TaPaK wrote:

it is passed...
Who me  a table valued function without parameters  tables apply? You?

I will not force you, of course, (what for?), but cross apply on a table valued function independent from "the adjacent table" it is similar with cross join at connection of tables.

9

Re: What not so?

msLex wrote:

it is passed...
I will not force you, of course, (what for?), but cross apply on a table valued function independent from "the adjacent table" it is similar with cross join at connection of tables.

I.e. join it is possible also you wrote heresy. Apprx.

10

Re: What not so?

TaPaK wrote:

i.e. join it is possible

It will be equivalent apply th

wrote:

and you wrote heresy

Charm, it is direct sacred inquisition.
Still something about heterodoxy write

11

Re: What not so?

msLex;
Not, I only about delirium, think somehow, the main thing in masses do not carry

12

Re: What not so?

TaPaK wrote:

Not, I only about delirium, think somehow, the main thing in masses do not carry

Thanks, but I will decide that "to carry in masses".