Viewing 15 posts - 841 through 855 (of 3,489 total)
You have to specify defaults when you create the table using the DEFAULT keyword. Then if you don't specify a value for that column when you insert a new record,...
January 4, 2020 at 9:32 am
It's easier to start with one fact table and create dimension tables for that. It's certainly possible to have more than one fact table in a model, but if you're...
January 3, 2020 at 3:37 am
Use the Import/Export wizard to create an SSIS package that does it?
January 2, 2020 at 4:34 pm
There's probably a better way, but one option is to automate Word.
Open file,
Run Replace
Save
Go to next file. (you can use DIR() to get the next file)
December 30, 2019 at 1:21 am
like this?
-- create some consumable data...
CREATE TABLE test(
txtdatetime varchar(50)
);
GO
INSERT INTO test(txtdatetime) values ('12-18-2019 T 09:00 AM')
,('12-18-2019')
,('12-15-2019');
SELECT txtDateTime As origvalue
, CAST(REPLACE(txtDateTime,' T','') AS DateTime) AS testreturn
FROM test;
December 18, 2019 at 5:55 pm
" I would like to start the count over again for each dealer"
You need to use PARTITION BY to do that. It's analogous to GROUP BY, but works inside windowing...
December 14, 2019 at 1:53 am
Repeat On New page doesn't work? Is this a matrix or a Tablix?
I created a Tablix on a report and selected the first column's header (after showing advanced properties), and...
December 11, 2019 at 4:20 am
2600 points and you don't know how to post a question?
Help us help you. Please read this article and re-post your question:
December 4, 2019 at 1:33 am
WHy are you doing this part?
FileGrowthInMB = CASE WHEN a.TotalSize_in_MB > a.PreviousSize THEN a.TotalSize_in_MB - a.PreviousSizeELSE a.PreviousSize - a.TotalSize_in_MB
You're reporting the size change as growth whether or not it's actually...
December 1, 2019 at 6:46 am
Unless you're using a super old version of SQL Server, this should work fine:
SELECT [Policy]
, BatchMonth
, Amount
, LAG(Amount,1) OVER (PARTITION BY [Policy] ORDER BY BatchMonth) AS PrevMonthAmount
FROM #dummy
ORDER BY [Policy],...
November 9, 2019 at 8:42 pm
Your tables are pretty, but that's not a helpful way to post sample data. Useful is stuff we can copy & paste into SSMS and run it. Please read this...
November 9, 2019 at 4:24 am
This is close... hopefully someone can figure out the one part I can't.
I wonder if I can upload .rar files... wish me luck.
October 22, 2019 at 2:19 am
Phil,
I got the REPLACE stuff to work consistently correctly only if I looped (yep, dirty word) until all the double spaces were replaced. For example, if the input string had...
October 17, 2019 at 5:05 am
Viewing 15 posts - 841 through 855 (of 3,489 total)