Forum Replies Created

Viewing 15 posts - 1 through 15 (of 321 total)

  • RE: Deleting duplicates from 37 million Records

    LOL had same issue (~100M) .... BUT do you have a proper way to say WHICH of those records are the VALID ones? It might not be the MAX(ID) take...

  • RE: Large Number of Tables (1,090,000)

    Depending on how much data you need to be available for "every day work" you might wanna consider "archiving" some of data since you must have a lot of data...

  • RE: Linked server problem

    ali.m.habib (7/28/2009)


    Lowell (7/28/2009)


    show us your function call;

    here's an example of using a linked server to get a function call back, does this help?

    exec ServerName.master.dbo.sp_executesql N'Select SERVERPROPERTY(''MachineName'')'

    select [LINKEDSERVER1].DB.dbo.T_DATE('D')

    this run the function...

  • RE: Dynamic Proc

    Mike Levan (12/18/2007)


    when i tried doing this

    select startDate from tblemp where startDate between '1/1/2006' and '12/31/2006'

    i dont get that date range, why?

    startdate is varchar(100), I Cant change that in the...

  • RE: Dynamic Proc

    Mike Levan (12/18/2007)


    hey i didnt follow tht..

    i am declaring my paramter as datetime and passing the parameter value as '07/01/2005'

    you should read some articles about Manipulating And Using DateTime Data...

  • RE: Dynamic Proc

    Mike Levan (12/18/2007)


    @begindate datetime

    problem is when you pass param you pass a string and the SQL engine does the conversion for you. If you want to work all the...

  • RE: Dynamic Proc

    If you really want to use the format with parameters than you CAN T put your command into a variable and have more than 4k chras since for SP_EXECUTESQL complex...

  • RE: Dynamic Proc

    DECLARE @beginDate varchar(30)

    DECLARE @EndDate varchar(30)

    DECLARE @emp varchar(4)

    DECLARE @dbName sysname

    SET DATEFORMAT MDY

    SET NOCOUNT ON

    SET QUOTED_IDENTIFIER OFF

    SET @beginDate = '12/5/2007'

    SET @endDate = '12/15/2007'

    SET @Emp = 'abcd'

    SET @dbName= 'BO2'

    DECLARE @SQLCmd nvarchar(4000)

    SET @SQLCmd =...

  • RE: Dynamic Proc

    You better post the error that your getting (doubt that your string is longer than 4k nchars)

    DECLARE @beginDate datetime

    DECLARE @EndDate datetime

    DECLARE @emp varchar(4)

    DECLARE @dbName sysname

    SET DATEFORMAT MDY

    SET NOCOUNT ON

    SET @BeginDate...

  • RE: How to install SQL Server 2005 on the 2nd node of a cluster?

    binaries will be on both nodes data files and log files will be on the shared drive

  • RE: how to restrict number of rows returned in a query

    check SELECT TOP n .... too might be enaugh for what you need

  • RE: Dynamic Proc

    Mike Levan (12/13/2007)


    THank yuou very much Ray

    I cud do that but am getting another error

    Msg 241, Level 16, State 1, Line 6

    Syntax error converting datetime from character string.

    try

    SET @BeginDate =...

  • RE: Select where not null

    SET NOCOUNT ON

    DECLARE @T Table(id integer,date datetime,bbb varchar(15),mob varchar(15))

    DECLARE @CustomerID int

    SET @CustomerID=1

    INSERT INTO @T SELECT 1,'20071231',null,null

    INSERT INTO @T SELECT 1,'20061023',null,null

    INSERT INTO @T SELECT 1,'20051114',null,'0774444444'

    SELECT TOP 1 *,COALESCE(bbb,mob) Result FROM @T...

  • RE: SQL crosstab query for Differential dates

    One question some machines that need not be considered are in the tmp table. They are not in the final results. So the end results are fine. Will it improve...

  • RE: SQL crosstab query for Differential dates

    --I think the whole design is flawed...

    --nothing tells me when the machine is working K with no complains. In your sample data WHAT will tell me that there were no...

Viewing 15 posts - 1 through 15 (of 321 total)