Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
347 views

I am trying to pass a table valued parameter from Python to SQL Server query. This is my table value that I want pass as a param. table_values = [ 'table_type_name', 'dbo', (1,...
Himanshu's user avatar
-1 votes
1 answer
89 views

I am trying to use sql server's MERGE command. However, I am not sure, how do we pass it as a parameter using Java. I am setting up SqlParamSource as private SqlParameterSource ...
Ayush's user avatar
  • 19
-1 votes
2 answers
78 views

I have a stored procedure that takes a DataTable (of int Ids) as a parameter. I perform an update using the datatable. After doing this I would like to add a further conditional update, which may ...
MRB's user avatar
  • 65
0 votes
0 answers
48 views

I am writing a simple ETL. The source is a spreadsheet. The destination is a SQL Server table. The data are integers and strings. I would like to pass all of the data at once to SQL Server through a ...
Daniel 'Dang' Griffith's user avatar
0 votes
0 answers
104 views

I want to pass an array to a Table Valued Parameter in a MSSQL Stored Procedure using PHP PDO Drivers. I am getting an error: Uncaught PDOException: SQLSTATE[IMSSP]: An invalid type for parameter 8 ...
Vikas Gopalani's user avatar
1 vote
1 answer
540 views

I am trying to call a stored procedure with sqlalchemy to a microsoft sql server. The procedure takes a custom table valued parameter and returns back multiple tables. The only way to send a TVP i ...
user23449623's user avatar
-2 votes
1 answer
291 views

I have a table called Student sno Name Course Fee Section 1 AAA BCA 10000 A 2 BBB BCom 9000 B 3 CCC BTech 12000 B I created a temp table ...
user3625533's user avatar
0 votes
0 answers
329 views

I would like to implement list of dict data to be loaded into SQL Server DB using pytds tablevalueparams tvp in my python code. \ I tried below mentioned code and it's not working as expected. def ...
RSG's user avatar
  • 31
-1 votes
1 answer
475 views

I am new to pytds. Facing TypeError: not enough arguments for format string issue while inserting data into SQL Server. Issue I am getting is: Traceback (most recent call last): File "c:/Users/...
RSG's user avatar
  • 31
3 votes
1 answer
754 views

I'm getting an exception because the ids are a string ex. '(1,2)' I need it be comma separated but not a string, otherwise I get an exception saying: Exception Message: Conversion failed when ...
chuckd's user avatar
  • 14.8k
1 vote
2 answers
1k views

How can I create a Table-Valued User-Defined Function in SQL Server that takes an input parameter for an IN clause? I'm trying to write this very simple function: CREATE FUNCTION dbo....
Hydraxize's user avatar
  • 191
0 votes
0 answers
182 views

I need to create a function that get 2 string and a table parameters to store them i a table like that create table Result( Id NUMBER GENERATED BY DEFAULT AS IDENTITY, RefCode VARCHAR2 (10), ...
gt.guybrush's user avatar
  • 1,418
0 votes
0 answers
181 views

I've created a test table, then a Type Table and then a SP: CREATE TABLE prueba ( id int IDENTITY, datos varchar (20), nums NUMERIC (10,2) CONSTRAINT PK_PRUEBA PRIMARY KEY (id) ) ...
Juan Pablo Humani's user avatar
0 votes
1 answer
98 views

I use the user-defined table parameter to track the keyed in values and pass it to a stored procedure. Syntax works fine. No problem with it. Question: Does it creates multiple instances at the same ...
Van2k's user avatar
  • 31
0 votes
1 answer
885 views

I have an input TVP @_inputTvp TableType Readonly and local variable declare @_localVar varchar I know how to insert TVP to a table, and variable value to a table. But now I have 2 source of data (...
Haze's user avatar
  • 3
0 votes
0 answers
275 views

I want to call a MSSQL Stored Procedure from Python which takes table value as a parameter, and which was earlier triggered from API by passing   { "data": [{"xyz": 340, ...
Ankit Singh's user avatar
0 votes
1 answer
286 views

Edit: one of the comments mentions "misuse" of parentheses around the parameter. I'm attaching a screen-capture of the Microsoft documentation page showing those parentheses; and my stored ...
Tim's user avatar
  • 8,990
0 votes
1 answer
716 views

In a SQL Server stored procedure, can I use two separate columns from a table-valued parameter (TVP) in both the CASE and WHERE clauses? In my TVP, I have two columns like so: CREATE TYPE tt_Index AS ...
Craig's user avatar
  • 31
0 votes
1 answer
93 views

I am trying to update a table using table type parameter. Currently I am using the below query. But I would like to perform update in batches having batch size as one of the parameters. Kindly help. ...
Gladstone Jaffrey's user avatar
0 votes
0 answers
746 views

I'm using ASP.NET MVC Framework and SQL Server for this one. I have created a table type which will have the list of ids coming from a variable in C# CREATE TYPE [dbo].[RespondentTypeTable] AS TABLE ( ...
Ankit Das's user avatar
0 votes
1 answer
26 views

My ORDER BY clause works differently. If I am using a SELECT statement with ORDER BY everything is fine, all is sorted as i want. But if I use TABLE-VALUED FUNCTION with the exact same SELECT ...
ricarderobl's user avatar
-1 votes
1 answer
526 views

Using Microsoft Query I'm trying to setup a sql data source for an Excel pivot table, specifically when the sql contains a table valued function. The sql shown in the picture below is how it ...
TeleJim's user avatar
  • 317
0 votes
0 answers
396 views

I have a stored procedure which receives multiple table-type parameters and I want to filter the data using those parameters. The problem with that is those parameters can contain no rows and in that ...
Paul Muresan's user avatar
0 votes
1 answer
794 views

I can't seem to figure out why I can't get my code below working. I confirmed that my DataTable has records when calling the stored procedure, however the actual table-valued parameter that arrives at ...
kdubbers's user avatar
0 votes
2 answers
1k views

I have two user defined data tables in stored Procedure for inserting the list of projectid's and AccountId's. From C# I am sending the list of values but only one list will go at a time and another ...
anil websyn's user avatar
0 votes
0 answers
45 views

I'm sorry it's my first time working with functions on SQL. I'm using liveSQL.oracle.com to do homework. But I can't seem to work. CREATE TABLE Customer_T (CustomerID NUMBER(4) ...
War Ris's user avatar
1 vote
1 answer
475 views

I am trying to established a Function to have multiple parameters as see below @SITENAME, @MARKET and @DATE. ALTER FUNCTION [dbo].[Platform_Parser] ( @SITENAME NVARCHAR(2000) NULL ,@MARKET ...
James's user avatar
  • 11
1 vote
1 answer
749 views

I have ASP .NET Web Form application with SignalR handling online notifications. Somewhere down the road of simplifying the code, I ran into an issue when stored procedure accepting whole table of ...
David Skoda's user avatar
0 votes
1 answer
461 views

I'm trying to send Multiple Tvps to the procedure using npm i mssql exports.createNewApplication = async (req, res) => { try { const ServidorConfig = serverConfig(); const applicationTable = new ...
JokerStyle's user avatar
1 vote
1 answer
791 views

I will pass a table-valued input parameter into a stored procedure, and also a variable that contains query string, so I made my sproc like this. CREATE PROCEDURE [dbo].[SP_SelectData_View] ( @...
stucknubie's user avatar
0 votes
1 answer
362 views

I have a stored procedure like this: CREATE PROCEDURE [dbo].[GetInventoryData] @supplierId UNIQUEIDENTIFIER, @numbers dbo.ListNumbers READONLY, @locations dbo.ListLocations READONLY AS ...
minhhungit's user avatar
0 votes
0 answers
239 views

Is there a way to use SQL Server table-valued parameters in Entity Framework in a way that doesn't require you to use a stored procedure or string-based queries like context.Database....
UserControl's user avatar
  • 15.3k
0 votes
1 answer
210 views

Please, could you give me some tips for my problem with table valued function in SQL? I am designing Windows Forms app in C#, Visual Studio and I am using Entity Framework to join SQL database. I've ...
Frantisek's user avatar
2 votes
0 answers
233 views

Is it possible in R (as in other languages) to do this with R-database-functionality: my database contains stored procedures which use user-defined types (UDT, especially table-types) for some ...
doriangray's user avatar
1 vote
1 answer
2k views

I have a stored procedure which uses a table valued parameter (tvp). In my application, I use a datatable as a SqlParameter to match the tvp structure. The problem is that it sometimes takes 25 ...
Conorou's user avatar
  • 31
0 votes
0 answers
547 views

If I switch out the @GameIds table variable with the #GameIds temp table in the bottom query I get a full table scan on some tables, making a longer execution time, and large memory grant warning. I ...
Mike Flynn's user avatar
  • 23.4k
0 votes
1 answer
279 views

I have three table valued parameters passed into an SP. These all contain data to filter a query. I want to join them to a table as below but only if there is data in a table valued parameter ...
Richard Watts's user avatar
-1 votes
1 answer
2k views

I am trying to create a stored procedure to which is passed a TVP and then some data from the TVP is inserted into two tables. I have already implemented the stored procedure, but only the second ...
Martunis99's user avatar
0 votes
1 answer
973 views

In C#, for Table-valued parameter I add a SqlParameter with 'SqlDbType' as 'Structured' and 'Value' as a C# DataTable. I want to extract this data later in my code. I want to verify if the SqlDbType/...
Sini's user avatar
  • 3
0 votes
1 answer
2k views

I'm afraid the answer to this is "NO, you can't", but since I can't find this explained anywhere I'm gonna ask anyway. Given a user defined table type: CREATE TYPE MyType AS TABLE( [Id] ...
Abel's user avatar
  • 57.5k
0 votes
1 answer
3k views

I am calling an API and moving the data from json to sql. When I try to post to sql I get this error: Pyodbc Error "A TVP's rows must be Sequence objects.", 'HY000' Here is my SQL Statement ...
Roberto Gonzalez's user avatar
4 votes
1 answer
3k views

The following query will return a list of all table-valued functions in a database and a list of their output columns (and column data types). USE DATABASENAME GO SELECT rc.* FROM INFORMATION_SCHEMA....
ImaginaryHuman072889's user avatar
0 votes
0 answers
1k views

As part of my development activity in project I need to update or insert the output table. I am trying to pass a DF as table valued parameter in store procedure. By using a stored procedure, I want to ...
smilepet's user avatar
1 vote
1 answer
691 views

CREATE TABLE EAddressDetails (EAddress varchar(100) NULL)) CREATE TYPE EAddressList AS TABLE (Email VARCHAR(100))) CREATE PROCEDURE EAddresses_InsertBatch @EAddressBatch [EAddressList] READONLY AS ...
user3636388's user avatar
0 votes
0 answers
36 views

So I have a stored procedure in which I pass user defined table type parameter from my C# web application. I pass thousands of them. Now within the stored procedure I modify this data a bit and so I ...
Pawan Nogariya's user avatar
0 votes
1 answer
469 views

I'm working on unix/rhel7 system. I have installed require drivers for FreeTDS, unixODBC and pyodbc.Other query is working fine but when I'm trying execute stored proc with TVP (table valued parameter)...
user11853415's user avatar
2 votes
1 answer
2k views

In C# I'm trying to pass a DataTable as a parameter to an SQL statement. The code I have is below: protected virtual void DoDeleteRecords(List<Guid> ids) { if (ids.Count > 0) { ...
John P's user avatar
  • 349
1 vote
2 answers
840 views

I built a wrapper function that currently just calls another table-valued Function but it just added a huge amount to the execution time as Client processing time. Is there a faster way to do this? ...
user6788933's user avatar
0 votes
1 answer
290 views

I have 2 queries that are essentially the same (at least if I didn't miss something). DECLARE @siloIds SiloIdsTableType INSERT INTO @siloIds VALUES (1),(2),(3) -- Query 1 SELECT * FROM [Transaction] ...
Ilya Chernomordik's user avatar
0 votes
0 answers
431 views

We have a stored procedure which calls a table valued function like this DECLARE @PID INT DECLARE @PCost DECIMAL(30,15) SELECT @ID = PID, @PCost = Cost FROM [dbo].[myfunction] (@param1, @param2) ...
Prany's user avatar
  • 2,133

1
2 3 4 5
9