Viewing 15 posts - 16 through 30 (of 394 total)
I'm not quite sure what you're trying to do here.
Where exactly do you want to add the +1?
Is it an extra column, or do you want to update...
October 3, 2018 at 3:30 am
It's not totally clear what you want, but here are a couple of ideas:
(I've changed the column name to "PrincipalBalance".)
-- Show only...
September 21, 2018 at 3:27 am
USE [tempdb]
DROP TABLE [dbo].[Test1];
CREATE TABLE [dbo].[Test1]
(Item Varchar(10), [Type] Varchar(20), Cost_Of_Sales Decimal(12, 6), Quantity Int);
INSERT INTO [dbo].[Test1]
VALUES
('11827350', 'Parts', 11.5, 2),
('11827350', 'Service', 5.880235, 2),
September 20, 2018 at 3:29 am
How about this:
SELECT KidID, MAX(EndDate) as MaxEndDate
FROM [dbo].[Payments]
WHERE EndDate < GETDATE()
GROUP BY KidID;
September 12, 2018 at 8:31 am
Hi - Have you still got a problem with this?
I ran it & it worked OK, as it stands:
USE [tempdb];
GO
DROP...
August 20, 2018 at 3:45 am
Left join to Udf table filtered on 25 only, & only show staff with no join:
SELECT Staff.Person_id, Udf.value as Value, Staff.Forename, Staff.Midname, Staff.Surname,udf.field_id,
Staff.employment_end
FROM...
August 15, 2018 at 4:05 am
August 13, 2018 at 8:07 am
August 13, 2018 at 7:00 am
Is this a locale issue? What country are you in?
August 9, 2018 at 10:08 am
Try
SELECT Color
FROM mytable
WHERE Seq = (SELECT MAX(Seq) FROM mytable)
August 9, 2018 at 9:44 am
I think that message means that you have got a value that's not a date somewhere in the column.
It's not a blank or an invalid date.
August 9, 2018 at 8:49 am
What format is the character date?
August 9, 2018 at 7:44 am
This might come in handy:
SELECT [TableName] = OBJECT_NAME(object_id),
last_user_update, last_user_seek, last_user_scan, last_user_lookup
FROM sys.dm_db_index_usage_stats
WHERE database_id = DB_ID('MyDB')
See: https://sqlandme.com/2014/03/11/sql-server-how-to-get-last-accessupdate-time-for-a-table/
August 8, 2018 at 9:10 am
Try this, uncomment the EXEC statement.
DECLARE @SQLTemplate NVARCHAR(MAX)
, @SQLCmd NVARCHAR(MAX)
,...
August 8, 2018 at 9:03 am
Viewing 15 posts - 16 through 30 (of 394 total)