Viewing 15 posts - 316 through 330 (of 1,464 total)
Oops. I think I hit REPORT instead of QUOTE.
Using NOLOCK everywhere for performance means that your reports are most likely incorrect. How can business be expected to make informed decisions...
October 6, 2020 at 4:45 pm
SELECT TableVariableTypeName = tt.name
, ColumnName = c.name
, ColumnNumber = c.column_id
, [DataType] ...
October 5, 2020 at 2:47 pm
So, why not copy the original data to your own table in your own DB, then manipulate it from there?
If you need to cast the value, then simply do it
October 2, 2020 at 11:27 am
Thank You Des,
That works well. Could i now use this hidden table with the results to then populate another table using SSIS? Would there be any issues with it...
October 2, 2020 at 9:43 am
Des,
That is spot on, worked wonderfully, so thanks.
One last thing, can i do a WHERE clause on the "BookingDate" field to only show bookings for the last two hours?
I...
October 1, 2020 at 5:19 pm
Using basic math substitution .....
-- Fee = Sell * FeeMargin
-- Nett = Sell - Cost - Fee
-- NettMargin = Nett / Cost
----------------------------------------------------------------------------------
-- NettMargin = ( Sell - Cost - Fee...
October 1, 2020 at 3:43 pm
Look for defining characters, and split the string by those characters
DECLARE @OriginalColumn varchar(50) = 'Booked on: 20/03/2020 10:52 by: A1234567';
SELECT OriginalColumn = @OriginalColumn
,...
October 1, 2020 at 11:49 am
Looks like you just need to add an aggregate and group by
SELECT a.Internal_No
, a.TimeMode
...
September 30, 2020 at 9:34 am
This will give you only the marks that have not been used. Use the ORDER BY to get them in order. If there is nothing returned, then the box is...
September 30, 2020 at 4:22 am
Thanks for the question Jeff.
For now we only have, 6x3,6x4,6x5 and 8x5 and 8x6.
So the MAX is F6 and F8 and the Z6 will not happen.
The number of times...
September 29, 2020 at 2:57 pm
If I understand your requirements correctly, something like this should work
First create some data
DECLARE @StartDate date = '2020-04-01'
, @EndDate ...
September 22, 2020 at 6:03 am
According to your table structure, there is no index on [MULE_BATCH_ID]. This means that SQL has to do a table scan to find the record.
You are doing a select *,...
September 21, 2020 at 6:08 am
Firstly, you cannot compare anything to null. Run this code as proof.
IF ( NULL > NULL ) PRINT 'NULL > NULL' ELSE PRINT 'CANNOT COMPARE NULL >...
September 18, 2020 at 10:20 am
Without anything to test against, I would guess at a solution similar to this
WITH cteMaxTime AS (
SELECT pr.plan_id, maxTime =...
September 18, 2020 at 5:31 am
Viewing 15 posts - 316 through 330 (of 1,464 total)