CodePaste Logo
New Snippet New Snippet Recent Snippets Recent Snippets My Snippets My Snippets Web Code Search Snippets Search
Sign inor Register
Format:
Recent snippets matching tags of T-SQL
SQL
SELECT o.name, c.text FROM sysobjects o INNER JOIN syscomments c ON o.id = c.id  
 WHERE xtype = 'P' AND CharIndex('<KEYWORD>',c.text) > 0 ORDER BY o.name
by jaredmroberts   December 02, 2011 @ 3:38pm
Tags: t-sql
39 Views
no comments
 
C#
var x = _context.Database.SqlQuery<Company>("SELECT * FROM Companies").ToList();
by biboyatienza   June 22, 2011 @ 2:19am
172 Views
no comments
 
SQL
SELECT * FROM OPENQUERY(ADSI, 
'SELECT objectCategory, cn, givenName, sn, mail, name, department,SAMAccountName FROM 
''LDAP://DC=<<DOMAIN>>,DC=<<COM,LOCAL,NET>>'' 
WHERE  objectClass = ''group'' ORDER BY cn')
AS ADGroups
by jaredmroberts   June 08, 2011 @ 4:03pm
Tags: AD, T-SQL
148 Views
no comments
 
SQL
-- Keyra þetta bara í tempdb :)
use tempdb
go
 
-- Búa til töfluna
create table dbo.StartDateTest (StartDate datetime)
go
 
-- Búa til scalar valued function sem að tekur inn dagsetninguna sem á að "checka"
-- Functionið skilar til baka hve margar línur í töflunni eru með þetta StartDate
by Sigurður Bjarnason   February 21, 2011 @ 2:19pm
144 Views
no comments
 
 
 
$dbDir = "C:\Dev\MyProject\branches\1.0.0\src\Database\"
$viewsDir = [IO.Path]::Combine($dbDir, "Views")
$functionsDir = [IO.Path]::Combine($dbDir, "Functions")
$sprocsDir = [IO.Path]::Combine($dbDir, "Stored Procedures")
$dbServer = "(local)\SQL2k8"
 
#Write-Host $dbDir
#Write-Host $viewsDir
by Jon Sagara   December 27, 2010 @ 5:43pm
147 Views
no comments
 
SQL
CREATE TABLE table1 (id int);
INSERT INTO table1 VALUES (1);
INSERT INTO table1 VALUES (2);
INSERT INTO table1 VALUES (3);
 
CREATE TABLE table2 (id int);
INSERT INTO table2 VALUES (2);
INSERT INTO table2 VALUES (3);
 
CREATE TABLE table3 (id int);
by Luciano Evaristo Guerche (Gorše)   January 13, 2010 @ 9:54am
290 Views
2 comments
 
SQL
create table some_base_table (
    batch_id        int not null primary key clustered,
    batch_name      varchar(250) not null,
    some_parm       int null,
    some_parm2      int null
)
 
insert some_base_table ( batch_id, batch_name, some_parm, some_parm2 )
    values( 1, 'hello fred', 1, 2 )
insert some_base_table ( batch_id, batch_name, some_parm, some_parm2 )
by ivanrdgz   October 24, 2009 @ 10:41pm
211 Views
no comments
 
brought to you by:
West Wind Techologies



If you find this site useful and use it frequently please consider making a donation to support this free service.
Donate