Forum Replies Created

Viewing 15 posts - 7,696 through 7,710 (of 10,144 total)

  • RE: Adding a unique primary key when importing data

    Hi Brett

    Please can you post the CREATE TABLE statement for <<the second table has a primary key that is set to SEQ_NUM autoincrement>>

    Cheers

  • RE: How well do you really know your colleagues?

    "There's nowt so queer as folk".

    How many of us can remember as far back as our first four or five years? Do you remember that kid who used to experiment...

  • RE: Are the posted questions getting worse?

    Lynn Pettis (7/7/2010)


    Alvin Ramard (7/7/2010)


    CirquedeSQLeil (7/7/2010)


    Alvin Ramard (7/7/2010)


    CirquedeSQLeil (7/7/2010)


    Alvin Ramard (7/7/2010)


    Jeff Moden (7/7/2010)


    I'm either getting too old or just lazier in my old age. I no longer fight people...

  • RE: Today's Random Word!

    Cenote

  • RE: Today's Random Word!

    Tom.Thomson (7/7/2010)


    retirement is even busier, I understand.

    Keep it that way! Blokes who retire in the common sense seldom last the year.

  • RE: Basic Script Help!

    No worries.

    Grab yourself a beginners' TSQL book, there are loads on Amazon - and get to know BOL, the SQL Server on-line help guide. Basic TSQL is quick to pick...

  • RE: Basic Script Help!

    Ok...let's get started then. When scripting an UPDATE, always start with a SELECT. Something like this:

    SELECT TOP 100 [disabled], [date created]

    FROM MyTable

    WHERE [date created] < '2005-06-01 00:00:00.000'

  • RE: Basic Script Help!

    omd (7/7/2010)


    Chris Morris-439714 (7/7/2010)

    UPDATE MyTable SET [disabled] = MyNewValue

    WHERE [date created] < 'June 2005'

    Edit: This is a basic UPDATE statement, it doesn't get any easier - except you will...

  • RE: I really need some recommendations for this query

    espanolanthony (7/7/2010)


    still no comments. 17 views

    Plenty of comments!

    What have you tried so far?

  • RE: Basic Script Help!

    omd (7/7/2010)


    Chris Morris-439714 (6/21/2010)


    Looks like an UPDATE to me.

    UPDATE docsadm.shellorganisation

    SET [disabled] = 'y'

    WHERE docsadm.shellorganisation.org_name LIKE 'do not use%'

    Sorry to drag an old thread back up to the top, however...

  • RE: a syntax error

    You could split it into two possible options like this:

    IF @VarCourse_Name IS NULL

    BEGIN

    SELECT *

    FROM Course

    WHERE freetext(Course_Name, @VarCourse_Name)

    AND Course_Id = COALESCE(Course_Id, NULLIF(@VarCourse_Id, 0))

    AND ...

    END

    ELSE

    BEGIN

    SELECT *

    FROM Course

    WHERE 1 = 1

    AND...

  • RE: a syntax error

    nazaninahmady_sh (7/5/2010)


    ok, Course_Name if column name , so i wroteit correctly:

    Else (freetext(Course_Name,@VarCourse_Name))

    but there is syntax error

    As Eugene points out, this won't work because you're attempting to compare

    Course_Name with...

  • RE: a syntax error

    nazaninahmady_sh (7/5/2010)


    thank you for your notification but again i have that message:

    Incorrect syntax near the keyword 'freetext'.

    Sorry, my mistake. This is a component of full-text searching. Is full-text search enabled?...

  • RE: a syntax error

    Assuming 'freetext' is a UDF then you need to qualify it with the schema name to which it belongs, typically like this:

    (Course_Name = Case when ((@VarCourse_Name='') or (@VarCourse_Name is null))...

  • RE: Today's Random Word!

    Femidom

Viewing 15 posts - 7,696 through 7,710 (of 10,144 total)