Assuming declare is required, the following 39 results were found.
CREATE FUNCTION ufn_DataScramble ( @OrigVal varchar(max) ) RETURNS varchar(max) WITH ENCRYPTION AS BEGIN -- Variables used DECLARE @NewVal varchar(max); DECLARE @OrigLen int; DECLARE @CurrLen int; DECLARE @LoopCt int; DECLARE @Rand int; DECLARE...
CREATE FUNCTION ufn_DataJumble ( @OrigVal varchar(max) ) RETURNS varchar(max) WITH ENCRYPTION AS BEGIN -- Variables used DECLARE @NewVal varchar(max); DECLARE @OrigLen int; DECLARE @CurrLen int; DECLARE @LoopCt int; DECLARE @Rand int; -- for dates/times...
the collate). This example is expanded in a further article called "Search a database with soundex": /* USING A CURSOR */ DECLARE @SqlToExecute nvarchar(max); DECLARE @mySearchString varchar(50); SET @mySearchString = 'dnya'; DECLARE MyCursor CURSOR FOR...
BEGIN TRY BEGIN TRANSACTION A DECLARE @NumberLeft INT DECLARE @random INT DECLARE @CurrentID INT DECLARE @ScrambledID INT DECLARE @Data VARCHAR(MAX) DECLARE @UpdateData VARCHAR(MAX) DECLARE @Chosen BIT DECLARE @ChosenID INT DECLARE @SqlStatement...
value ** Return Values : None *********************************************************************************/ BEGIN DECLARE @StringValue VARCHAR(10) SET @StringInput = RTRIM(LTRIM(@StringInput)) WHILE LEN(@StringInput) > 0 BEGIN SET @StringValue =...
*****************************************************************************************************************/ BEGIN -- Declare some variables to use DECLARE @SqlToExecute nvarchar(max); DECLARE @FullSqlToExecute VARCHAR(max); DECLARE @myCounter...
confess that the bulk of this work is not mine and comes from a clever function by Chris Stubben in the MySQL Forums: BEGIN DECLARE i INT DEFAULT 0; -- total number of delimiters DECLARE ctr INT DEFAULT 0; -- counter for the loop DECLARE str_len INT; --...
-- Create Stored Procedure CREATE PROCEDURE dbo.usp_MakeTableTemp @SchemaTableName nvarchar(100) AS BEGIN -- Variables used DECLARE @ColName varchar(50); DECLARE @TableName varchar(50); DECLARE @TableDeclaration nvarchar(4000); DECLARE @SqlToExecute...
that you want in a specific case. CREATE FUNCTION ufn_ProperCase(@Text AS VARCHAR(8000)) RETURNS VARCHAR(8000) AS BEGIN -- declare some variables DECLARE @Reset BIT; DECLARE @Ret VARCHAR(8000); DECLARE @i INT; DECLARE @c VARCHAR(2); -- specify reset...
search on is "3" (the 3rd incremental load). How? The below stored procedure can be reduced to just a script as long as you declare and set the parameters after the BEGIN and extract the script from BEGIN to END (excluding the words BEGIN and END -...
a week based on a given date and campus -- =============================================================================== DECLARE @GivenDate datetime, @GivenCampus varchar(100), @setId varchar(10), @weekNumber int, @siteId nvarchar(5), @baseDate...
*****************************************************************************************************************/ BEGIN -- Declare some variables to use DECLARE @ColToProcess varchar(max), @SqlToExecute varchar(max), @myXml xml; -- Parse comma...
me 4 hours just to do the below... hopefully it will be quicker next time now that I noted it all down. The SQL Script: DECLARE @StartTime datetime, @EndTime datetime, @GivenDate datetime; SET DATEFORMAT dmy; SET @GivenDate = '23/03/2011'; --First slot...
PROCEDURE sp_get_studentdetails_from_ad ( p_STUDENT_ADNAME IN varchar2, l_CURSOR OUT sys_refcursor ) IS BEGIN -- going to declare variables that are to be returned in SSRS but not -- mentioned in the above OUT variables: DECLARE p_STUDENT_REF number(8);...
of rows // store each line of the CSV file into a JS array var my_csv_rows_array = my_csv_file_contents.split("\n"); // declare a blank array to store file contents var obj_temp = []; // loop through JS array using Array.prototype.forEach()...
IF EXISTS incrementUrlAlias; DELIMITER | CREATE TRIGGER incrementUrlAlias BEFORE INSERT ON my_table_name FOR EACH ROW BEGIN declare original_url varchar(255); declare url_counter int; set original_url = new.url_alias; set url_counter = 1; while exists...
// declaring the row = .(); // assigning values for various subform fields in the row . = ; . = ; // declaring another row (declare as many rows as required) = .(); // assigning values for various subform fields in the row . = ; . = ; // declare a...
- GetMyeBaySelling Documentation: https://developer.ebay.com/devzone/xml/docs/reference/ebay/getmyebayselling.html */ // // declare v_Page = 1; v_PerPage = 100; l_Pages = List(); // // specify page to start from v_StartingPageIndex = 1; // // specify...
- eBay Errors by Number: https://developer.ebay.com/devzone/xml/docs/Reference/ebay/Errors/errormessages.htm */ // // declare v_Page = 1; v_PerPage = 100; l_Pages = List(); // // specify the maximum number of orders you think you have on eBay (check...
comes from www.simple-talk.com/sql/reporting-services/ten-common-sql-server-reporting-services-challenges-and-solutions/ DECLARE @StartDate DATETIME, @EndDate DATETIME --First day of current month SET @StartDate = DATEADD(s,0,DATEADD(mm,...