Forum Replies Created

Viewing 15 posts - 16 through 30 (of 35 total)

  • RE: select statement

    smfiber,

    If you join it as you, for each record in one table you'll get all the records in the other table. Although the where clause will cut it down...

  • RE: Comparing fields that have null values.

    Although I prefer using COALESCE as it is far more explicit when reading the sql you can also SET ANSI_NULLS OFF which and the system will happily compare Nulls.

    cheers,

    Mike

  • RE: How to suppress messages

    jraha,

    Whilst creating an index with IGNORE_DUP_KEY will work I'm wondering how you go about identifying the lines that failed on the import and hence why you don't just fix them...

  • RE: Importing data from txt file (fixed length fields)

    I've only ever imported csv files so haven't had the problem, and I assume that if you specify a format file you can't specify a row delimiter or you would...

  • RE: Collate clause

    Greg,

    You can't alter a text column.

    From the alter table help file...

    <<<<<<<<<<<<<<<<<<<<<

    ALTER COLUMN

    Specifies that the given column is to be changed or altered. ALTER COLUMN is not allowed if the compatibility...

  • RE: Data Type Question

    I agree with JBoals.

    The data should be stored as an integer. Following normalised database structure you can then create another table - Units - with all the different possible...

  • RE: Database ID

    doh - I should've found that given it's next to db_name in the help index.

    Incidently - If you leave out the name it'll return the current database id.

    cheers,

    Mike

  • RE: Database ID

    this'll work

    select dbid from master.dbo.sysdatabases

    where name = db_name()

    Not sure if there's an sp that does the same

    cheers,

    Mike

  • RE: Insert Into w/ indentity col

    But at least you can get Query analyser to help you with listing the columns (if you're using 2000) by right clicking and scripting to knew window the insert. ...

  • RE: Create Triggers Dynamically

    Instead of deleting and recreating it why don't you just disable and reenable.

    ALTER TABLE <tablename> DISABLE TRIGGER <triggername>

    ALTER TABLE <tablename> ENABLE TRIGGER <triggername>

    cheers,

    Mike

  • RE: Procedure and Command datatypes

    I'm assuming the Session("Ethnicity") is being set with a zero length string when no value is entered. This will fail. A Null will work and a valid integer...

  • RE: Building SQL with T-SQL

    Hey Mike,

    is this table being used a lot? If so any reason why you're not creating and maintaining an ADO recordset and doing a .addnew and a .update.

    Cheers,

    mike

  • RE: SQL Queries in Excel using Excel cells as argument

    Carl,

    This seems more an excel/ADO question than T-SQL. There are a few ways of referencing it. If you can run the query from excel then just...

  • RE: programmatically load and execute sql script

    Steve,

    > Like dynamic sql, this is asking for an injection attack.

    Can you explain what that means?

    Cheers,

    Mike.

  • RE: Searching in stored procs code

    A bit late but here's the same I picked up somewhere that was wrapped in a stored proc ...

    /* CREATE PROCEDURE sp_FindStringInCode

    -- Input variables, default null for custom...

Viewing 15 posts - 16 through 30 (of 35 total)