Monday, October 21, 2013
Extract Month/Year from dates in Oracle
By Month -
SELECT EXTRACT(month FROM order_date) "Month",
COUNT(order_date) "No. of Orders"
FROM orders
GROUP BY EXTRACT(month FROM order_date)
ORDER BY "No. of Orders" DESC;
By Year -
SELECT EXTRACT(YEAR FROM DATE '1998-03-07') FROM DUAL;
For more info, look at this page:
http://docs.oracle.com/cd/B19306_01/server.102/b14200/functions050.htm
See PDF for more SQL References:
http://docs.oracle.com/cd/B19306_01/server.102/b14200.pdf
Tuesday, September 24, 2013
Microsoft Access 2007 - VBA functions breaks with missing reference
Visual Basic for Applications (VBA) functions break in a database with missing references
- Open your database.
- Press ALT+F11 to open the Visual Basic Editor.
- On the Tools menu, click References.
- Click to clear the check box for the type library or object library marked
as MISSING:
.
Tuesday, February 28, 2012
The symbolic meaning of seventy times seven
Matthew 18:21-22 (NKJV) - Then Peter came to Him and said, "Lord, how often shall my brother sin against me, and I forgive him? Up to seven times?" Jesus said to him, "I do not say to you, up to seven times, but up to seventy times seven.
The interesting thing about this verse is that Jesus is not saying that we should forgive 490 times or simply a lot of times for that matter. I came to understand recently that there is a very specific meaning when we look behind the symbolism of those numbers.
In the Bible, the number "7" symbolises completeness or a finished work, while the number "70" signifies 'perfect spiritual order carried out with all spiritual power and significance' (E.W.Bullinger, Number in Scripture, Its Supernatural Design and Spiritual Significance, 1921, p.235).
Therefore, 490, being the product of 70 x 7, signifies spiritual perfection of perfect order and completeness. Peter asked Jesus how often he should forgive someone and eagerly offered an answer to his own question. He thought that forgiving completely would suffice. But Jesus responded by saying that it wasn't good enough to just forgive completely but to forgive to the point of spiritual perfection!
Footnote:
http://www.biblebelievers.org.au/number17.htm#70
Tuesday, February 07, 2012
AutoNumbering in InfoPath forms when submitted to a SharePoint Library
- In SharePoint, create a form library to submit your forms to.
- In InfoPath, create a new (browser-compatible) InfoPath form template.
- Add a Text Box control to the form template and name it autonumber.
- On the Tools menu, click Data Connections.
- On the Data Connections dialog box, click Add, and create a Receive data connection to the SharePoint library that you created in step 1. In step 5 of the data connection wizard, uncheck all fields and then check the ID field. In the last step of the data connection wizard, uncheck Automatically retrieve data when form is opened, name the data connection RetrieveIDs, and click Finish.
- On the Data Connections dialog box, click Add, and create a Submit data connection to the SharePoint library that you created in step 1. In step 3 of the data connection wizard, click the formula button behind the File name field.
- On the Insert Formula dialog box, type max( and then click Insert Field or Group.
- On the Select a Field or Group dialog box, select RetrieveIDs from the Data source drop-down list box, expand all the nodes, click ID, and then click OK.
- On the Insert Formula dialog box, type ) + 1 and click OK.
- On the Data Connection Wizard dialog box, the expression in the File name field should resemble: max(@ID) + 1
- On the Data Connection Wizard dialog box, click Next, name the data connection Main submit, and then click Finish.
- On the Data Connections dialog box, click Close.
- On the Tools menu, click Submit Options.
- On the Submit Options dialog box, check the Allow users to submit this form checkbox, select the Perform custom actions using rules option, click Advanced, select Close the form from the After submit drop-down list box, and then click Rules.
- On the Rules dialog box, click Add.
- On the Rule dialog box, add an Action that says: Query using data connection: RetrieveIDs
- On the Rule dialog box, add a second Action that says: Set a field's value: autonumber = max(@ID) + 1 Note: @ID is selected from the RetrieveIDs secondary data source in the same way you selected it in step 8.
- On the Rule dialog box, add a third Action that says: Submit using data connection: Main submit
- Click OK when closing all dialog boxes that are currently open.
- Publish the form template to the library you created in step 1.
You should now be able to fill out a form and submit it. The next available number in the form library will be automatically saved in the autonumber field of the form when the form is submitted and this number will also be used for the Name of the form. This solution works for both forms that are filled out through the InfoPath client application as well as those that are filled out through the browser.
Sunday, January 15, 2012
The Pledge (2001)
Synopsis:
It started with a discovery of the body of an 8-year old girl named Ginny in the snow by a boy who had his snow mobile malfunctioned. He saw a man leaving the area, scared and in a hurry. Jerry (Jack Nicholson) is a detective nearing his retirement. He only got a few days left from his office when this case struck him. When they informed the parents of the girl about the misfortune, the mother was devastated by the news. Jerry uttered his comforting words to the mother that he will find the killer, and he was asked to swear on the cross which he did. Meanwhile the police caught up the guy who was seen rushing to leave the scene of the crime. He was an American Indian guy who has a brain of a child and mentally incapacitated. Jerry’s partner (Aaron Eckhart), immediately spurs out a confession from the guy and whilst taking him on the cell, he grabbed the gun of the arresting officer and shoots himself. Everybody thought that the case is closed except for Jerry who is noticing something is not right. He investigates further and found out that there are two unsolved cases from the neighbouring towns that are suspiciously similar to his own. Further inquiries reached an older woman who had led him to the grandmother of the girl. He saw the dead girl’s drawing which depicts a tall man handling little porcupines and a black station wagon to which he kept as evidence. He had presented his findings to his colleagues to which they rebut. Jerry was too smart to realize that his colleagues may have him committed to investigate case. So he appears to be living a life of an old retired man. He calculated the place where the killer might struck again. He rented a cabin near the lake. When he saw an old gas station, he offered the owner an opportunity to sell it to him which he eventually gained. So he lived on the house at the back of the gas station and tends to the business as should be. He met and befriends a not-so-lucky-in-love waitress named Lory (Robin Wright Penn) in the restaurant bar. She had an 8-year-old daughter named Chrissy. When the waitress was battered by her husband, she sought comfort from Jerry. In turn, Jerry took them in his house with no commitments. Soon after, he had grown affection on Chrissy and Lori noticed it so she fell in love with him eventually. They had lived a good life but Jerry is still adamant to catch the killer so she warned Chrissy to tell him when she got the chance to meet the tall guy from Ginny’s drawing. One day, Chrissy revealed to Jerry that he had encountered the guy and he even gave him porcupine-like chocolates. The man told her not to tell her parents about the encounter but since Jerry is not related to her, she thought it would be OK without breaking her promise. Jerry immediately knew that this is the guy. Chrissy even asked Jerry if she could meet her on the big playground which he agrees as he was planning to catch the guy by using the girl as bait without the mother knowing all about it. Jerry immediately contacted his colleagues and they followed Chrissy on the big playground as she waits for the man in patient. The team is getting impatient as they wait for the killer and Jerry sense that something is not right again. They had their altercations on the situation to which they left Jerry to look after the girl instead and wait for the killer to show up. Meanwhile, the killer who was riding the black station wagon with a porcupine on the car mirror has all the intention to see and meet Chrissy but was caught by a car accident and burnt to death. Jerry’s team had run into the accident but the car and the person inside are beyond recognisable. When the mother learned Jerry is using the girl as bait to catch the killer, she got so furious and left him for good. Jerry lost his mind as what he thought as a perfect plan to catch the culprit has made him lost his good life. He never learned the mishap the killer had gone through.
Tuesday, January 10, 2012
Copying or Moving SharePoint Lists
- By using list templates - This is only possible when you meet the following criteria: a) if the data you want to move/copy is less than 10MB; b) You must be a member of a site group with the Manage Lists right on the source site and on the destination site; and c:) The source site and the destination site must be based on the same site template
- By exporting a list to a spreadsheet
Copy or move a list by using a list template
First things first, make sure that the size of the list (if you will import the data as well) must not exceed 10MB, use the Site Settings > Site Administration > View Storage Space Allocations and filter with Document lists to check and locate the target list.To create a list template, go to Documents and Lists and select the list. On the list, select Settings > List Settings and under Permissions and Management click on "Save list as template". Give it a name (filename and template name). Select the Include content check box to include the data. Hit OK. This will appear in your site collection list template gallery.
To view the site collection list template gallery, click on Site Actions > Site Settings > Modify All Site Settings. Under Galleries, select list templates.
If your sites are not in the same site collection, download the list template from the source site by clicking on the list and saving it on a network drive.
On the destination site open the list template gallery on the target site collection. In that page, click on upload and search for the list template you have saved earlier on a network drive.
To create a copy of the list, on the destination web site, click on Site Actions > Site Settings > Modify All Site Settings, under Site Administration click on Site libraries and lists. On that page select "Create New Content" and look for the list under Custom Lists.
For more information, please visit:
http://office.microsoft.com/en-us/windows-sharepoint-services-help/copying-or-moving-sharepoint-lists-HA001154562.aspx
Sunday, January 08, 2012
SharePoint Custom List with Custom Content Types and Custom Display Forms
http://joshmccarty.com/2011/02/sharepoint-custom-list-with-custom-content-types-and-custom-display-forms/comment-page-1/#comment-1166
The trick is to make the other content types as default before binding them in the list properties - supporting file. A cumbersome work but it paid off.
Thursday, January 05, 2012
SharePoint - The column name you have entered is already in use or reserved. Choose another name
1. Goto Site Actions > Site Settings > Modify All Site Settings
2. Under Galleries, choose Site Content Type
3. Select the content type and choose the column
4. Edit the column in new window
5. On your browser address bar, type the following and enter:
javascript:g_FieldName={};alert('Successfully cleared forbidden columns');
6. Be sure you get the 'Successfully cleared forbidden columns' alert before proceeding, if not then something is wrong.
7. Change the column name and Hit OK
I sort of got frustrated with this as I could not return back the column name to its original settings but then thanks to this article as I was relieved from any trouble.
http://blog.weareon.net/fix-for-the-column-name-that-you-entered-is-already-in-use-or-reserved-choose-another-name/
Monday, January 02, 2012
"An unexpected error occured"
To work around this issue, use one of the following methods:
Recover the broken Web site. To do this, use one of the following methods:
1. Access the Web Part Page Maintenance Web page by adding the ?contents=1 query parameter to the Windows SharePoint Services site URL. Verify the Web Part, and then click Delete or Close to remove the Web Part.
2. Visit the page library for the Windows SharePoint Services site. Typically, the URL for the page library is as follows:
http://SiteName/pages/forms/allitems.aspxOn the menu of the affected Web page, click Discard check out item, and then click Delete or Close.
3. Open the Windows SharePoint Services Web site by using SharePoint Designer. On the menu of the affected Web page, select the Web part, click Discard check out item, and then click Delete or Close.
Thursday, September 22, 2011
InfoPath om MOSS 2007 Current User Profile
InfoPath - blog from Itay Shakury
InfoPath - Get user information without writing code (extended) - Clayton Cobb
Thursday, March 31, 2011
Excel Tip – Show Hyperlinks
How to extract Hyperlinks in EXCEL. Create a module (User-Defined function) as described below. Save and use it as you would like a formula.
Function GetURL(rng As Range) As String
On Error Resume Next
GetURL = rng.Hyperlinks(1).Address
End Function
Tuesday, December 14, 2010
Modifying the FrontPage Date/Time Web Component
I thought this might be something useful in the future as I deal with MS Frontpage and Sharepoint designer at the moment.
http://blogs.msdn.com/b/lisawoll/archive/2004/12/17/323871.aspx
A good reference to look up to.
Wednesday, September 22, 2010
CSS Hover Effect
http://veerle-v2.duoh.com/blog/comments/css_hover_effect/
Thursday, April 29, 2010
Tool for uploading Excel file in Coldfusion
What Is CFX_Excel2Query?
Transform a Microsoft Excel file into a ColdFusion query without installing Excel on your server! This tag is written in 100% java, so there is no need for the dreaded COM. This tag works best with simple Excel files, but many have had luck with extremely complex files.
Usage
<cfx_excel2query
file="[path_to_xls_file]"
firstRowIsHeader="[true|false]"
sheet_name="[worksheet_name]"
sheet_num="[worksheet_number]"
startRow="[starting_row]"
maxRows="[max_rows]"
longNames="[true|false]"
r_qResults="[query_variable_name]">
| Attribute | Req'd | Description |
| file | Yes | full path the Microsoft Excel file |
| r_qResults | Yes | the variable in which to store the resulting query |
| firstRowIsHeader | No | specifies whether or not the first row of the Microsoft Excel file should be used for the column names in the query |
| sheet_name | No | specifies a specific worksheet name (case sensitive) to use from the Microsoft Excel file |
| sheet_num | No | specifies a worksheet by a number (zero-based; first sheet is zero, second sheet is 1, etc) - If sheet_num and sheet_name are both specified, sheet_num is used. |
| columnlist | No | the list of column names in their original order is returned to the variable you choose here (especially useful when firstRowIsHeader) |
| startRow | No | The row number, starting at 1, you would like to start from |
| maxRows | No | The total number of rows from startRow that you want to return |
| longNames | No | Use zero padding on column names (i.e. column001,column002,..,columnN) |
Tuesday, April 13, 2010
How to get the first day of the week in SQL Server
@pInputDate DATETIME
)
RETURNS DATETIME
BEGIN
SET @pInputDate = CONVERT(VARCHAR(10), @pInputDate, 111)
RETURN DATEADD(DD, 1 - DATEPART(DW, @pInputDate),
@pInputDate)
END
GO
Tuesday, March 30, 2010
Wednesday, November 04, 2009
jqGrid Documentation
The link is for jgGrid 3.4 version
This is a good source of information for all developers who are using jQuery jqGrid plugin.
MS SQL Military and Standard Time Format
There are times that you want to display non-Military or AM/PM time format. The standard Convert formats do not have an option to return the time in this format. The SQL below will return only the time portion of the current date/time in the AM/PM format.
SELECT substring(convert(varchar(20), GetDate(), 9), 13, 5) + ' ' + substring(convert(varchar(30), GetDate(), 9), 25, 2)<br />
However, when you want to retrieve the military time format:
SELECT CONVERT(CHAR(10),GETDATE(),108)
You can replace the GetDate function with any datetime field to return the time portion of that field.
Wednesday, October 28, 2009
Web Page Optimization
Best Practices for Speeding Up Your Web Site at YahooIt describes some important techniques in keeping a site loading quickly.
Monday, September 07, 2009
Philippine Holidays for 2009
Check this out: Proclamation no. 1699