Skip to content
Advertisement

Tag: stored-procedures

How to not retrieve duplicate row due to stored procedure

I’ve been using my stored procedure to retrieve events filter by : a date start, a date end, a shopId, a sellerId and customerId. First of all, here the principal structure of my database which causes me the problem : Ticket: Id Reference .. .. 15222 BOOKING56654 .. .. Seller : Id Name .. .. 41 Caty .. .. 47

Stored Procedure not working with variables

I have a stored procedure as follows: When I run the above by passing the search variable as 04029125070527 I get no results. But if I edit my stored procedure as follows, I get a result. The only difference is in the above I’m trying to send the variable and in the second its hard coded (not what I want

Divide by zero error encountered error. Null value is eliminated by an aggregate or other SET operation

In this specific part of a SP I’m trying to create, I’m getting an error: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Divide by zero error encountered. Additional error <2>: ErrorMsg: [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]Warning: Null value is eliminated by an aggregate or other SET operation., SqlState: 01003, NativeError: 8153 I believe this is because I’m trying to

Advertisement