Monday, July 28, 2008
Monday, July 21, 2008
SQL Query to select first day and last day of month
declare @date datetime, @first datetime, @last datetime
set @date = getdate()
set @first = cast(month(@date) as varchar(2)) + '/1/' + cast(year(@date) as varchar(4))
set @last = dateadd(d, -1, dateadd(m, 1, @first))
select @first, @last
select dateadd(mm,datediff(mm,0,getdate()),0)
select dateadd(ms,-3,dateadd(mm,datediff(mm,0,getdate())+1,0))
select dateadd(ms,- 3,dateadd(mm,0,dateadd(mm,datediff(mm,0,getdate())+1,0)))
set @date = getdate()
set @first = cast(month(@date) as varchar(2)) + '/1/' + cast(year(@date) as varchar(4))
set @last = dateadd(d, -1, dateadd(m, 1, @first))
select @first, @last
select dateadd(mm,datediff(mm,0,getdate()),0)
select dateadd(ms,-3,dateadd(mm,datediff(mm,0,getdate())+1,0))
select dateadd(ms,- 3,dateadd(mm,0,dateadd(mm,datediff(mm,0,getdate())+1,0)))
Export Stored Procedure results to text file
Use the BCP command.... You will need to have access to xp_cmdshell which is an advanced setting in sp_configure...
exec master..xp_cmdshell 'bcp "exec myDB..uMyProc" queryout c:\umytable.txt -T -c'
exec master..xp_cmdshell 'bcp "exec myDB..uMyProc" queryout c:\umytable.txt -T -c'
Wednesday, July 16, 2008
Type Lib Not Found in global.asa
Open a blank project in visual interdev...add the the references included in the global.asa files and replace the meta tags with the new tags in the project created global.asa file
Also allow permission for ASP extensions in webserver extensions in IIS to load ASP pages
Also allow permission for ASP extensions in webserver extensions in IIS to load ASP pages
Sunday, December 2, 2007
Word found locked fields during the update. Word cannot update locked fields.
To change the wrapping style of the drawing canvas, follow these steps:
Click the drawing canvas. Notice that the Drawing Canvas toolbar appears.
On the Drawing Canvas toolbar, click Text Wrapping, and then click any wrapping style other than In Line With Text.
From the Menu bar, select Edit > Select all.From the keyboard, press and hold Ctrl +Shift + F11
Click the drawing canvas. Notice that the Drawing Canvas toolbar appears.
On the Drawing Canvas toolbar, click Text Wrapping, and then click any wrapping style other than In Line With Text.
From the Menu bar, select Edit > Select all.From the keyboard, press and hold Ctrl +Shift + F11
Thursday, November 22, 2007
Word Macro to find the bulleted text
Sub FindBullet()
Dim rngTarget As Word.Range
Dim oPara As Word.Paragraph
Set rngTarget = Selection.Range
With rngTarget
Call .Collapse(wdCollapseEnd).End = ActiveDocument.Range.End
For Each oPara In .Paragraphs
If oPara.Range.ListFormat.ListType = _ WdListType.wdListBullet Then
oPara.Range.Select
'Selection.Delete Unit:=wdCharacter, Count:=1
'Exit For
End If
Next
End With
End Sub
Dim rngTarget As Word.Range
Dim oPara As Word.Paragraph
Set rngTarget = Selection.Range
With rngTarget
Call .Collapse(wdCollapseEnd).End = ActiveDocument.Range.End
For Each oPara In .Paragraphs
If oPara.Range.ListFormat.ListType = _ WdListType.wdListBullet Then
oPara.Range.Select
'Selection.Delete Unit:=wdCharacter, Count:=1
'Exit For
End If
Next
End With
End Sub
Friday, November 16, 2007
Formating currency
With decimals
[>=10000000]#\,##\,##\,##0.00;[>=100000]#\,##\,##0.00;##,##0.0
Without decimals
[>=10000000]#\,##\,##\,##;[>=100000]#\,##\,##;#,###
[>=10000000]#\,##\,##\,##0.00;[>=100000]#\,##\,##0.00;##,##0.0
Without decimals
[>=10000000]#\,##\,##\,##;[>=100000]#\,##\,##;#,###
Subscribe to:
Posts (Atom)