Viewing 15 posts - 5,416 through 5,430 (of 26,490 total)
forrest77 (4/24/2015)
CREATE TABLE [dbo].[EditLog](
[Id] [INT] IDENTITY(1,1) NOT NULL,
[EditDate] [DATETIME] NOT NULL,
[PlanId] [INT] NOT NULL,
[TransId] [INT] NOT NULL,
[EntityId] [INT] NOT NULL,
[QtyPrior] [FLOAT] NULL,
[QtyAfter] [FLOAT] NOT...
April 24, 2015 at 3:26 pm
Taking the "sample data" you posted as if it were the data in a table, here is how I would get the most recent row of data for each PlanId:
/*
Id...
April 24, 2015 at 3:24 pm
forrest77 (4/24/2015)
April 24, 2015 at 3:10 pm
forrest77 (4/24/2015)
RETURNS @EditLog TABLE(
Id INT NOT NULL
,EditDate DATETIME NOT NULL
,PlanId INT NOT NULL
,TransId INT NOT NULL
,EntityId INT NOT NULL
,QtyPrior FLOAT NULL
,QtyAfter FLOAT NOT NULL
,Description VARCHAR(255) NULL
,NotText NVARCHAR(max) NULL
)
AS
BEGIN
INSERT...
April 24, 2015 at 3:07 pm
I think you are making this harder than it actually is. Could you post the DDL (CREATE TABLE statement) for the tables involved, some SAMPLE data for both tables...
April 24, 2015 at 1:28 pm
CELKO (4/24/2015)
Of course there is, since you can cast the number to a string any time you want, although you'd never need to compute a check digit that's already...
April 24, 2015 at 1:22 pm
Steve Jones - SSC Editor (4/24/2015)
jonathan.crawford (4/24/2015)
April 24, 2015 at 8:25 am
jonathan.crawford (4/24/2015)
April 24, 2015 at 8:04 am
mistylove98 (4/23/2015)
delete LMOrders where OrderDate between 10-10-1996...
April 23, 2015 at 12:19 pm
Well, that is the result of that particular query. You inserted a single row of data into a table and SQL Server reported 1 row inserted.
If you had surrounded...
April 23, 2015 at 12:15 pm
mistylove98 (4/23/2015)
I get this error when i try it that wayMsg 241, Level 16, State 1, Line 1
Conversion failed when converting date and/or time from character string.
Is ShippedDate actually a...
April 23, 2015 at 11:59 am
ScottPletcher (4/23/2015)
April 23, 2015 at 11:10 am
Not quite how I would do it, but give this a try:
delete from
dbo.LMOrders
where
OrderDate between '19961010' and '19961025'
and ShippedDate...
April 23, 2015 at 11:03 am
Make the following change to your code above:
SET @cmd = '"copy ' + @dir + '\*.*' + ' ' + @extPAth +'"'
April 23, 2015 at 10:59 am
Viewing 15 posts - 5,416 through 5,430 (of 26,490 total)