Forum Replies Created

Viewing 15 posts - 676 through 690 (of 698 total)

  • RE: Can this be done????

    dcarpenter (7/16/2009)


    I have a table in my database like the one below

    Table - placementconsultant

    placementid PK

    ...

  • RE: Concatenate variable length rows

    How is the data stored currently? Is your problem at the importing stage, IE in the text file it's split like that? Or is it in the database already, in...

  • RE: IN not working on SP

    It's hard to say from the code you've posted, since there's no example data or table structure, but this seems off to me:

    Create Procedure Test (@Name varchar(100))

    As

    Declare @DupName varchar(100)

    Declare @TempName...

  • RE: Pivot query problem - can this be done ?

    Here you go. Adapted one of my earlier queries to fit. Note that there's a few limitations - you can't have more than a certain number of columns in a...

  • RE: join on possible empty table + multiple rows in one

    If you need each date in a separate column, and you know exactly how many date values you can have, then you can use a Pivot table to pivot the...

  • RE: Update multiple tables

    manikandan (7/15/2009)


    how to Perform update in multiple tables using single sql query

    There is one other approach you can use, and that's to use the system stored proc sp_MSforeachtable. It's a...

  • RE: query running now for over 3 hours

    Robert klimes (7/14/2009)


    I believe that the default constraint will only work for newly inserted row not existing ones.

    Looks like you're right - didn't realize that. Unfortunate :/

  • RE: query running now for over 3 hours

    well, not really sure what you mean by automate it, but if you want the script to create a column with a default value, it's:

    ALTER TABLE [TableName] ADD [ColumnName] DEFAULT...

  • RE: a query that creates two columns with CASE

    This should do what you need, though of course, the condition statements will probably be more complex 😛

    Keep in mind that you can have nested CASE statements, and you can...

  • RE: Collecting a number of text fields together using group by

    You could probably do it with a Pivot table. It might not present you the results the same way you want to see them though. EG:

    DECLARE @TempTable TABLE

    (

    ID INT,

    [Description] VARCHAR(100)

    )

    INSERT...

  • RE: combine queries

    In that case i think your best bet is to just stick with what you have. Any other solution is going to involve a more complex WHERE clause which will...

  • RE: combine queries

    The two cases look identical, am I missing something?

    Depending on what you want to do, you could do something like:

    declare @OtherAddressDetails nvarchar(1000)

    set @OtherAddressDetails ='member address' -- or to whatever...

  • RE: query running now for over 3 hours

    if you just want to change that field to an empty string, maybe dropping the column and then making a new column with the default value of empty string would...

  • RE: EXECUTION PLAN BUG

    terrance.steadman (7/10/2009)


    Greetings,

    This might not be a way to cause it to process in the correct order, but it would still work.

    SELECT

    field1

    FROM devTable

    WHERE

    ISNUMERIC(field1) = 1

    AND...

  • RE: Increasing the values in a column

    That being said, you should be careful about doing an update on a large number of rows, in a production database, since the operation will lock the rows that are...

Viewing 15 posts - 676 through 690 (of 698 total)