Viewing 15 posts - 631 through 645 (of 2,007 total)
barryocteau (6/1/2012)
A simple single column query of, say, names.
Would like to organize the data returned as such:
A
Apples
Appricots
B
Banana
Blue Berries
C
Clementime
....
.....
Not...
June 1, 2012 at 9:16 am
There's way too much there for me to type it all out, so I'll give you the general idea and you can take it from there.
First, let's put your XML...
June 1, 2012 at 2:17 am
farooq.hbs (6/1/2012)
I have Values Like this
Project Name ...
June 1, 2012 at 1:36 am
Because it makes me a better developer.
I've been working with SQL Server for 3 years (nearly), and have been on this site for the last 2 years. I'm a junior...
May 31, 2012 at 9:34 am
SQLKnowItAll (5/29/2012)
use tempdb
go
declare @test-2 varchar(125)
SET @test-2 = 'barrington, il 60010-4020'
SELECT RIGHT(@test, 10) AS zip, SUBSTRING(@test, CHARINDEX(',',@test)+2, 2) AS state,...
May 29, 2012 at 9:43 am
AndrewSQLDBA (5/29/2012)
May 29, 2012 at 9:29 am
AndrewSQLDBA (5/29/2012)
You mean that I cannot have both? 😀Fast of course. I take it if I want fast I should follow what was first sent.
Andrew SQLDBA
As of the last time...
May 29, 2012 at 9:21 am
AndrewSQLDBA (5/29/2012)
Do what?I was hoping for something a little more simple that what is shown on that page.
Thanks
Andrew SQLDBA
Do you want simple or fast? 😉
Technically, if you can use CLR...
May 29, 2012 at 9:06 am
david.bennett2 (5/29/2012)
Not sure this helps but, there is the full code:CREATE NONCLUSTERED INDEX [<Name of Missing Index, sysname,>]
ON [dbo].[srvrpf] ([AONROV],[AORCCD],[AOSTA9],[AOCEK6],[AOSVCD])
INCLUDE ([AOCMPY],[AODIVN],[AOFMAJ])
This: -
EXEC sp_rename N'[srvrpf].[<Name of Missing Index, sysname,>]', N'WHATEVER_NAME_YOUR_WANT_HERE', N'INDEX';
Or...
May 29, 2012 at 7:31 am
CELKO (5/28/2012)
NO. SQL is a set-oriented declarative language. We do not loop...
May 29, 2012 at 4:21 am
First, this is how you should post your sample data: -
SELECT WorkId, WorkName, CurrentStatus,
ActualStartDAte, ActualEndDate, ParentWorkId
INTO #yourTable
FROM (VALUES(100,'Define','Proposed','25-05-2007','26-06-2008',100),
...
May 25, 2012 at 4:32 am
Michael Valentine Jones (5/24/2012)
Brevity and obscurity
declare @ char(3)
set @=0
while @<100
begin
set @=@+1
case when @%15=0 then 'FizzBuzz'
when @%3=0 then 'Fizz'
when @%5=0 then 'Buzz'
else @ end
end
If I was asked this in an interview,...
May 25, 2012 at 1:54 am
Fizzbuzz is your evil interview? Really? It's as old as dirt (as are the solutions) 😛
WITH t1 AS (SELECT 1 N UNION ALL SELECT 1 N),
t2 AS (SELECT 1...
May 24, 2012 at 5:22 am
Viewing 15 posts - 631 through 645 (of 2,007 total)