Viewing 15 posts - 76 through 90 (of 111 total)
Hi,
I have create the table to test my query and you can use the table you already have. There is no need to change the the query. If you want...
November 15, 2006 at 4:33 am
Here he is specify the age of data.
select @day1 = dateadd(mm,datediff(mm,0,getdate()),0)
This shows that the start of the current month...
Cheers
November 15, 2006 at 4:10 am
If this slove your problem then cheers otherwise let me know what should need more
Thanks
November 15, 2006 at 3:49 am
CREATE TABLE Suppliers (SupplierID Int, RegistrationDate Datetime)
INSERT INTO Suppliers(SupplierID,RegistrationDate)
SELECT 1, Getdate() UNION ALL
SELECT 2, Getdate() UNION ALL
SELECT 3, Getdate()-1 UNION ALL
SELECT 4, Getdate()-1 UNION ALL
SELECT 5, Getdate()-2 UNION ALL
SELECT 6,...
November 15, 2006 at 3:47 am
Let me know that you need the query like cross tab for each date should be come the column and the count become the coulmn value
November 15, 2006 at 3:35 am
you are right.. for the correct result there should be a group by clause on the Id and Date.
Cheers
November 15, 2006 at 3:13 am
Hi,
These two option are gray out when you need to modify a table. As when you use alter on a table its means that you need to modify the column or constraints. That...
November 13, 2006 at 8:19 am
Hi,
You should need to update that field value with the required by you...
UPDATE TABLE1 SET RequiredField = NULL
WHERE Condition = BLA BLA...
Thanks.. I hope this will slove your problem
November 9, 2006 at 9:49 am
It would be a best thing for you that you can used a pass through query and make the stored procedure on the SQL Server and used it as a...
November 8, 2006 at 6:31 am
The correct syntax is look like
if exists
(select * from dbo.sysobjects where id = object_id(N'[table1]')
and OBJECTPROPERTY(id, N'IsUserTable') = 1)
select * from table1
else
--Print Table1 does'nt exists
end if
Hope this will slove...
November 8, 2006 at 3:27 am
You there ... I have run the code provided by you and I have get the following results.
Without Group by
2006-03-24 21:37:19.000
2006-03-25 10:23:05.000
2006-03-24 21:37:19.000
2006-03-25 10:23:05.000
1.0
With Group by
2006-03-24 21:37:19.000
2006-03-24 21:37:19.000
2006-03-24 21:37:19.000
2006-03-25 10:23:05.000
1.0
If...
November 8, 2006 at 3:22 am
Hi,
I you look carefully of your code then you will come to know that there is no problem in the result return by the query.
You are group by on the...
November 8, 2006 at 2:31 am
Have a look ofn this....I think it would full file your requirement.
SELECT 'SALSTERR' = SubString(A.LOCNCODE,1,3) + ' - ' + case when substring(A.LOCNCODE, 4, 1) = 'C'
then A.SALSTER +...
November 8, 2006 at 2:19 am
Hi,
In sql server the sentax is slightly different... the query should be like this
UPDATE tblRecruitmentStage SET tblRecruitmentStage.StudyCodeID = forms!frmProject!StudyCodeID, tblRecruitmentStage.RecruitmentStage = "Other"
FROM tblProject LEFT JOIN tblRecruitmentStage ON tblProject.StudyCodeID = tblRecruitmentStage.StudyCodeID
WHERE...
November 8, 2006 at 2:14 am
Hi,
you are forcefully making a rollback and asking for why it should be rollback...
Begin tran
drop table <table name>
IF @@ERROR > 0
rollback
ELSE
commit
November 8, 2006 at 2:09 am
Viewing 15 posts - 76 through 90 (of 111 total)