Forum Replies Created

Viewing 15 posts - 17,686 through 17,700 (of 18,926 total)

  • RE: Update query error

    Not sure you need the not null... cause if there's no price then there's no row so the join won't update the line at all.

  • RE: DTS exec error!

    Yes, you should always specify the column names for the insert before inserting the valu.

    ex :

    Insert into dbo.DummyTable (col1, col2, name) Select col1, col2, name from dbo.Table2.

    That way sqlserver...

  • RE: Slow query help needed!!!!

    My mistake.. I was referring to this script :

    CREATE TABLE [dbo].[TypesCommentairesADPS] (

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

    [DescTypeCommentaireADP] [varchar] (50) COLLATE French_CI_AS NOT NULL

    ) ON [PRIMARY]

    GO

    ALTER TABLE [dbo].[TypesCommentairesADPS]...

  • RE: Slow query help needed!!!!

    I already posted something that disproves that in this very thread... I think this is a lost cause. Let him not use the order by and get bitten later...

  • RE: Joining 2 tables

    HTH.

  • RE: Joining 2 tables

    On a last note, and outer join (left, right or cross) with a where condition like : where SomeCol = @SomeValue basically becomes an inner join if the search criteria...

  • RE: Joining 2 tables

    Select C.CategoryID, C.name, count(*) as Total from dbo.Category C LEFT OUTER JOIN dbo.Comments CM on C.CategoryID = CM.CategoryID and CM.UserId = @UserId

    GROUP BY C.CategoryID, C.name

    ORDER BY C.name

  • RE: need help with sql insert with concat

    Are the columns chars() or varchars()? If you use varchar instead of char then the trailing spaces will be removed automatically (or actually not added at all).

  • RE: DTS exec error!

    You should always use owner.objectname. You only need to add the database name for cross database/cross server queries.

  • RE: need help with sql insert with concat

    BTW this assumes that Pattern and Color cannot contain nulls

  • RE: need help with sql insert with concat

    INSERT INTO tblCatalog ( Product_ID, img )

    SELECT Product_Id, Pattern + '-' + Color + '.jpg' as img

    FROM dbo.Product_Dimension

  • RE: Joining 2 tables

    Do you mean something like this?

    Select C.CategoryID, C.name, count(*) as Total from dbo.Category C LEFT OUTER JOIN dbo.Comments CM on C.CategoryID = CM.CategoryID

    GROUP BY C.CategoryID, C.name

    ORDER BY C.name

  • RE: DTS exec error!

    I can't help you any further than this... maybe some dts guru will be more fit to solve your problem than me.

  • RE: Problem with searching a table containing apostrophes

    Wow, that's a nice quote.

  • RE: DTS exec error!

    you don't need to specify the dbname unless you are connection do northwind and want to get data from pubs.

    It's considered a best pratice to ALWAYS specify the owner of...

Viewing 15 posts - 17,686 through 17,700 (of 18,926 total)