Format:
Recent snippets matching tags of t-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
74 Views
no comments
var x = _context.Database.SqlQuery<Company>("SELECT * FROM Companies").ToList();
218 Views
no comments
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
198 Views
no comments
-- 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
173 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
181 Views
no comments
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);
319 Views
2 comments
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 )
235 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
