From jwcolby at colbyconsulting.com Tue Aug 14 08:02:18 2012 From: jwcolby at colbyconsulting.com (jwcolby) Date: Tue, 14 Aug 2012 09:02:18 -0400 Subject: [dba-SQLServer] SQL Server: Crosstab (pivot) Message-ID: <502A4C5A.9060408@colbyconsulting.com> I have a general situation where I have three fields in a table: tblAZData (address data) HashPerson HashFamily HashAddress HashPerson contains exactly that, a hash of FName, LName, Addr, Zip5, Zip4 HashFamily contains a hash of LName, Addr, Zip5, Zip4 HashAddr contains a hash of Addr, Zip5, Zip4 Assume I have 5 people in the same family at an address, and I have 2 people from another family at that same address. For those 7 records I would have 7 distinct HashPerson values, 2 distinct HashFamily values and 1 distinct HashAddr value. Now assume a state full of this kind of data. Now I am going to throw in a Nielsen rating (television viewing data) for the zip5 code. Nielsen codes are A,B,C and D. I need to get a cross tab something like: Nielsen code> A B C D HashPerson 8765 5678 4356 9876 HashFamily 7687 4643 4076 9074 HashAddr 7009 4543 3987 8823 I generate this data "manually" by: 1) Building a base query that selects the general population to be counted 2) Building three queries based on the base query - HashPerson_Distinct, HashFamily_Distinct and HashAddr_Distinct 3) Building three queries - HashPerson_Distinct_Cnt, HashFamily_Distinct_Cnt and HashAddr_Distinct_Cnt 4) Running these last three queries and then pasting them into a spreadsheet. Unfortunately the results end up: Nielsen Person Family Address A B C D So I am trying to make this easier. I am doing this kind of stuff a LOT in a lot of different circumstances. However the base information, a selection of records containing HashPerson, HashFamily and HashAddress for which I have to get distinct values for each of those and counts for each of those. I think I could figure out a simple pivot if it were a simple count, however the fact that I have to do a distinct and then a count is throwing a wrench in my ability to handle the while thing. Is this something that can be solved in a general way in TSQL or am I just stuck doing what I am doing? -- John W. Colby Colby Consulting Reality is what refuses to go away when you do not believe in it From lawhonac at hiwaay.net Tue Aug 14 21:50:32 2012 From: lawhonac at hiwaay.net (Alan Lawhon) Date: Tue, 14 Aug 2012 21:50:32 -0500 Subject: [dba-SQLServer] SQL Antipatterns (Book) Message-ID: <001a01cd7a90$bcad3680$3607a380$@net> I was in Barnes & Noble this afternoon browsing SQL Server books when I came across this gem. http://tinyurl.com/8paqt25 In the very first chapter, the author starts off with a quote attributed to the great physicist Niels Bohr: "An expert is a person who has made every possible mistake in a very specific area." (This is a paraphrase, not a verbatim quote.) Bill Karwin has an interesting and novel approach with this idea of SQL "antipatterns". First, he starts off with the definition of an antipattern. A SQL antipattern is a flawed technique or a flawed solution, (in other words a "mistake"), designed to solve one problem that has the unintended side effect of creating a host of other problems - usually because the flawed solution or flawed technique violates a basic tenet of relational database theory. (This book is the rare gem - a book that shows how "theory" relates to practice.) Karwin starts off in the very first chapter with probably the most common "mistake" in poor database design: Non-atomic fields - or a field consisting of multiple data values separated by commas. This, of course, is a violation of First Normal Form. He cleverly calls this common mistake "Jaywalking" as the offender is attempting to avoid an intersection. (Ha! Ha! Get the joke?) Karwin goes on from there to introduce a number of other SQL antipatterns, why they are bad, and how to avoid them. I only had time to read through one or two chapters, but what I did read convinced me that this book is a treasure trove - especially if your job is database design and development. (A major section of his book - approximately 25 percent of the text - deals with query antipatterns.) That's the real value of Karwin's approach - he shows you the way to good design and good practice by showing you the undesirable consequences of doing things the wrong way. As an example, I spent some time this afternoon reading Karwin's chapter on nulls and how NULL can be used (and misused) in SQL. That one chapter was all that was needed to convince me to buy the book. (One reviewer on Amazon.com calls Kerwin's discussion of NULLs a masterpiece. I went online and ordered my copy as soon as I got home.) The real value of this book is as a supplement to a class (or another good book) on sound database design. This book does an incredibly good job of tying theory to practice. I'm curious if any of the rest of you have read this book - and your thoughts and impressions if you have read the book? Alan C. Lawhon From gustav at cactus.dk Thu Aug 16 09:39:41 2012 From: gustav at cactus.dk (Gustav Brock) Date: Thu, 16 Aug 2012 16:39:41 +0200 Subject: [dba-SQLServer] Cannot sort on Abs([Field]=0) Message-ID: Hi all This works in Access SQL: ORDER BY Abs([SortOrder]=0) but if the tables are linked via ODBC to SQL Server 2008, it fails: Incorrect syntax near '='. (#102) I have to rewrite it like this: ORDER BY Abs(CBool([SortOrder]=0)) Why is that? [SortOrder] is a short integer with no Nulls. /gustav From stuart at lexacorp.com.pg Thu Aug 16 17:38:58 2012 From: stuart at lexacorp.com.pg (Stuart McLachlan) Date: Fri, 17 Aug 2012 08:38:58 +1000 Subject: [dba-SQLServer] Cannot sort on Abs([Field]=0) In-Reply-To: References: Message-ID: <502D7682.8874.133EE489@stuart.lexacorp.com.pg> The result of a comparison operator has the Boolean data type. This has three values: TRUE, FALSE, and UNKNOWN. Expressions that return a Boolean data type are known as Boolean expressions. Unlike other SQL Server data types, a Boolean data type cannot be specified as the data type of a table column or variable, and cannot be returned in a result set. Note the last sentence. IOW, there are very limited places in SQL Server queries that you can actually use "x = y" in an expression. By using a VBA expression such as CBOOL() which is not valid SQL, you are forcing Access to process the query locally on raw data returned by SQL Server. Without such an expression Access passes the actual comparison string to SQL Server resulting in the error. If you play around with "SortOrder = 1" in a query window in SSMS, you will find all sorts of similar problems. -- Stuart On 16 Aug 2012 at 16:39, Gustav Brock wrote: > Hi all > > This works in Access SQL: > > ORDER BY Abs([SortOrder]=0) > > but if the tables are linked via ODBC to SQL Server 2008, it fails: > > Incorrect syntax near '='. (#102) > > I have to rewrite it like this: > > ORDER BY Abs(CBool([SortOrder]=0)) > > Why is that? [SortOrder] is a short integer with no Nulls. > > /gustav > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > From jlawrenc1 at shaw.ca Thu Aug 16 22:39:46 2012 From: jlawrenc1 at shaw.ca (Jim Lawrence) Date: Thu, 16 Aug 2012 20:39:46 -0700 Subject: [dba-SQLServer] Cannot sort on Abs([Field]=0) In-Reply-To: <502D7682.8874.133EE489@stuart.lexacorp.com.pg> References: <502D7682.8874.133EE489@stuart.lexacorp.com.pg> Message-ID: <83D5284A4E494DCE9BF5BA2D3F420685@creativesystemdesigns.com> Of course people connecting to a MS SQL or real SQL server would never do the computing in the MS Access FE...would they?? Jim -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Thursday, August 16, 2012 3:39 PM To: Discussion concerning MS SQL Server Subject: Re: [dba-SQLServer] Cannot sort on Abs([Field]=0) The result of a comparison operator has the Boolean data type. This has three values: TRUE, FALSE, and UNKNOWN. Expressions that return a Boolean data type are known as Boolean expressions. Unlike other SQL Server data types, a Boolean data type cannot be specified as the data type of a table column or variable, and cannot be returned in a result set. Note the last sentence. IOW, there are very limited places in SQL Server queries that you can actually use "x = y" in an expression. By using a VBA expression such as CBOOL() which is not valid SQL, you are forcing Access to process the query locally on raw data returned by SQL Server. Without such an expression Access passes the actual comparison string to SQL Server resulting in the error. If you play around with "SortOrder = 1" in a query window in SSMS, you will find all sorts of similar problems. -- Stuart On 16 Aug 2012 at 16:39, Gustav Brock wrote: > Hi all > > This works in Access SQL: > > ORDER BY Abs([SortOrder]=0) > > but if the tables are linked via ODBC to SQL Server 2008, it fails: > > Incorrect syntax near '='. (#102) > > I have to rewrite it like this: > > ORDER BY Abs(CBool([SortOrder]=0)) > > Why is that? [SortOrder] is a short integer with no Nulls. > > /gustav > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From gustav at cactus.dk Fri Aug 17 04:04:34 2012 From: gustav at cactus.dk (Gustav Brock) Date: Fri, 17 Aug 2012 11:04:34 +0200 Subject: [dba-SQLServer] Cannot sort on Abs([Field]=0) Message-ID: Hi Stuart and Jim That's a very good explanation Stuart. And Jim, no I would prefer to run SQL understood by SQL Server, and ABS() is such a function. But what are my alternatives? How would you rewrite Abs([SomeNumericField]=0)? /gustav >>> jlawrenc1 at shaw.ca 17-08-12 5:39 >>> Of course people connecting to a MS SQL or real SQL server would never do the computing in the MS Access FE...would they?? Jim -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Thursday, August 16, 2012 3:39 PM To: Discussion concerning MS SQL Server Subject: Re: [dba-SQLServer] Cannot sort on Abs([Field]=0) The result of a comparison operator has the Boolean data type. This has three values: TRUE, FALSE, and UNKNOWN. Expressions that return a Boolean data type are known as Boolean expressions. Unlike other SQL Server data types, a Boolean data type cannot be specified as the data type of a table column or variable, and cannot be returned in a result set. Note the last sentence. IOW, there are very limited places in SQL Server queries that you can actually use "x = y" in an expression. By using a VBA expression such as CBOOL() which is not valid SQL, you are forcing Access to process the query locally on raw data returned by SQL Server. Without such an expression Access passes the actual comparison string to SQL Server resulting in the error. If you play around with "SortOrder = 1" in a query window in SSMS, you will find all sorts of similar problems. -- Stuart On 16 Aug 2012 at 16:39, Gustav Brock wrote: > Hi all > > This works in Access SQL: > > ORDER BY Abs([SortOrder]=0) > > but if the tables are linked via ODBC to SQL Server 2008, it fails: > > Incorrect syntax near '='. (#102) > > I have to rewrite it like this: > > ORDER BY Abs(CBool([SortOrder]=0)) > > Why is that? [SortOrder] is a short integer with no Nulls. > > /gustav From jlawrenc1 at shaw.ca Fri Aug 17 05:36:22 2012 From: jlawrenc1 at shaw.ca (Jim Lawrence) Date: Fri, 17 Aug 2012 03:36:22 -0700 Subject: [dba-SQLServer] Cannot sort on Abs([Field]=0) In-Reply-To: References: Message-ID: <4DC51D822C044BA1B9922D1E671DE1FD@creativesystemdesigns.com> Gustav: Off the top, wouldn't something like: Not([SomeNumericField]=0) work, as that should flip true or false result? (That works in the Informix SQL, I am current working but am not sure whether it would work in MS SQL.) Jim -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Friday, August 17, 2012 2:05 AM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] Cannot sort on Abs([Field]=0) Hi Stuart and Jim That's a very good explanation Stuart. And Jim, no I would prefer to run SQL understood by SQL Server, and ABS() is such a function. But what are my alternatives? How would you rewrite Abs([SomeNumericField]=0)? /gustav >>> jlawrenc1 at shaw.ca 17-08-12 5:39 >>> Of course people connecting to a MS SQL or real SQL server would never do the computing in the MS Access FE...would they?? Jim -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Thursday, August 16, 2012 3:39 PM To: Discussion concerning MS SQL Server Subject: Re: [dba-SQLServer] Cannot sort on Abs([Field]=0) The result of a comparison operator has the Boolean data type. This has three values: TRUE, FALSE, and UNKNOWN. Expressions that return a Boolean data type are known as Boolean expressions. Unlike other SQL Server data types, a Boolean data type cannot be specified as the data type of a table column or variable, and cannot be returned in a result set. Note the last sentence. IOW, there are very limited places in SQL Server queries that you can actually use "x = y" in an expression. By using a VBA expression such as CBOOL() which is not valid SQL, you are forcing Access to process the query locally on raw data returned by SQL Server. Without such an expression Access passes the actual comparison string to SQL Server resulting in the error. If you play around with "SortOrder = 1" in a query window in SSMS, you will find all sorts of similar problems. -- Stuart On 16 Aug 2012 at 16:39, Gustav Brock wrote: > Hi all > > This works in Access SQL: > > ORDER BY Abs([SortOrder]=0) > > but if the tables are linked via ODBC to SQL Server 2008, it fails: > > Incorrect syntax near '='. (#102) > > I have to rewrite it like this: > > ORDER BY Abs(CBool([SortOrder]=0)) > > Why is that? [SortOrder] is a short integer with no Nulls. > > /gustav _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From james at fcidms.com Fri Aug 17 08:28:58 2012 From: james at fcidms.com (James Barash) Date: Fri, 17 Aug 2012 13:28:58 +0000 Subject: [dba-SQLServer] Cannot sort on Abs([Field]=0) In-Reply-To: References: Message-ID: <94AAC5416CCCB449AE330D33976AFD7F2E599B8A@BLUPRD0411MB436.namprd04.prod.outlook.com> Gustav, You could always use a case statement: Order By (case when [SortOrder] = 0 then 1 else 0 end) I'm not sure how efficient it would be but I've used it for more complicated sorts. Hope that helps. James Barash -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Friday, August 17, 2012 5:05 AM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] Cannot sort on Abs([Field]=0) Hi Stuart and Jim That's a very good explanation Stuart. And Jim, no I would prefer to run SQL understood by SQL Server, and ABS() is such a function. But what are my alternatives? How would you rewrite Abs([SomeNumericField]=0)? /gustav >>> jlawrenc1 at shaw.ca 17-08-12 5:39 >>> Of course people connecting to a MS SQL or real SQL server would never do the computing in the MS Access FE...would they?? Jim -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Thursday, August 16, 2012 3:39 PM To: Discussion concerning MS SQL Server Subject: Re: [dba-SQLServer] Cannot sort on Abs([Field]=0) The result of a comparison operator has the Boolean data type. This has three values: TRUE, FALSE, and UNKNOWN. Expressions that return a Boolean data type are known as Boolean expressions. Unlike other SQL Server data types, a Boolean data type cannot be specified as the data type of a table column or variable, and cannot be returned in a result set. Note the last sentence. IOW, there are very limited places in SQL Server queries that you can actually use "x = y" in an expression. By using a VBA expression such as CBOOL() which is not valid SQL, you are forcing Access to process the query locally on raw data returned by SQL Server. Without such an expression Access passes the actual comparison string to SQL Server resulting in the error. If you play around with "SortOrder = 1" in a query window in SSMS, you will find all sorts of similar problems. -- Stuart On 16 Aug 2012 at 16:39, Gustav Brock wrote: > Hi all > > This works in Access SQL: > > ORDER BY Abs([SortOrder]=0) > > but if the tables are linked via ODBC to SQL Server 2008, it fails: > > Incorrect syntax near '='. (#102) > > I have to rewrite it like this: > > ORDER BY Abs(CBool([SortOrder]=0)) > > Why is that? [SortOrder] is a short integer with no Nulls. > > /gustav _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From gustav at cactus.dk Fri Aug 17 09:13:22 2012 From: gustav at cactus.dk (Gustav Brock) Date: Fri, 17 Aug 2012 16:13:22 +0200 Subject: [dba-SQLServer] Cannot sort on Abs([Field]=0) Message-ID: Hi James Well, that would work for a pass-through query, but this query is in Access using ODBC-linked tables. /gustav >>> james at fcidms.com 17-08-12 15:28 >>> Gustav, You could always use a case statement: Order By (case when [SortOrder] = 0 then 1 else 0 end) I'm not sure how efficient it would be but I've used it for more complicated sorts. Hope that helps. James Barash -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Gustav Brock Sent: Friday, August 17, 2012 5:05 AM To: dba-sqlserver at databaseadvisors.com Subject: Re: [dba-SQLServer] Cannot sort on Abs([Field]=0) Hi Stuart and Jim That's a very good explanation Stuart. And Jim, no I would prefer to run SQL understood by SQL Server, and ABS() is such a function. But what are my alternatives? How would you rewrite Abs([SomeNumericField]=0)? /gustav >>> jlawrenc1 at shaw.ca 17-08-12 5:39 >>> Of course people connecting to a MS SQL or real SQL server would never do the computing in the MS Access FE...would they?? Jim -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Thursday, August 16, 2012 3:39 PM To: Discussion concerning MS SQL Server Subject: Re: [dba-SQLServer] Cannot sort on Abs([Field]=0) The result of a comparison operator has the Boolean data type. This has three values: TRUE, FALSE, and UNKNOWN. Expressions that return a Boolean data type are known as Boolean expressions. Unlike other SQL Server data types, a Boolean data type cannot be specified as the data type of a table column or variable, and cannot be returned in a result set. Note the last sentence. IOW, there are very limited places in SQL Server queries that you can actually use "x = y" in an expression. By using a VBA expression such as CBOOL() which is not valid SQL, you are forcing Access to process the query locally on raw data returned by SQL Server. Without such an expression Access passes the actual comparison string to SQL Server resulting in the error. If you play around with "SortOrder = 1" in a query window in SSMS, you will find all sorts of similar problems. -- Stuart On 16 Aug 2012 at 16:39, Gustav Brock wrote: > Hi all > > This works in Access SQL: > > ORDER BY Abs([SortOrder]=0) > > but if the tables are linked via ODBC to SQL Server 2008, it fails: > > Incorrect syntax near '='. (#102) > > I have to rewrite it like this: > > ORDER BY Abs(CBool([SortOrder]=0)) > > Why is that? [SortOrder] is a short integer with no Nulls. > > /gustav From fuller.artful at gmail.com Wed Aug 22 08:34:01 2012 From: fuller.artful at gmail.com (Arthur Fuller) Date: Wed, 22 Aug 2012 09:34:01 -0400 Subject: [dba-SQLServer] Create table within schema Message-ID: Using SSMS, how does one create a table within a schema? (It's simple enough without the GUI, but when I use the GUI, even if I name a table, say, Arthur.MyTable, once I save it, it's called dbo.Arthur.MyTable. Is there a way within the GUI to specify the schema to use first and then create its tables? -- Arthur Cell: 647.710.1314 Prediction is difficult, especially of the future. -- Niels Bohr From gustav at cactus.dk Wed Aug 22 09:34:19 2012 From: gustav at cactus.dk (Gustav Brock) Date: Wed, 22 Aug 2012 16:34:19 +0200 Subject: [dba-SQLServer] Create table within schema Message-ID: Hi Arthur Open the Properties window in table design. Near the top in this, I have the property Schema with a combobox to select from the available schemas. /gustav >>> fuller.artful at gmail.com 22-08-12 15:34 >>> Using SSMS, how does one create a table within a schema? (It's simple enough without the GUI, but when I use the GUI, even if I name a table, say, Arthur.MyTable, once I save it, it's called dbo.Arthur.MyTable. Is there a way within the GUI to specify the schema to use first and then create its tables? -- Arthur Cell: 647.710.1314 Prediction is difficult, especially of the future. -- Niels Bohr From michael at mattysconsulting.com Wed Aug 22 10:23:05 2012 From: michael at mattysconsulting.com (Michael Mattys) Date: Wed, 22 Aug 2012 11:23:05 -0400 Subject: [dba-SQLServer] Crystal Reports Opportunity Message-ID: <00f901cd807a$08aec7d0$1a0c5770$@mattysconsulting.com> Hi Folks, My client is seeking a Crystal Reports developer. This is a south-western State College for health care training. He said it is definitely not simple stuff. Please send an email to michael at mattysconsulting to obtain contact information. Thanks, Michael R Mattys Mattys Consulting, LLC www.mattysconsulting.com From davidmcafee at gmail.com Wed Aug 22 11:38:23 2012 From: davidmcafee at gmail.com (David McAfee) Date: Wed, 22 Aug 2012 09:38:23 -0700 Subject: [dba-SQLServer] Crystal Reports Opportunity In-Reply-To: <00f901cd807a$08aec7d0$1a0c5770$@mattysconsulting.com> References: <00f901cd807a$08aec7d0$1a0c5770$@mattysconsulting.com> Message-ID: It might help to know where :) On Wed, Aug 22, 2012 at 8:23 AM, Michael Mattys < michael at mattysconsulting.com> wrote: > Hi Folks, > > > > My client is seeking a Crystal Reports developer. > > This is a south-western State College for health care training. > > He said it is definitely not simple stuff. > > Please send an email to michael at mattysconsulting to obtain contact > information. > > > > Thanks, > > > > Michael R Mattys > > Mattys Consulting, LLC > > www.mattysconsulting.com > > > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > From fuller.artful at gmail.com Thu Aug 23 07:00:23 2012 From: fuller.artful at gmail.com (Arthur Fuller) Date: Thu, 23 Aug 2012 08:00:23 -0400 Subject: [dba-SQLServer] Quantum Computing: Has Its Dawn Finally Arrived? Message-ID: This snippet from iProgrammer: A Quantum Computer Finds FactorsWritten by Mike James Tuesday, 21 August 2012 10:00 The Shor quantum factoring algorithm has been run for the first time on a solid state device and it successfully factored a composite number. Is this the start of the quantum computing revolution? Quantum computing is promised to provide many amazing advantages, but the one that is uppermost in the collective consciousness is its ability to factor numbers. The reason for this concern is that the Public Key Infrastructure (PKI) depends on the factoring of large numbers (600 digits or more) being a difficult task for a standard algorithm. In simple terms, public cryptography depends on the asymmetry between multiplying two primes together - easy - and factoring the number that results - difficult. A quantum computer, on the other hand, promises to factor a number of any size in one operation and, if one can be built, the future of the PKI looks bleak and we would have to find encryption methods that were safe against a quantum attack. The summary of this can be found here: http://www.i-programmer.info/news/112/4679.html The original article published in Nature Physics can be found here: http://www.nature.com/nphys/journal/vaop/ncurrent/full/nphys2385.html (subscription required). -- Arthur Cell: 647.710.1314 Prediction is difficult, especially of the future. -- Niels Bohr From accessd at shaw.ca Thu Aug 23 11:09:58 2012 From: accessd at shaw.ca (Jim Lawrence) Date: Thu, 23 Aug 2012 09:09:58 -0700 Subject: [dba-SQLServer] Quantum Computing: Has Its Dawn Finally Arrived? In-Reply-To: References: Message-ID: >From what I could read (no subscription) it is a very exciting subject. I suspect within five to ten years a design of same will be on the market and at one point its price will match any today's machines. Its potential is virtually unlimited...well limited to who can program it and given the current description of the product that will be a very finite group indeed. Maybe just you and me Arthur. ;-) Jim -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Arthur Fuller Sent: Thursday, August 23, 2012 5:00 AM To: Discussion concerning MS SQL Server Subject: [dba-SQLServer] Quantum Computing: Has Its Dawn Finally Arrived? This snippet from iProgrammer: A Quantum Computer Finds FactorsWritten by Mike James Tuesday, 21 August 2012 10:00 The Shor quantum factoring algorithm has been run for the first time on a solid state device and it successfully factored a composite number. Is this the start of the quantum computing revolution? Quantum computing is promised to provide many amazing advantages, but the one that is uppermost in the collective consciousness is its ability to factor numbers. The reason for this concern is that the Public Key Infrastructure (PKI) depends on the factoring of large numbers (600 digits or more) being a difficult task for a standard algorithm. In simple terms, public cryptography depends on the asymmetry between multiplying two primes together - easy - and factoring the number that results - difficult. A quantum computer, on the other hand, promises to factor a number of any size in one operation and, if one can be built, the future of the PKI looks bleak and we would have to find encryption methods that were safe against a quantum attack. The summary of this can be found here: http://www.i-programmer.info/news/112/4679.html The original article published in Nature Physics can be found here: http://www.nature.com/nphys/journal/vaop/ncurrent/full/nphys2385.html (subscription required). -- Arthur Cell: 647.710.1314 Prediction is difficult, especially of the future. -- Niels Bohr _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From jwcolby at colbyconsulting.com Thu Aug 23 11:40:53 2012 From: jwcolby at colbyconsulting.com (jwcolby) Date: Thu, 23 Aug 2012 12:40:53 -0400 Subject: [dba-SQLServer] Quantum Computing: Has Its Dawn Finally Arrived? In-Reply-To: References: Message-ID: <50365D15.8000907@colbyconsulting.com> >Its potential is virtually unlimited...well limited to who can program it and given the current description of the product that will be a very finite group indeed. It will be a very finite group indeed... every high school script kiddie. ;) John W. Colby Colby Consulting Reality is what refuses to go away when you do not believe in it On 8/23/2012 12:09 PM, Jim Lawrence wrote: >>From what I could read (no subscription) it is a very exciting subject. > > I suspect within five to ten years a design of same will be on the market > and at one point its price will match any today's machines. Its potential is > virtually unlimited...well limited to who can program it and given the > current description of the product that will be a very finite group indeed. > > Maybe just you and me Arthur. ;-) > > Jim > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Arthur > Fuller > Sent: Thursday, August 23, 2012 5:00 AM > To: Discussion concerning MS SQL Server > Subject: [dba-SQLServer] Quantum Computing: Has Its Dawn Finally Arrived? > > This snippet from iProgrammer: > > A Quantum Computer Finds > FactorsWritten by Mike James Tuesday, 21 August 2012 10:00 > > The Shor quantum factoring algorithm has been run for the first time on a > solid state device and it successfully factored a composite number. Is this > the start of the quantum computing revolution? > > Quantum computing is promised to provide many amazing advantages, but the > one that is uppermost in the collective consciousness is its ability to > factor numbers. The reason for this concern is that the Public Key > Infrastructure (PKI) depends on the factoring of large numbers (600 digits > or more) being a difficult task for a standard algorithm. In simple terms, > public cryptography depends on the asymmetry between multiplying two primes > together - easy - and factoring the number that results - difficult. > > A quantum computer, on the other hand, promises to factor a number of any > size in one operation and, if one can be built, the future of the PKI > looks bleak and we would have to find encryption methods that were safe > against a quantum attack. > > The summary of this can be found here: > http://www.i-programmer.info/news/112/4679.html > > The original article published in Nature Physics can be found here: > http://www.nature.com/nphys/journal/vaop/ncurrent/full/nphys2385.html > (subscription > required). > From accessd at shaw.ca Thu Aug 23 14:39:00 2012 From: accessd at shaw.ca (Jim Lawrence) Date: Thu, 23 Aug 2012 12:39:00 -0700 Subject: [dba-SQLServer] Quantum Computing: Has Its Dawn Finally Arrived? In-Reply-To: <50365D15.8000907@colbyconsulting.com> References: <50365D15.8000907@colbyconsulting.com> Message-ID: <0BCD100A24E8498DA16B7724941B81A4@creativesystemdesigns.com> I noticed you didn't mention any old programmers. ;-) Jim -----Original Message----- From: dba-sqlserver-bounces at databaseadvisors.com [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of jwcolby Sent: Thursday, August 23, 2012 9:41 AM To: Discussion concerning MS SQL Server Subject: Re: [dba-SQLServer] Quantum Computing: Has Its Dawn Finally Arrived? >Its potential is virtually unlimited...well limited to who can program it and given the current description of the product that will be a very finite group indeed. It will be a very finite group indeed... every high school script kiddie. ;) John W. Colby Colby Consulting Reality is what refuses to go away when you do not believe in it On 8/23/2012 12:09 PM, Jim Lawrence wrote: >>From what I could read (no subscription) it is a very exciting subject. > > I suspect within five to ten years a design of same will be on the market > and at one point its price will match any today's machines. Its potential is > virtually unlimited...well limited to who can program it and given the > current description of the product that will be a very finite group indeed. > > Maybe just you and me Arthur. ;-) > > Jim > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Arthur > Fuller > Sent: Thursday, August 23, 2012 5:00 AM > To: Discussion concerning MS SQL Server > Subject: [dba-SQLServer] Quantum Computing: Has Its Dawn Finally Arrived? > > This snippet from iProgrammer: > > A Quantum Computer Finds > FactorsWritten by Mike James Tuesday, 21 August 2012 10:00 > > The Shor quantum factoring algorithm has been run for the first time on a > solid state device and it successfully factored a composite number. Is this > the start of the quantum computing revolution? > > Quantum computing is promised to provide many amazing advantages, but the > one that is uppermost in the collective consciousness is its ability to > factor numbers. The reason for this concern is that the Public Key > Infrastructure (PKI) depends on the factoring of large numbers (600 digits > or more) being a difficult task for a standard algorithm. In simple terms, > public cryptography depends on the asymmetry between multiplying two primes > together - easy - and factoring the number that results - difficult. > > A quantum computer, on the other hand, promises to factor a number of any > size in one operation and, if one can be built, the future of the PKI > looks bleak and we would have to find encryption methods that were safe > against a quantum attack. > > The summary of this can be found here: > http://www.i-programmer.info/news/112/4679.html > > The original article published in Nature Physics can be found here: > http://www.nature.com/nphys/journal/vaop/ncurrent/full/nphys2385.html > (subscription > required). > _______________________________________________ dba-SQLServer mailing list dba-SQLServer at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/dba-sqlserver http://www.databaseadvisors.com From dbdoug at gmail.com Thu Aug 23 14:53:19 2012 From: dbdoug at gmail.com (Doug Steele) Date: Thu, 23 Aug 2012 12:53:19 -0700 Subject: [dba-SQLServer] Quantum Computing: Has Its Dawn Finally Arrived? In-Reply-To: <0BCD100A24E8498DA16B7724941B81A4@creativesystemdesigns.com> References: <50365D15.8000907@colbyconsulting.com> <0BCD100A24E8498DA16B7724941B81A4@creativesystemdesigns.com> Message-ID: Old programmers are stuck in a Newtonian reference frame - they don't do quantum mechanics. Doug On Thu, Aug 23, 2012 at 12:39 PM, Jim Lawrence wrote: > I noticed you didn't mention any old programmers. ;-) > > Jim > > -----Original Message----- > From: dba-sqlserver-bounces at databaseadvisors.com > [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of jwcolby > Sent: Thursday, August 23, 2012 9:41 AM > To: Discussion concerning MS SQL Server > Subject: Re: [dba-SQLServer] Quantum Computing: Has Its Dawn Finally > Arrived? > > >Its potential is virtually unlimited...well limited to who can program it > and given the current > description of the product that will be a very finite group indeed. > > It will be a very finite group indeed... every high school script kiddie. > > ;) > > John W. Colby > Colby Consulting > > Reality is what refuses to go away > when you do not believe in it > > On 8/23/2012 12:09 PM, Jim Lawrence wrote: >>>From what I could read (no subscription) it is a very exciting subject. >> >> I suspect within five to ten years a design of same will be on the market >> and at one point its price will match any today's machines. Its potential > is >> virtually unlimited...well limited to who can program it and given the >> current description of the product that will be a very finite group > indeed. >> >> Maybe just you and me Arthur. ;-) >> >> Jim >> >> -----Original Message----- >> From: dba-sqlserver-bounces at databaseadvisors.com >> [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of Arthur >> Fuller >> Sent: Thursday, August 23, 2012 5:00 AM >> To: Discussion concerning MS SQL Server >> Subject: [dba-SQLServer] Quantum Computing: Has Its Dawn Finally Arrived? >> >> This snippet from iProgrammer: >> >> A Quantum Computer > Finds >> FactorsWritten by Mike James Tuesday, 21 August 2012 10:00 >> >> The Shor quantum factoring algorithm has been run for the first time on a >> solid state device and it successfully factored a composite number. Is > this >> the start of the quantum computing revolution? >> >> Quantum computing is promised to provide many amazing advantages, but the >> one that is uppermost in the collective consciousness is its ability to >> factor numbers. The reason for this concern is that the Public Key >> Infrastructure (PKI) depends on the factoring of large numbers (600 digits >> or more) being a difficult task for a standard algorithm. In simple terms, >> public cryptography depends on the asymmetry between multiplying two > primes >> together - easy - and factoring the number that results - difficult. >> >> A quantum computer, on the other hand, promises to factor a number of any >> size in one operation and, if one can be built, the future of the PKI >> looks bleak and we would have to find encryption methods that were safe >> against a quantum attack. >> >> The summary of this can be found here: >> http://www.i-programmer.info/news/112/4679.html >> >> The original article published in Nature Physics can be found here: >> http://www.nature.com/nphys/journal/vaop/ncurrent/full/nphys2385.html >> (subscription >> required). >> > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > > _______________________________________________ > dba-SQLServer mailing list > dba-SQLServer at databaseadvisors.com > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver > http://www.databaseadvisors.com > From fuller.artful at gmail.com Fri Aug 24 15:36:16 2012 From: fuller.artful at gmail.com (Arthur Fuller) Date: Fri, 24 Aug 2012 16:36:16 -0400 Subject: [dba-SQLServer] A request for standardized questions Message-ID: I just read YASFQQ (yet another stupid forking query question) in which the poster sends the query itself and asks for advice, correction, etc. What I would really like to have, in such questions, is code to create the tables, populate them with a few sample rows, and then issue the query itself. In the absence of same, I have to hypothesize on purely syntax-related issues, and in all likelihood I am not going to respond. Give me a script that creates the tables and populates them and adds the problematic query, and chances are that you'll receive a response much more quickly than when dealing with abstractions. -- Arthur Cell: 647.710.1314 Prediction is difficult, especially of the future. -- Niels Bohr From jeff.developer at gmail.com Thu Aug 30 14:49:09 2012 From: jeff.developer at gmail.com (Jeff B) Date: Thu, 30 Aug 2012 14:49:09 -0500 Subject: [dba-SQLServer] [Cross-Posted to VB and SQL] elapsed time in ASP.Net Message-ID: Hello ALL! I am trying to determine the elapsed time on an ASP.net site. I am using VB.net for coding and SQL Server 2008 Time (7) data type for the time values. I am using a button to record a time in and a second button to record time out. What I would like to do is create a third button that would allow the users to click the button and see the elapsed time. I also want to store this value as a Time (7) data type. I have found numerous examples using datediff, but none of them seem to be working for me. Has anybody here tried this? Can someone help point me in the right direction? Thanks in Advance for ANY help! Jeff Barrows MCP, MCAD, MCSD ? Outbak Technologies, LLC Racine, WI jeff.developer at gmail.com From jeff.developer at gmail.com Thu Aug 30 14:49:39 2012 From: jeff.developer at gmail.com (Jeff B) Date: Thu, 30 Aug 2012 19:49:39 -0000 Subject: [dba-SQLServer] [Cross-Posted to VB and SQL] elapsed time in ASP.Net Message-ID: <007501cd86e8$579db3a0$06d91ae0$@gmail.com> Hello ALL! I am trying to determine the elapsed time on an ASP.net site. I am using VB.net for coding and SQL Server 2008 Time (7) data type for the time values. I am using a button to record a time in and a second button to record time out. What I would like to do is create a third button that would allow the users to click the button and see the elapsed time. I also want to store this value as a Time (7) data type. I have found numerous examples using datediff, but none of them seem to be working for me. Has anybody here tried this? Can someone help point me in the right direction? Thanks in Advance for ANY help! Jeff Barrows MCP, MCAD, MCSD Outbak Technologies, LLC Racine, WI jeff.developer at gmail.com