Viewing 15 posts - 421 through 435 (of 627 total)
pwalter83 (12/8/2015)
Thanks for your suggestion. However, it still doesn't help with my basic requirement. I have to convert the time duration column in excel specifically where values like 100:20:30 exist.
People...
December 8, 2015 at 8:42 am
Had some time so I added my Dynamic solution. Note that I forgot to add the column names in my first example but it looks like Luis had you...
December 4, 2015 at 1:44 pm
A simple Unpivot works but if you don't know how many columns there can be you will need to look at a Dynamic Query.
DECLARE @test-2 TABLE (colx VARCHAR(8),...
December 4, 2015 at 1:11 pm
I suspect we might need a little more information. When I read
I'm looking for customers that have the same dates for those fields.
I'm thinking all you want...
December 4, 2015 at 12:20 pm
pwalter83 (12/4/2015)
pwalter83 (12/4/2015)
GilaMonster (12/4/2015)
December 4, 2015 at 9:28 am
Here are a couple of examples but I highly recommend you read up on string functions.
https://msdn.microsoft.com/en-us/library/ms181984.aspx
DECLARE @time VARCHAR(10) = '25:10:20'
--Lazy way & will break if pattern is different
SELECT
CAST(SUBSTRING(@time,1,2) AS INT)...
December 4, 2015 at 8:02 am
Phil Parkin (11/26/2015)
So satisfying when you can improve things like that, well done.
Oh man is it ever! LOL
November 26, 2015 at 9:41 am
wendy elizabeth (11/13/2015)
what are scalar user-defined functions used in queries?
https://msdn.microsoft.com/en-CA/library/ms191320.aspx
Google is your friend. 😉
November 13, 2015 at 12:19 pm
Ok, try something like this:
DECLARE @RefInfo TABLE (schoolid int, ColumnID int, Value varchar(100))
DECLARE @test-2TABLE (schoolid int, ColumnID int, Value varchar(100), insertedDate Date)
INSERT INTO @RefInfo VALUES (1000,1,'PRI'),(2000,1,'PUB'),(3000,1,'SEMI-PUB'),(4000,1,'SEMI-PRI'),(1000,2,'ENG'),(2000,2,'MUSIC'),(3000,2,'ARTS'),(4000,2,'ENG')
INSERT INTO
November 12, 2015 at 11:08 am
Here are a couple of examples:
DECLARE @RefInfo TABLE (schoolid int, ColumnID int, Value varchar(100))
INSERT INTO @RefInfo VALUES (1000,1,'PRI'),(2000,1,'PUB'),(3000,1,'SEMI-PUB'),(4000,1,'SEMI-PRI'),(1000,2,'ENG'),(2000,2,'MUSIC'),(3000,2,'ARTS'),(4000,2,'ENG')
--USING CROSS TABS
SELECT
schoolid,
MAX(CASE WHEN columnID = 1 THEN value END) AS funding,
MAX(CASE WHEN...
November 12, 2015 at 7:52 am
Luis Cazares (11/11/2015)
yb751 (11/11/2015)
November 11, 2015 at 1:25 pm
Well I just finished talking with our Dev team and I realized that the attributes do not need to be updated individually. Also any searches would be offloaded by...
November 11, 2015 at 1:18 pm
Alvin Ramard (11/11/2015)
November 11, 2015 at 11:13 am
Brandie Tarvin (11/5/2015)
Grant Fritchey (11/5/2015)
GilaMonster (11/5/2015)
Grant Fritchey (11/5/2015)
I'd strongly suggest looking at Excel and, maybe even more importantly, PowerBI. the technology is wildly different from what we think.
PowerBI is very...
November 5, 2015 at 11:31 am
You can also just right click on the DB in question in SSMS and select reports -> Disk Usage. If you have any Autogrow or even (yikes) Authoshrink events...
November 5, 2015 at 7:47 am
Viewing 15 posts - 421 through 435 (of 627 total)