This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE [master] | |
GO | |
IF EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[viewCommonDates]')) | |
DROP VIEW [dbo].[viewCommonDates] | |
GO | |
USE [master] | |
GO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'ItemNumber', 'Prefix' and 'Suffix' are named ranges. | |
=LEFT(C37,SEARCH(",",C37,1))&" "&VLOOKUP(LEFT(B37,SEARCH("-",B37,1)-1),Prefix,2,FALSE)&" x "&VLOOKUP(MID(B37,SEARCH("-",B37,1)+1,100),Suffix,2,FALSE)&" / "&VLOOKUP(LEFT(B37,SEARCH("-",B37,1)-1),Prefix,3,FALSE)&" x "&VLOOKUP(MID(B37,SEARCH("-",B37,1)+1,100),Suffix,3,FALSE) | |
=LEFT(C37,SEARCH(",",C37,1))&" "&VLOOKUP(LEFT(B37,SEARCH("-",B37,1)-1),Prefix,2,FALSE)&" x "&VLOOKUP(MID(B37,SEARCH("-",B37,1)+1,100),Suffix,2,FALSE)&" / "&VLOOKUP(LEFT(B37,SEARCH("-",B37,1)-1),Prefix,3,FALSE)&" x "&VLOOKUP(MID(B37,SEARCH("-",B37,1)+1,100),Suffix,3,FALSE) | |
=C366&" "&VLOOKUP(LEFT(MID(ItemNumber,SEARCH("-",ItemNumber)+1,100),SEARCH("-",MID(ItemNumber,SEARCH("-",ItemNumber)+1,100))-1),Prefix,2,FALSE)&" x "&VLOOKUP(MID(MID(ItemNumber,SEARCH("-",ItemNumber)+1,100),SEARCH("-",MID(ItemNumber,SEARCH("-",ItemNumber)+1,100))+1,100),Suffix,2,FALSE)&" / "&VLOOKUP(LEFT(MID(ItemNumber,SEARCH("-",ItemNumber)+1,100),SEARCH("-",MID(ItemNumber,SEARCH("-",ItemNumber)+1,100))-1),Prefix,3,F |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE [master] | |
GO | |
/****** Object: View [dbo].[viewCommonDates] Script Date: 04/30/2013 12:14:20 ******/ | |
IF EXISTS (SELECT * FROM sys.views WHERE object_id = OBJECT_ID(N'[dbo].[viewCommonDates]')) | |
DROP VIEW [dbo].[viewCommonDates] | |
GO | |
USE [master] | |
GO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ============================================================================================== | |
# | |
# Microsoft PowerShell Source File -- Created with SAPIEN Technologies PrimalScript 2007 | |
# | |
# NAME: Server/Workstation Inventory (CompInv_v2.ps1) | |
# | |
# AUTHOR: Jesse Hamrick | |
# DATE : 2/25/2009 | |
# Web : www.PowerShellPro.com | |
# COMMENT: Script Inventories Computers and sends results to an excel file. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I recently came across a problem where I needed to schedule the daily FTP upload of a set of files to one of my client’s FTP servers. I was a bit out of my element and found that locating a solution to this task was surprisingly challenging. I thought I would post the steps here so that someone in a similar situation might benefit from the time I spent in trial and error. | |
1. My first goal was to make sure I could upload via ftp using the command prompt in Windows XP. I created the following script, ftp_script.txt, which I placed in a scripts folder on the C drive: | |
open www.yourhostname.com | |
username | |
password | |
put c:\test.txt test.txt | |
quit | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sqlcmd -S myServer | |
-D myDB | |
-E | |
-O "MyData.txt" ^ | |
-Q "select bar from foo" ^ | |
-W 999 | |
-S "," | |
sqlcmd /? | |
Microsoft (R) SQL Server Command Line Tool |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE [database] | |
GO | |
/****** Object: StoredProcedure [dbo].[prcExport_DailyReport] Script Date: 04/10/2013 11:54:26 ******/ | |
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[prcExport_DailyReport]') AND type in (N'P', N'PC')) | |
DROP PROCEDURE [dbo].[prcExport_DailyReport] | |
GO | |
USE [database] | |
GO |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( | |
({BAQReportParameter.Check02}=TRUE) | |
OR | |
({BAQReportResult.ProdGrup.Description}<>"Raw Materials") | |
) and | |
( | |
({BAQReportParameter.Check01}=TRUE) | |
OR | |
( | |
{BAQReportResult.Part.PartNum}<>"" |