Assuming returns is required, the following 87 results were found.
in his last year. He used functions to mktime and simulate the dates. A function goes in with a normal calendar date and returns an academic week number and the week commencing date. Problem? The 1st of January 2010 was a Friday. The 1st of January 2011...
than... MS Reporting Services? Yes by far. Fast, quick to setup and a big fat refresh button for the executives. SQL query returns individual items while Excel allows drag and drop grouping/drilldown pivot tables. Have managed to get this working with...
The Stored Procedure Rather than a returned dataset, our Stored Procedure updates a field in one of our Oracle tables and returns nothing. It accepts 3 parameters: The StudentID (reference) varchar2, Username (who's running the report) varchar2 and a...
against wall. Bang "Head" against wall. Bang "Head" against wall. Alternatively Change the SQL query so that the date returns in yyyy-mm-dd format (eg. 2012-03-04) Reverse Dates Order If you have a date filter list and want it sorted in descending...
1, 2) ThisDate=%ThisDate% val=%ThisDate%%ThisTime% } FormatTime, val, %val%, ddd dd-MMM-yyyy HH:mm:ss Return val } // returns format Sat 01-Jan-2011 01:00:00 The next function usually accompanies the above one. It will basically convert seconds into...
[EXCEPTION exception_section] END [function_name]; Example: My example accepts an Active Directory (AD) username and returns the student ID: CREATE OR REPLACE FUNCTION fn_get_sref_from_adname (ad_username IN varchar2) RETURN number IS student_no number;...
warnings. So What? The problem is that if the student does not have a username but has an ID number, then the first query returns NO ROWS and then the second query errors and the whole stored procedure fails. The same problem happens when using these as...
DROP FUNCTION ufn_DataJumble ; GO -- Create user defined function CREATE FUNCTION ufn_DataJumble ( @OrigVal varchar(max) ) RETURNS varchar(max) WITH ENCRYPTION AS BEGIN -- Variables used DECLARE @NewVal varchar(max); DECLARE @OrigLen int; DECLARE...
so the field is empty and click somewhere on the page (not on a link as this will take you to another page) and the field returns to displaying "Name:". Why? I've noticed a lot of solutions now use JQuery or Mootools but most of these will not work in...
FUNCTION ufn_DataScramble ; GO -- Create user defined function CREATE FUNCTION ufn_DataScramble ( @OrigVal varchar(max) ) RETURNS varchar(max) WITH ENCRYPTION AS BEGIN -- Variables used DECLARE @NewVal varchar(max); DECLARE @OrigLen int; DECLARE...
common. Why? Bespoke systems are the usual suspects. Developers will have told the system what to do when newline, carriage returns and tab characters are entered in the data. Those who are security-conscious will also make their system escape...
148797 148797 148797 148798 148798 148798 148799 (null) 148799 148800 148800 148800 148686 148686 (null) -> The select here returns 5 rows -> A delete here would affect 13 rows. This should show all records to be deleted.
database, and there is one specific article you visit a lot, it would be nicer just to type a number like "1234" and this returns that specific article. In the case of Joomla, we'll use the article ID. Pre-Notes: This article consists of instructions to...
component for Joomla CMS 2.5.x which is restricted to registered users only. On installation, and by default, the menu item returns a 500 - Server Error because the parameters haven't been set. I need to go into the Joomla Admin panel, view the Options...
listed irrespective of whether any time has been associated to them. We need to be able to specify any date, and the system returns the timesheet for the week that date occurs in. How? The example below shows how to do this when your weeks...
with exceptions to the rule, words 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...
this: But we didn't want to do this. How? As a proof of concept, I created one lookup task that executes a SQL query which returns all the joined tables and displays the decode name. Let's pretend the info we want is rather simple: SELECT [sequenceID],...
of digits allowed. Must be greater than zero whiteSpace Specifies how white space (line feeds, tabs, spaces, and carriage returns) is handled Source(s): w3schools.com
XML declaration from results $output = substr($output, stripos($output, '?>') + 2 ); // remove leading spaces, carriage returns $output = trim($output); // process if type specified was xml if($apimo_type=='xml'){ // send header...
"http://joellipman.com/xml_feeds/my_XML_url.xml" ); $file_xml = simplexml_load_string( $file_content ); // doesn't work and returns a load of parser errors The tweaked command using cURL is: function get_data($url) { $ch = curl_init(); $timeout = 5;...