stored-procedures

Add multiple Dataset programatically for subreports VB.net

倖福魔咒の 提交于 2020-02-23 07:14:11
问题 I have facing problem while showing crystal report with 2 subreports. Both subreports pulling data from stored procedure. All working fine on design time. But at runtime, Crystal Reports has an error saying table not found (second table) and nothing is displayed in reports. This is the similar problem that I want to solve - Crystal Report for Income and Expense wth opening and closing balance This is my code - both stored procedure has a single parameter of datetime type: Dim DOF As Date = #4

Calling stored procedure from node js

不问归期 提交于 2020-02-21 06:33:59
问题 I am using express and I am trying to call LoginMember stored procedure from Azure portal. This is my form from, taken from ejs: <form method="post" action="/available-copies"> <input type="text" placeholder="SSN" name="userssn"> <input type="password" placeholder="Password" name="userpassword"> <input type="submit" value="Login"> </form> This is my post request router.post('/available-copies', function (req, res) { var ssn = req.body.userssn; var password = req.body.userpassword; sql.connect

Calling stored procedure from node js

故事扮演 提交于 2020-02-21 06:32:27
问题 I am using express and I am trying to call LoginMember stored procedure from Azure portal. This is my form from, taken from ejs: <form method="post" action="/available-copies"> <input type="text" placeholder="SSN" name="userssn"> <input type="password" placeholder="Password" name="userpassword"> <input type="submit" value="Login"> </form> This is my post request router.post('/available-copies', function (req, res) { var ssn = req.body.userssn; var password = req.body.userpassword; sql.connect

The query is executing very slowly, is there any way to improve it any further?

一个人想着一个人 提交于 2020-02-19 10:01:20
问题 I have the following query, and because of a lot of SUM function calls, my query is running too slow. I have a lot of records in my database and I would like to get a report from the current year and last year (Last 30 days, Last 90 days and last 365 days) for each one: SELECT b.id as [ID] ,d.[Title] as [Title] ,e.Class as [Class] ,Sum(CASE WHEN a.DateCol >= DATEADD(MONTH,-1,GETDATE()) THEN a.col1 ELSE 0 END) as [Current - Last 30 Days Col1] ,Sum(CASE WHEN a.DateCol >= DATEADD(MONTH,-1

How do I use dynamic SQL to declare a column name derived from a table name?

ぐ巨炮叔叔 提交于 2020-02-08 09:37:09
问题 Building on Tony's answer on this question: If I want to do something like this, CREATE PROCEDURE A(tab IN VARCHAR2) IS tab.col_name <column> --static declaration (column name always remains the same) BEGIN EXECUTE IMMEDIATE 'INSERT INTO ' || tab(col_name) || 'VALUES(123)'; END A; How can I use Dynamic SQL in the above case? 回答1: This example passes in a table name and a column name: CREATE PROCEDURE A ( tab IN VARCHAR2 , col_name IN VARCHAR2 ) IS BEGIN EXECUTE IMMEDIATE 'INSERT INTO ' || tab

How do I use dynamic SQL to declare a column name derived from a table name?

风格不统一 提交于 2020-02-08 09:35:10
问题 Building on Tony's answer on this question: If I want to do something like this, CREATE PROCEDURE A(tab IN VARCHAR2) IS tab.col_name <column> --static declaration (column name always remains the same) BEGIN EXECUTE IMMEDIATE 'INSERT INTO ' || tab(col_name) || 'VALUES(123)'; END A; How can I use Dynamic SQL in the above case? 回答1: This example passes in a table name and a column name: CREATE PROCEDURE A ( tab IN VARCHAR2 , col_name IN VARCHAR2 ) IS BEGIN EXECUTE IMMEDIATE 'INSERT INTO ' || tab

How to set a specific time interval for different work shifts to retrieve data

Deadly 提交于 2020-02-08 09:26:49
问题 I have two working shifts: 8:00:00 to 16:30:00 and 20:00:00 to 06:00:00. I want to create a stored procedure that will retrieve data from an SQL table when I pass the date this are my tables Table1 Emp ID DateTime EmpID 47 2014-12-05 08:00:00 1111 47 2014-12-05 08:25:00 1235 47 2014-12-05 23:55:00 4569 47 2014-12-06 00:00:00 4563 47 2014-12-06 02:00:00 7412 59 2014-12-06 04:00:00 8523 59 2014-12-05 10:30:00 5632 Table2 Product ID DateTime ProductMade 47 2014-12-05 11:00:00 Milk 47 2014-12-05

SqlDataAdapter not filling DataTable

倾然丶 夕夏残阳落幕 提交于 2020-02-08 03:14:25
问题 I am having a problem where a SqlDataAdapter is not filling a DataTable when executing a particular SQL Server stored procedure, despite the fact I have many similar functions executing almost identical stored procedures that all work correctly. Here is the function that runs the stored procedure and returns the filled DataTable ; public DataTable getAssetClassifications(int? pLevel) { // Create dataTable to hold data var dt = new DataTable(); // Initialize connection using (connection = new

SqlDataAdapter not filling DataTable

ぐ巨炮叔叔 提交于 2020-02-08 03:12:47
问题 I am having a problem where a SqlDataAdapter is not filling a DataTable when executing a particular SQL Server stored procedure, despite the fact I have many similar functions executing almost identical stored procedures that all work correctly. Here is the function that runs the stored procedure and returns the filled DataTable ; public DataTable getAssetClassifications(int? pLevel) { // Create dataTable to hold data var dt = new DataTable(); // Initialize connection using (connection = new

How can I set Stream Analytics Output as Stored Procedure

寵の児 提交于 2020-02-08 02:31:31
问题 How can I add Stored Procedure as Analytics Output More simply how can I send my analytics result to sp parameter 回答1: how can I send my analytics result to sp parameter If you’d like to pass Stream Analytics jobs result to a Stored Procedure in SQL Database, it seems that there are no direct way to pass analytics result to Stored Procedure and execute the Stored Procedure. Stream Analytics jobs could write result to an existing table in an Azure SQL Database, you could try to create a