Viewing 15 posts - 1 through 15 (of 30 total)
Hi David,
how to find count of the records for dates between today()-31 and today()-60?
February 2, 2015 at 11:38 pm
Actually I am looking for something like "Between" operator in transact query... in short
select count(*) from table where CAST(submitteddate AS DATE) between '2015-02-02' and '2015-01-01'
Not sure if my below code...
February 2, 2015 at 2:32 am
OK.. my bad.
My earlier query is somethig like this and i want to acomodate maxposteddate in this query:
...
March 9, 2012 at 8:25 am
This is what i tried:
Option 1:
SELECT base.*
FROM table base
INNER JOIN (SELECT segment, MAX([PostedDate]) AS Max (PostedDate)
FROM EBBReport
...
March 9, 2012 at 7:47 am
both the options are giving syntax error 🙁
March 6, 2012 at 8:07 am
I want to grab many of the columns including 'posted D/T' column from this table and i do not want to write individual column name in select query.
It has to...
March 6, 2012 at 7:44 am
Thanks for the reply.
What if there are n number of columns n table with ID as primary key?
Select * , MAX[Posted D/T] from MyTable
It is giving me below error:
Column 'MyTable.ID'...
March 6, 2012 at 7:37 am
oops ...i framed it wrong.
i need record set based on lateset post D/T
March 6, 2012 at 7:25 am
I have limitation not to handle it in front end.
It should be like:
123,456,78
December 20, 2011 at 5:42 am
Hi,
I have managed to create below query:
SELECT * From Report WHERE IsCurrent=0 AND (DATEPART(y,EffDate) = DATEPART(y,@EffDate)) AND EffDate > DATEADD(dd, -90, getdate())
Let me know if there is any way to...
December 20, 2011 at 3:38 am
Dave Ballantyne (4/8/2010)
As i said, you are only accounting a single row...Try this...
CREATE TRIGGER [dbo].[TriggerTestforDelete]
ON [dbo].[TriggerTest]
FOR DELETE
AS
INSERT INTO ArchivePrice(ID,Price)
SELECT d.ID, d.Price
FROM deleted d
Thanks For this.:-)
April 8, 2010 at 3:21 am
I have tried one more approach
CREATE TRIGGER [dbo].[TriggerTestforDelete]
ON [dbo].[TriggerTest]
FOR DELETE
AS
DECLARE @ID int
DECLARE @Price money
DECLARE @OldPrice money
DECLARE @NewPrice...
April 8, 2010 at 2:56 am
COldCoffee (4/8/2010)
Here is sample test code
IF OBJECT_ID('TEST') IS NOT NULL
DROP...
April 8, 2010 at 2:34 am
Lowell (4/5/2010)
nilesh k (4/5/2010)
well identity columns value is going to differ in delete and insert.so how can i make it worth?
that is not true; I can understand how it might...
April 6, 2010 at 1:15 am
Viewing 15 posts - 1 through 15 (of 30 total)