Forum Replies Created

Viewing 15 posts - 451 through 465 (of 484 total)

  • RE: Splitting a column into Fname Lname

    The neatest is to use a function that splits the string. (i.e like the split function in VB) Such a function can be used in lots of places in an...

  • RE: Anticipate a CAST failure?

    This is a bit neater

    like replicate('[A-F0-9/-]',36)

    You needed to check for the - as well, or you could replace them with nothing.

    Simon Sabin

    Co-author of SQL Server 2000 XML Distilled

  • RE: Primary Key

    I would add that when you get above 2 columns and are using FKs then you will be giving yourself alot of heartache by using composite keys, more data, more...

  • RE: Using image files in SQL

    To import image data you can you the textcopy utility. You need to populate the table with rows and then run textcopy for each jpeg you want to import

    Simon Sabin

    Co-author...

  • RE: Varchars as IN params ??

    The two options are as already mentioned both have pros and cons

    user defined function

    Allows security to be defined at stored procedure level not table level

    dynamic sql

    Is...

  • RE: Challenge: make this dynamic SQL not dynamic

    Further more dynamic SQL involving variables should be executed with sp_executesql

    i.e select * from (@table) where column = @value.

    If @table and @value are passed in then the code should...

  • RE: CONCAT - concatenate column values

    If you just wanted one row you can use the feature of the update statement to update a local variable.

    i.e

    UPDATE myTable

    @concat = CASE WHEN @concat iS NULL THEN col ELSE...

  • RE: ISNUMERIC and CONVERT inconsistency

    He's right commas are only valid for money datatypes, this also applies when outputing values to strings the style property only works for money datatypes,

    i.e.

    select CONVERT (varchar(10),4343.00,1)

    select CONVERT (varchar(10),cast(4343.00 as...

  • RE: Is T-SQL enough to be a valuable Yukon DBA?

    I agree that they must include some set base operations into TSQL either via TSQL or via CLR code. The need one for XML, OPENXML currently uses the MSXML parser,...

  • RE: XML Document can't be created.

    Just a serious case of deja vu.

    OPENXML has been bolted on to all versions, it is probably just that in NT the memory management is better. It is nice to...

  • RE: passing xml to database

    Ok the problem I think is now that the codepage of the database does not match that of the client. I believe you will have to change either one. One...

  • RE: random query

    declare @i int

    select @i = count(*) * rand() + 1 from mytable

    select @i

    select top 1 *

    from myTable mt1

    where @i = (select count(*) from myTable mt2 where...

  • RE: Identity Sheed Problem in SQL Server 7

    You need to wrap the following code around your trigger code

    Put this at the start

    declare @idValue char(10)

    select @idvalue = cast(@@identity as char)

    And this at...

  • RE: Is T-SQL enough to be a valuable Yukon DBA?

    We had a Yukon demo a few months ago at the UK User group meeting by by Euan Garden and Patrick Conlan. It was stated that for standard data manipulation,...

  • RE: passing xml to database

    When you create a parameter for any string variable, char, nchar, varchar, nvarchar, text of ntext you have to specify a length. The simplest solution in your case would be...

Viewing 15 posts - 451 through 465 (of 484 total)