stored procedure
6 TopicsStored Procedure Input Parameter Needed Power Automate
Hi, I currently have a Stored Procedure that does not have any Input Parameters, it basically updates a Calendar Table, setting columns like CurrentDay, PreviousDay, CurrentMonth etc... to 1 or 0 if the conditions matches. I wanted to use Power Automate to run this stored procedure at 12:00 everyday but it failed because Power Automate only executes Stored Procedures with an Input Parameter https://docs.microsoft.com/en-us/connectors/sql/#execute-stored-procedure-(v2) What is the most efficient way to add an Input Parameter to my current stored procedure but basically does nothing but still does the update is meant to do. Thanks4KViews0likes2CommentsDeprecate Feature Found in sys.sp_cdc_scan
Hello, I was trying to resolve deprecated feature of SQL Server in my application. And a deprecated feature sysdatabases was found when I execute sys.sp_cdc_scan. Here is the screenshot of the event session. Please confirm if sys.sp_cdc_scan uses deprecated feature, if yes, please fix it. Thank you. I create the event session with following script: CREATE EVENT SESSION [Deprecated and Discontinued 5] ON SERVER ADD EVENT sqlserver.deprecation_announcement( ACTION(sqlserver.client_app_name,sqlserver.client_connection_id,sqlserver.database_name,sqlserver.nt_username,sqlserver.sql_text)), ADD EVENT sqlserver.deprecation_final_support( ACTION(sqlserver.client_app_name,sqlserver.client_connection_id,sqlserver.database_name,sqlserver.nt_username,sqlserver.sql_text)) ADD TARGET package0.event_file(SET filename=N'Deprecated and Discontinued 5',max_file_size=(1000)) WITH (MAX_MEMORY=4096 KB,EVENT_RETENTION_MODE=ALLOW_SINGLE_EVENT_LOSS,MAX_DISPATCH_LATENCY=30 SECONDS,MAX_EVENT_SIZE=0 KB,MEMORY_PARTITION_MODE=NONE,TRACK_CAUSALITY=OFF,STARTUP_STATE=OFF) GO361Views0likes0CommentsAutomate SQL query to send excel spreadsheet via email
I have this SQL query that runs perfect. I now would like to automate it as a stored procedure that emails the results in an Excel spreadsheet. Any pointer? Thanks for any help you can provide. Here is the query: select SiteID, case when SiteID = '001' then 'Omaha Terminal' else 'Geneva Terminal' end as 'Site Name' ,rtrim([TransNum])+replicate(' ',5-len(TransNum)) [Transaction Num] ,rtrim([Date])+replicate(' ',20-len(Date)) [Transaction Date] ,rtrim([Time])+replicate(' ',20-len(Time)) [Time] ,rtrim([Card1])+replicate(' ',20-len(Card1)) [Card] ,rtrim(c.[Name])+replicate(' ',20-len(c.Name)) [Name] ,rtrim(t.[UserEntry2])+replicate(' ',10-len(t.UserEntry2)) [Tractor] ,rtrim(t.[UserEntry3])+replicate(' ',10-len(t.UserEntry3)) [Odometer] ,rtrim([Qty])+replicate(' ',5-len(Qty)) [Quantity] from Transactions t left join Card c on t.Card1 = c.CardNumber where t.Date between '07-19-2021' and '07-20-2021' order by [Transaction Date] desc21KViews0likes1CommentSetting Date in Stored Procedure
I have a stored procedure that looks for orders within a date period. How do I set the date within the stored procedure? Here is my code. Thank you!! USE [TMWSUITE] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE Proc [dbo].[DawgAlert_Completed_Order_Status] AS SELECT orderheader.ord_number ,orderheader.ord_billto ,orderheader.ord_status ,orderheader.ord_origin_earliestdate ,orderheader.ord_origin_latestdate ,orderheader.ord_dest_earliestdate ,orderheader.ord_dest_latestdate ,orderheader.ord_trailer ,orderheader.ord_totalmiles ,stops.stp_city ,stops.stp_state ,stops.stp_schdtearliest ,stops.stp_schdtlatest ,stops.stp_status ,stops.stp_number ,stops.stp_sequence ,stops.stp_arrivaldate ,stops.stp_departuredate ,stops.cmd_code ,stops.cmp_name ,orderheader.ord_refnum ,orderheader.ord_description ,trailerprofile.trl_number ,trailerprofile.trl_type3 ,city.cty_nmstct ,orderheader.ord_completiondate FROM orderheader INNER JOIN stops ON orderheader.ord_hdrnumber = stops.ord_hdrnumber LEFT OUTER JOIN company ON orderheader.ord_company = company.cmp_id INNER JOIN trailerprofile ON orderheader.ord_trailer = trailerprofile.trl_number INNER JOIN city ON stops.stp_city = city.cty_code WHERE stops.stp_departure_status = 'DNE' AND orderheader.ord_status='CMP' AND (orderheader.ord_completiondate >= @LoadDate) AND (orderheader.ord_completiondate <= @EndDate) AND (orderheader.ord_billto = @billto)Solved1.7KViews0likes1CommentRun SQL Stored Procedure in PowerApps with Flow
Here is what I am trying to do. Right now, I have an Excel spreadsheet that runs a stored procedure and returns the results based on a start date and end date within the spreadsheet. I would like to be able to create a Flow to run this stored procedure and return the results in a table or gallery in my PowerApps screen. Is this possible?Stored Procedure Testing
I am in a healthcare project, where majority of the business written in stored procedures. How can i test the stored procedures to check the data is flowing per business or not? Is it through any testing tool i should use to achieve this? If Yes, then please tell me the tools name. I need to test the data field by field. Please confirm.1.2KViews0likes0Comments