Forum Replies Created

Viewing 15 posts - 2,941 through 2,955 (of 3,543 total)

  • RE: Convert Nvarchar to Datetime

    quote:


    I hate dates in sql


    Hey! Come on chaps, a bit tongue in cheek here.

    I do...

  • RE: Running a stored proc on table results

    Nice one Jonathan, will have to remember that one

  • RE: Convert Nvarchar to Datetime

    Oops!

    My apologies

    I hate dates in sql

  • RE: Running a stored proc on table results

    Your query will result in null because you have not initialized @mail, use

    set @mail = '' 

    or simply do this

    set...
  • RE: Convert Nvarchar to Datetime

    quote:


    SET DATEFORMAT dmySELECT KeyCol, DateColFROM YourTableWHERE ISDATE(DateCol) = 0


    Jonathan,

    Depends on language settings, eg

    English

    2003-11-15 1

    2003-15-11...

  • RE: How to format DateTime?

    If user input dates have no times then

    SELECT <Table Fields> 
    
    FROM <Table>
    WHERE <Sample Date> >= <User Input Data1>
    AND <Sample Date> < DATEADD(d,1,<User Input...
  • RE: DTS and Active X

    In SQL7 DTS, if you use a test file with the maximum number of columns and define the properties of the file, then when you use real data file, sql...

  • RE: How to merge two tables (update/insert)?

    I do this sort of thing frequently and use SP to do it. First I update first table by inner join second table on key. Then I left outer join...

  • RE: DERIVEDTBL

    It is an alias and is mandatory when using subqueries (derived tables). As CP is an alias for CustomerPwd in your example. So your query could have looked something like...

  • RE: How to replace error message with custom message?

    One way is to use temp table

    SET NOCOUNT ON 
    

    CREATE TABLE #temp (
    Owner varchar (36),
    Object varchar (62),
    Grantee varchar (18),
    Grantor varchar (36),...
  • RE: Connecting SQL Server 2000 and Visual Basic 6.0

    quote:


    Eagles fly. Turkeys skydive.


    Yeh. It's hard to fly like an Eagle when you work...

  • RE: distinct

    Duplicate data can be caused by more than 1 matching row in multiple tables or by insufficient matching of tables. You need to check what is duplicated and do as...

  • RE: problem using sp_executesql

    SET @sSQL = N'SELECT @Serial = Serial FROM ' + 
    
    @DBName +
    '.[dbo].[Transaction_Mapping] WHERE TransType = @sTransType'

    execute sp_executesql
    @sSQL,
    N'@sTransType varchar(10), @Serial varchar(10) output',
    @sTransType,...
  • RE: stored procedure prob

    select * 
    
    from P_Trade
    where charindex(','+cast(TypeId as varchar)+',',','+@Typeid+',') > 0
  • RE: Business Date Calculation

    quote:


    SELECT rt.account_id, rt.account_status, DATEDIFF(DAY,rt.status_creation_datetime,GETDATE())-COUNT(*)

    FROM Result_Table rt, Calendar_Table ct

    WHERE ct.DateField BETWEEN rt.status_creation_datetime AND GETDATE()

    GROUP BY rt.account_id, rt.account_status, rt.status_creation_datetime


    November 11, 2003 at 6:08 am

    #481565

Viewing 15 posts - 2,941 through 2,955 (of 3,543 total)