Forum Replies Created

Viewing 15 posts - 76 through 90 (of 111 total)

  • RE: query problem

    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...

    cheers

  • RE: Demystifying a deletion...

    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

    cheers

  • RE: query problem

    If this slove your problem then cheers otherwise let me know what should need more

    Thanks

    cheers

  • RE: query problem

     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,...

    cheers

  • RE: query problem

    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

    cheers

  • RE: How to sum values between multiple fields?

    you are right.. for the correct result there should be a group by clause on the Id and Date.

    Cheers

    cheers

  • RE: Query Analyzer permissions

    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...

    cheers

  • RE: How to delete data from a field

    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

    cheers

  • RE: update query fails in access database with SQL Server backend

    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...

    cheers

  • RE: using "IF EXISTS tablebName"

    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...

    cheers

  • RE: Huge problem with Group by

    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...

    cheers

  • RE: Huge problem with Group by

    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...

    cheers

  • RE: Separation of string

    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 +...

    cheers

  • RE: update query fails in access database with SQL Server backend

    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...

    cheers

  • RE: Drop Table

    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

    cheers

Viewing 15 posts - 76 through 90 (of 111 total)