Forum Replies Created

Viewing 15 posts - 196 through 210 (of 240 total)

  • RE: Refrence Input Param-Brain Farting I suppose

    How can you say that based upon the code snippet provided?

    This could very will work if via some frontend application, a @TYPE of 1 is passed in to signify the...

  • RE: sp_execute and errors

    I don't know how to continue but since you are specifing a linked server for accessing each database, you could ensure the account used for the security context of the...

  • RE: is there any datatype for duration

    Just a word of advice on only storing the duration.  You will be losing valuable data about when the visit occurred if you don't store the start and end times. ...

  • RE: sp_execute and errors

    This is how I normally execute dynamic SQL and it does continue on an print out an error message.

    declare @sql varchar(8000)

    declare @ErrorNum int

    select @sql = 'select * from foo'

    exec(@SQL)

    select @ErrorNum...

  • RE: Create date of an object

    You can use the following:

     

    USE master

    EXEC sp_configure 'allow updates', '1'

    go

    RECONFIGURE WITH OVERRIDE

    go

    use [db-to-update-the-objects-in]

    update sysobjects

    set crdate = '01 Jan 2006'

    go

    USE master

    EXEC sp_configure 'allow updates', '0'

    go

    RECONFIGURE

    go

  • RE: SQL Server 2000 won''''t check stored procedure semantics anymore

    It is always a good idea to test a procedure after developing it.  This will catch the errors because the execution will fail.

  • RE: Week Number

    This returns 4 for '29 Jan 2006'

    ---------------------

    declare @date datetime

    select @date = '29 Jan 2006'

    SET DATEFIRST 1

    BEGIN

       DECLARE @renWeek int

       SET @renWeek= DATEPART(wk,@DATE)+1

          -DATEPART(wk,CAST(DATEPART(yy,@DATE) as CHAR(4))+'0104')

       IF (@renWeek=0)

          SET @renWeek=dbo.renWeek(CAST(DATEPART(yy,@DATE)-1...

  • RE: get a list of similar strings

    SOUNDEX and DIFFERENCE will work with something like this:

    declare @Customer Table (customerID int identity(1,1), customername varchar(50))

    insert @Customer(customername) values ('Gap Online')

    insert @Customer(customername) values ('Gap-Online')

    insert @Customer(customername) values ('American Large Colony Hotl')

    insert @Customer(customername)...

  • RE: Create CHECK over FK field

    What is the table definition for Service, specifically the ServiceRestrictionElement column?

  • RE: is there any datatype for duration

    I would store the duration as the seconds elapsed and allow the front end to present the data in any format desired, hh:mm:ss in your case.  Also, there may be...

  • RE: weekly Duplicate checking

    What I mean is that as part of the code that inserts a new customer, populate a column with the SOUNDEX of the stripped down customer name.  An example script...

  • RE: Where clause not working

    It is probably not the cause but in the DCR table, customernumber is declared as varchar(50) while in the customer and master tables, customer is declared as varchar(7).  Since they...

  • RE: Error - is not a recognized function name

    You have to preface the function in the select with dbo.  An example is:

    SELECT @i = dbo.fn_test(10)

     

  • RE: temporary tables

    If you need temp tables, move the code to a stored procedure on the SQL server and call it from the .ASP code.

     

  • RE: Where clause not working

    The problem is with your data.  What does this return?:

     select count(*) from master m inner join customer c on m.customer = c.customer

    How about this?

     select count(*) from master m inner join...

Viewing 15 posts - 196 through 210 (of 240 total)