Forum Replies Created

Viewing 15 posts - 18,751 through 18,765 (of 18,926 total)

  • RE: Index seek vs index scan

    Here's an emxemple :

    Select col1, col2

    FROM dbo.[Bon de travail] INNER JOIN

    ...

  • RE: DateDIff ???

    This is the part that does it :

    (SELECT TOP 1 [Start Date] FROM dbo.YourTable P2

    WHERE P2.Equipment_No = PMain.Equipment_No AND P2.[Start Date] > PMain.[Start Date] ORDER BY [Start Date])

    This...

  • RE: SQL Problem

    Use master

    GO

    CREATE TABLE [NullsPourcentage] (

    [PkNullPourcentage] [int] IDENTITY (1, 1) NOT NULL ,

    [DBName] [varchar] (128) COLLATE French_CI_AS NOT NULL ,

    [TableName] [varchar] (258) COLLATE French_CI_AS NOT NULL ,

    [ColName] [varchar] (256) COLLATE French_CI_AS...

  • RE: DateDIff ???

    Here's an example from my Punch table

    SELECT FkEmploye, DateDebut, DATEDIFF(hh, DateDebut,

    ...

  • RE: Help - New to T-SQL

    All my method does is generate new random numbers everytime the query is run. But if you run this query as a subquery then it is run 1 time...

  • RE: Self Join (how to retrieve multiple records)

    Wouldn't this be simpler (assuming each combinaison is unique)?

    Select UserID from MyTable where RoleID in (1, 2, 3) Group by UserID having count(*) = 3

  • RE: record lenght

    Just a variation on mkeast's answer (so you get all tables) :

    SELECT O.Name, Sum(C.length) as MaxDataBytes

    FROM dbo.sysobjects O JOIN dbo.syscolumns C ON O.id = C.id

    where O.XType = 'U' and...

  • RE: record lenght

    I don't have a script that does that. But one thing you could do if this is a one time shot is to script out the table in QA....

  • RE: Help - New to T-SQL

    Here's an idea...

    CREATE TABLE [Numbers] (

    [PkNumber] [int] IDENTITY (1, 1) NOT NULL ,

    CONSTRAINT [Pk_Number] PRIMARY KEY CLUSTERED

    (

    [PkNumber]

    ) ON [PRIMARY]

    ) ON [PRIMARY]

    GO

    Declare @i as int

    set @i = 0

    while @i < 8000...

  • RE: Question of the Day for 14 Dec 2004

    David, this is extactly why I am wondering about the strings. I have a search sp that can be ordered by pretty much any field and always asc or...

  • RE: Question of the Day for 14 Dec 2004

    Nice shortcut. Is there a similar trick to sort dates and strings dynamically?

  • RE: SQL to rename a field where it is duplicated

    Then you can tweek the first query I posted, it should give you what you need.

  • RE: SQL to rename a field where it is duplicated

    That's not possible. A column name must be unique to a table.

    The code I gave you scans ALL the columns from all the tables for duplicate field name (excluding...

  • RE: SQL to rename a field where it is duplicated

    Hmm. Why exactly do you need to do this?? I'm currently rebuilding an application and every single little structure modification takes hours/weeks to implement. Something like this that...

  • RE: Need help with ADO Connection

    Holds true for all objects Frank... But even more for RecordSets.

Viewing 15 posts - 18,751 through 18,765 (of 18,926 total)