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
39 Views
no comments
var x = _context.Database.SqlQuery<Company>("SELECT * FROM Companies").ToList();
172 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
148 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
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
147 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);
290 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 )
211 Views
no comments
Subscribe
Discuss
What's new
What is it
New Snippet
Recent Snippets
My Snippets
Web Code
Search
