Forum Replies Created

Viewing 15 posts - 1,831 through 1,845 (of 2,171 total)

  • RE: want Single table result not in multiple tables in sql server 2000

    This code does the same thing...

     

    DECLARE @NodeAccountCode as varchar(128),

     @JobID as varchar(128)

    DECLARE @BetweenLower AS INT,

     @BetweenHigher AS INT,

     @Count AS INT,

     @Time AS varchar(128),

     @LowerTime AS varchar(128),

     @HigherTime AS varchar(128),

     @MaximumDuration AS INT

    August 24, 2006 at 1:54 am

    #656507

  • RE: want Single table result not in multiple tables in sql server 2000

    What is the CONCAT function?

  • RE: Multiple tables, columns with no data

    SET NOCOUNT ON

    DECLARE @TableName VARCHAR(200),

     @TotalRows INT,

     @SQL VARCHAR(1000),

     @ColIndex INT,

     @ColName VARCHAR(200)

    SELECT @TableName = 'vwToday'

    CREATE TABLE #Columns

      (

       ID INT IDENTITY(0, 1),

       ColName VARCHAR(200),

       TotalRows INT,

       NoDataRows INT

      )

    INSERT #Columns

     (

      ColName

    )

    SELECT column_name

    FROM information_schema.columns

    WHERE table_name =...

  • RE: Converting rows into columns

    You are selecting DISTINCT over INFO columns. And that info is not equal for the same person and same building. That's why you get two rows for Contact 8.

  • RE: Problems connecting thru 1433

    Both incoming and outgoing traffic?

  • RE: ODBC error - help

    SELECTPSQuery.System_Name,

    PSQuery.FO_Name,

    PSQuery.FO_Order,

    PSQuery.FS_Name,

    PSQuery.Purpose,

    ProjectQuery.Project_Name,

    ProjectQuery.[Project Code],

    ProjectQuery.[2005/6],

    ProjectQuery.[2006/7],

    ProjectQuery.[2007/8],

    ProjectQuery.Reason_Code,

    ProjectQuery.Completion_Date,

    [Framework Outline].Objective,

    [Framework Outline].Reference,

    PSQuery.PN_ID

    FROMProjectQuery

    INNER JOINPSQuery ON PSQuery.PS_ID = ProjectQuery.PS_ID

    INNER JOIN[Framework Outline] ON [Framework Outline].FO_ID = PSQuery.FO_ID

    WHERE ProjectQuery.[Project Code] IN ('C', 'c', 'O', 'o')

    AND ProjectQuery.Reason_Code = 'E'

    ORDER BYPSQuery.System_Name,

    PSQuery.FO_Order

  • RE: Order of an update - benefits?

    You normally can't decide which in which order an UPDATE is executed, but there are workarounds such as UPDATING the table in chunks.

  • RE: Querry performnace much faster with hardcoded set compaired to subquerry/joined table

    What about an inner join?

     

    select  f.year_id,

      f.line_id,

      f.ver_id,

      f.cust1_id

    from  epm02.finloc_base

    inner join dbo.conc_table00 a on a.mem_id = f.unit_id

    where  f.year_id = 80000003

      and f.line_id in (80000908, 80001733, 80000957)

      and f.ver_id = 80000007

  • RE: Poor performing query

    Try this one!

     

    UPDATE  FTable

    SET  FTable.var18754 = d.Var518,

      FTable.var18752 = d.Var524,

      FTable.var18753 = d.Var6428

    FROM  #Table1 FTable

    INNER JOIN #FactTable FT ON FT.Comp_ID = FTable.comp_ID AND FT.var1 = FTable.var1

    INNER JOIN [Table2] d ON d.Component = FT.Comp_ID AND d.var2...

  • RE: Poor performing query

    To start with, remove the ORDER BY clause!

  • RE: Problem with dynamic order by

    Or just

    use Northwind

    declare @SortBy char(10)

    select @sortBy = 'Name'  

     

    SELECT ASCII(FirstName) AS ASCIIValue, FirstName, LastName,    

      Years = CASE WHEN DateDiff(mm, HireDate, GetDate()) < 12 THEN...

  • RE: how to concatenate data from records into a string

    If you prefer not to have a space as first character in the concatenated string, use this

    Also prevents for concatenating too long strings.

     

    DECLARE @a VARCHAR(8000)

    SELECT @A = left(ISNULL(@A + ' ',...

  • RE: Which master db extended stored procedures used in app. db

    Yes, use SQL profiler and log all TSQL/SP queries.

  • RE: week list

    I am happy you filled in the blanks, Jeff

Viewing 15 posts - 1,831 through 1,845 (of 2,171 total)