Monday, March 28, 2011
Friday, March 25, 2011
Tuesday, March 22, 2011
Friday, March 18, 2011
Powershell Cannot Execute Files
Thursday, March 17, 2011
ASPNET State Database
You will need to run the following commands using a db login that has Create Database permission.
(command prompt)
where
-S server name
-U user (database server login)
-P user's password
-d database name
(command prompt)
cd C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727
aspnet_regsql -S serverName -U myUser -P p4zz#w0rd -ssadd -sstype c -d MyASPState
where
-S server name
-U user (database server login)
-P user's password
-d database name
Sunday, March 13, 2011
SQL Loop with Temp Table
declare @id int
while exists(select 1 from #ids)
begin
select top 1 @id = id from #ids
--
-- do stuff
--
delete from #ids where id = @id
end
Tuesday, March 8, 2011
Substring and Character Position
String fucntions
Result:
declare @name varchar(10) = 'SMITH,JON'
SELECT SUBSTRING(@name, CHARINDEX(',', @name)+1, LEN(@name)) AS Name
Result:
Name
----------
JON
Subscribe to:
Posts (Atom)