Viewing 15 posts - 2,731 through 2,745 (of 3,957 total)
You can also get these from SYS tables if you prefer:
SELECT b.name, b.object_id, b.parent_object_id, b.type_desc
FROM sys.all_objects a
INNER JOIN sys.key_constraints b
ON a.object_id = b.parent_object_id
WHERE b.type_desc = 'UNIQUE_CONSTRAINT'
UNION...
September 24, 2012 at 1:35 am
anonymous2009 (9/21/2012)
Thanks!The link covers Primary Key and Default Constraint, but not the Foreign Key and Unique Constraint.
Do you have any pointers on those?
This may help you to find UNIQUE and...
September 24, 2012 at 1:14 am
Just having a little bit of fun here as the requirements are clearly unclear. 😀
DECLARE @Accts TABLE
(ACCOUNT VARCHAR(10), QTR1 INT, QTR2 INT, QTR3 INT, QTR4 INT)
DECLARE...
September 24, 2012 at 12:30 am
Here's another way using (mostly) Paul's set up data:
-- Demo table structure
DECLARE @Example
AS TABLE
( ClaimKey integer,
SequenceNumber ...
September 24, 2012 at 12:12 am
Can you provide expected results in each of the 4 tables after the update you want to perform is applied.
I looked at your description and maybe my brain is just...
September 23, 2012 at 11:51 pm
I'm not sure why no one mentioned this (maybe I missed it?) but my favorite way to keep the pieces of a complex query understandable is Common Table Expressions.
I think...
September 23, 2012 at 11:33 pm
I'll be honest that I don't really understand the way you've expressed your requirement, however I believe this solution matches the result set you listed.
-- Solution 3: List combinations up...
September 23, 2012 at 7:02 pm
Eugene Elutin (9/21/2012)
Will do the same, but it's to obvious...
I think the harder question would be: How to return 4 without using number in SELECT,
finding SELECT LEN($), would...
September 21, 2012 at 7:07 am
Eugene Elutin (9/21/2012)
dwain.c (9/21/2012)
Still a tie then:
SELECT DAY($)
I thought the Cup is given to whoever comes first...
:hehe:
I'll settle for an honorable mention.
September 21, 2012 at 6:52 am
Still a tie then:
SELECT DAY($)
September 21, 2012 at 5:30 am
It runs in SQL 2008.
September 21, 2012 at 4:22 am
Andy Hyslop (9/21/2012)
Hi DwainNot allowed to use numbers in the SELECT 😉
Write the shortest code that produces results as 1 without using any numbers in the select statement. using sql
Oh!...
September 21, 2012 at 3:46 am
David Moutray (9/20/2012)
GilaMonster (9/20/2012)
David Moutray (9/20/2012)
Somehow I think SELECT LEN('a') is too simple for Dave's competition. There must be some really obscure way of returning a 1.
I can think...
September 21, 2012 at 3:37 am
egerencher (9/21/2012)
September 21, 2012 at 12:36 am
egerencher (9/21/2012)
September 21, 2012 at 12:06 am
Viewing 15 posts - 2,731 through 2,745 (of 3,957 total)