Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: SQLDenis
  • Content: Threads
  • Order by date
  1. SQLDenis

    Interviews with 2 SQL Server greats

    I interviewed 2 great SQL people in the last couple of days, read the two links below, you will enjoy it Interview With Craig Freedman About Indexing, Query Plans And Performance Interview With Erland Sommarskog About SQL Server and Transact SQL Denis The SQL Menace -------------------- SQL...
  2. SQLDenis

    Testing for SQL Server Vulnerabilities

    Interesting stuff http://www.owasp.org/index.php/Testing_for_SQL_Server How secure is your server? Denis The SQL Menace -------------------- SQL Server Code,Tips and Tricks, Performance Tuning SQLBlog.com, Google Interview Questions
  3. SQLDenis

    Interview With Stéphane Faroult About Refactoring SQL Applications

    I did an interview with Stéphane Faroult about Refactoring SQL Applications. I think you will like it, you can find it here: Interview With Stéphane Faroult About Refactoring SQL Applications Denis The SQL Menace -------------------- SQL Server Code,Tips and Tricks, Performance Tuning...
  4. SQLDenis

    teaser datalength

    declare @Temp Table(data text) Insert Into @Temp Values(replicate('1',5000)) select datalength(data) from @temp go this returns 5000 now if we replicate 50000 what does this return? declare @Temp Table(data text) Insert Into @Temp Values(replicate('1',50000)) select datalength(data) from...
  5. SQLDenis

    Solutions for Common T-SQL Problems Wiki Launched

    Volunteer Moderators and Answerers who support the Microsoft MSDN SQL Server Forums have launched a Wiki with Solutions for Common T-SQL Problems. Check it out here: http://code.msdn.microsoft.com/SQLExamples Denis The SQL Menace -------------------- SQL Server Code,Tips and Tricks...
  6. SQLDenis

    Yet another date teaser

    It has been a while since my last teaser but here we go What do you think the following returns? SELECT CONVERT(datetime,'1/1/1') -CONVERT(datetime,1) + CONVERT(datetime,0) How about this on SQL Server 2008 SELECT...
  7. SQLDenis

    Thanksgiving SQL Teaser COUNT

    Here is a small simple Thanksgiving teaser. What do you think will the result be of the select count query? USE tempdb GO CREATE TABLE Customer (CustomerID INT PRIMARY KEY) INSERT Customer VALUES (1) INSERT Customer VALUES (2) INSERT Customer VALUES (3) INSERT Customer VALUES (4)...
  8. SQLDenis

    Interview With Kalen Delaney About Query Tuning and Optimization

    I have interviewed Kalen Delaney about her latest book Inside Microsoft SQL Server 2005 Query Tuning and Optimization Check it out here Interview With Kalen Delaney About Inside Microsoft SQL Server 2005 Query Tuning and Optimization I am reading the book now and must say it is pretty awesome...
  9. SQLDenis

    SQL teaser/task: proof that these are the same values

    Can you write code that proofs that @c and @b are the same value (0x1F40B33B42750DA9BBCD79F36728C7C9 ) declare @c varchar(34), @b varbinary(16) set @c = '0x1F40B33B42750DA9BBCD79F36728C7C9' set @b = 0x1F40B33B42750DA9BBCD79F36728C7C9 Denis The SQL Menace -------------------- SQL Server...
  10. SQLDenis

    SQL teaser: guess the output

    what does this display? declare @d datetime set @d = '20071010' select dateadd(yy, datediff(yy, 0, @d)+1, -1) Denis The SQL Menace -------------------- SQL Server Code,Tips and Tricks, Performance Tuning SQLBlog.com, Google Interview Questions
  11. SQLDenis

    SQL Teaser: Guess the output

    Here is a small teaser, can you guess the output? SELECT d.c-d.b/d.a FROM(SELECT 1,2,5)d(a,b,c) Denis The SQL Menace -------------------- SQL Server Code,Tips and Tricks, Performance Tuning SQLBlog.com, Google Interview Questions
  12. SQLDenis

    SQL Teaser PASS Special: Table Size

    What will be the outcome of this script? First we create a table with a total of 6000 bytes Next we increase col2 from 1000 to 2000 bytes, this will give us a total of 7000 bytes Finally we add col3 which has 1000 bytes, this will give us a total of 8000 bytes First run these two statements...
  13. SQLDenis

    SQL Injection Cheat Sheet

    Use this site to make sure you are not open to these nasty attacks! http://ferruh.mavituna.com/makale/sql-injection-cheatsheet/ Denis The SQL Menace -------------------- SQL Server Code,Tips and Tricks, Performance Tuning SQLBlog.com, Google Interview Questions
  14. SQLDenis

    Do you know what data type is used when running ad-hoc queries

    This is for SQL Server 2000 only, SQL Server 2005 is a lot smarter which is another reason to upgrade. When running the following query you probably already know that 2 is converted to an int datatype. SELECT * FROM Table WHERE ID =2 What about the value 2222222222? Do you think since it...
  15. SQLDenis

    SQL Teaser: uniqueidentifier

    create table #Foobahar (id int,Col uniqueidentifier) insert #Foobahar values(1,'FD788D60-E5F8-4969-9733-F88186B7EE63') insert #Foobahar values(2,'78E89339-F5A0-46B9-961E-AC4681B63075') insert #Foobahar values(3,'BE9E0439-5626-42B5-955B-1FD831BF7CAF') without running this, which GUID do you...
  16. SQLDenis

    SQL teaser DEFAULT WITH VALUES

    without running this what will be the values of the ID2 column after creating a default with values? create table def(id int ,id2 int) INSERT def (id) VALUES(1) INSERT def (id) VALUES(2) INSERT def (id) VALUES(3) SELECT * FROM def ALTER TABLE def ADD CONSTRAINT Dflt DEFAULT 500 FOR id2...
  17. SQLDenis

    Do you know how NULLIF and non-deterministic functions work?

    Do you know how NULLIF and non-deterministic functions work? Run this first CREATE TABLE #j (n varchar(15)) DECLARE @a int SET @a = 1 WHILE @a <= 1000 BEGIN INSERT #j SELECT NULLIF(REPLICATE('1', RAND()*2) , ' ') SET @a = @a + 1 END Go After that is done run this query SELECT * FROM #j...
  18. SQLDenis

    SQL Injection Video

    Watch and learn why you should always sanitize the input http://uk.youtube.com/watch?v=MJNJjh4jORY Denis The SQL Menace -------------------- SQL Server Code,Tips and Tricks, Performance Tuning SQLBlog.com, Google Interview Questions
  19. SQLDenis

    SQL Server 2008 Has Nanosecond Precision?

    it looks like SQL Server 2008 has nanosecond precision if you run the following DECLARE @t time SELECT @t ='0:0' SELECT @t AS Time1,dateadd(ms,1,@t) AS TimeMilli, dateadd(ns,10000,@t) AS TimeNano1,dateadd(ns,100,@t) AS TimeNano2 The output is this Time1 00:00:00.0000000 TimeMilli...
  20. SQLDenis

    SQL Server 2008 July CTP Has Been Released, The 10 New Features

    There are 10 new features in the latest SQL server 2008 CTP I have put a list here: http://sqlservercode.blogspot.com/2007/08/sql-server-2008-july-ctp-has-been.html Also SQL Server 2008 will NOT include Notification Services anymore, this has been deprecated Denis The SQL Menace...

Part and Inventory Search

Back
Top