Forum Replies Created

Viewing 15 posts - 46 through 60 (of 122 total)

  • RE: Access query with dates

    Yes CAST and GETDATE are sql server function. But you can findout similar function for Access.

    Regards,
    Nitin

  • RE: Access query with dates

    If you store month (monthColumn) and year (yearColumn) in different column then use below condition

    WHERE CAST((CAST(YearColumn AS VARCHAR) + '/' + CAST(MonthColumn AS VARCHAR) + '/01') AS DATE)

    <= CAST((CAST(YEAR(DATEADD(m, -1,...

    Regards,
    Nitin

  • RE: Access query with dates

    If you have single column for date field you can use below contition

    WHERE DateColumn < CAST((CAST(YEAR(GETDATE()) AS VARCHAR) + '/' + CAST(MONTH(GETDATE()) AS VARCHAR) + '/01' ) AS DATE)

    This will...

    Regards,
    Nitin

  • RE: Access query with dates

    Do you store date (as Date/SmallDate type) in single column or have seperate column for month and year?

    Regards,
    Nitin

  • RE: Access query with dates

    use this condition

    WHERE MonthColumn = MONTH(DATEADD(m, -1, GETDATE())) AND YearColumn YEAR(DATEADD(m, -1, GETDATE()))

    Regards,
    Nitin

  • RE: How to join multiple columns to one column

    josephptran2002 (1/29/2009)

    From dbo.CTCleared FULL OUTER JOIN dbo.TotalCleared on dbo.CTCleared.CTClearedDate = dbo.TotalCleared.ClearedDate FULL OUTER JOIN dbo.BOCleared on dbo.BOCleared.BOClearedDate = dbo.TotalCleared.ClearedDate

    FULL OUTER JOIN dbo.NHCleared on

    dbo.NHCleared.NHClearedDate = dbo.TotalCleared.ClearedDate

    AND

    dbo.CTCleared FULL OUTER JOIN dbo.TotalCleared on...

    Regards,
    Nitin

  • RE: Celebration

    Congratulations to Steve, Andy, Brian and Redgate....

    Regards,
    Nitin

  • RE: Find Latest version of an object in different database

    You can run below query and check for modify_date field.

    select * from sys.objects WHERE type='P'

    This will work if you have used ALTER PROCEDURE statement to change the procedure.

    If you...

    Regards,
    Nitin

  • RE: Time bound triggers

    I am agree with Jack. WAITFOR.... will kill the system as it will not complete the transaction until trigger gets executed. (correct me if I am wrong).

    Chandramohann,

    I guess your...

    Regards,
    Nitin

  • RE: What to know what is Latching in sqlserver and how it works

    Latches are very lightweight, short-term synchronization objects protecting actions that need not be locked for the life of a transaction. They are primarily used to protect a row when read...

    Regards,
    Nitin

  • RE: How to select Range of Records?

    Try below query....

    USE AdventureWorks;

    GO

    WITH OrderedOrders AS

    (

    SELECT SalesOrderID, OrderDate,

    ROW_NUMBER() OVER (ORDER BY OrderDate) AS 'RowNumber'

    FROM Sales.SalesOrderHeader

    )

    SELECT *...

    Regards,
    Nitin

  • RE: Database Diagram

    Hey Lee,

    As Grant has mentioned, you can create diagram using management studio. But It will give relations only if you have specified the FKs. If you didn't specify the...

    Regards,
    Nitin

  • RE: Database Diagram

    There is no way to get the navigation flow, if you have not specified the FKs.

    If wish to see the whole database in one document. see this link

    http://www.codeproject.com/KB/database/SQL_DB_DOCUMENTATION.aspx

    Regards,
    Nitin

  • RE: Copy primary keys from one table to another (SQL2K)

    you can refer this link for further referenc

    http://www.codeproject.com/KB/database/SQL_DB_DOCUMENTATION.aspx

    Regards,
    Nitin

  • RE: Copy primary keys from one table to another (SQL2K)

    Below queries may be useful to you. You can generate CREATE statment for table structure using these queries.

    SELECT * INTO FROM db.TableName

    SELECT A.name, B.name, D.name, B.type_desc FROM sys.key_constraints...

    Regards,
    Nitin

Viewing 15 posts - 46 through 60 (of 122 total)