Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for table value parameters (TVPs) [CORE2079] #2514

Open
firebird-automations opened this issue Sep 12, 2008 · 3 comments
Open

Support for table value parameters (TVPs) [CORE2079] #2514

firebird-automations opened this issue Sep 12, 2008 · 3 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @cincuranet

Is duplicated by CORE2549

Votes: 2

MSSQL2k8 introduced neat feature called TVP. It's simply ability to put into variable rows and the work with it. This is extremely useful when you want to pass into and process more rows in SP.

Example:
create type testRow as table (id int, s nvarchar(200), y datetime);

create procedure testSP(@Row testRow READONLY)
as
begin
select id + 1, s from @Row;
end

declare @myrow testRow;
insert into @myrow values (10, 'abc', CURRENT_TIMESTAMP);
insert into @myrow values (11, 'abc', CURRENT_TIMESTAMP);
exec testSP @myrow;

@firebird-automations
Copy link
Collaborator Author

Modified by: @cincuranet

description: MSSQL2k8 introduced neat feature called TVP. It's simply ability to put into variable rows and the work with it. This is extremely useful when passing more rows into SP.

Example:
create type testRow as table (id int, s nvarchar(200), y datetime);

create procedure testSP(@Row testRow READONLY)
as
begin
select id + 1, s from @Row;
end

declare @myrow testRow;
insert into @myrow values (10, 'abc', CURRENT_TIMESTAMP);
insert into @myrow values (11, 'abc', CURRENT_TIMESTAMP);
exec testSP @myrow;

=>

MSSQL2k8 introduced neat feature called TVP. It's simply ability to put into variable rows and the work with it. This is extremely useful when you want to pass and process more rows in SP.

Example:
create type testRow as table (id int, s nvarchar(200), y datetime);

create procedure testSP(@Row testRow READONLY)
as
begin
select id + 1, s from @Row;
end

declare @myrow testRow;
insert into @myrow values (10, 'abc', CURRENT_TIMESTAMP);
insert into @myrow values (11, 'abc', CURRENT_TIMESTAMP);
exec testSP @myrow;

@firebird-automations
Copy link
Collaborator Author

Modified by: @cincuranet

description: MSSQL2k8 introduced neat feature called TVP. It's simply ability to put into variable rows and the work with it. This is extremely useful when you want to pass and process more rows in SP.

Example:
create type testRow as table (id int, s nvarchar(200), y datetime);

create procedure testSP(@Row testRow READONLY)
as
begin
select id + 1, s from @Row;
end

declare @myrow testRow;
insert into @myrow values (10, 'abc', CURRENT_TIMESTAMP);
insert into @myrow values (11, 'abc', CURRENT_TIMESTAMP);
exec testSP @myrow;

=>

MSSQL2k8 introduced neat feature called TVP. It's simply ability to put into variable rows and the work with it. This is extremely useful when you want to pass into and process more rows in SP.

Example:
create type testRow as table (id int, s nvarchar(200), y datetime);

create procedure testSP(@Row testRow READONLY)
as
begin
select id + 1, s from @Row;
end

declare @myrow testRow;
insert into @myrow values (10, 'abc', CURRENT_TIMESTAMP);
insert into @myrow values (11, 'abc', CURRENT_TIMESTAMP);
exec testSP @myrow;

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

Link: This issue is duplicated by CORE2549 [ CORE2549 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant