Forum Replies Created

Viewing 15 posts - 451 through 465 (of 1,554 total)

  • RE: Foriegn Key constraint across DB

    The question may more be if having those lookuptables in a 'central' db is the best solution instead of having each db as a separate independent entity.

    But for cross-db references,...

  • RE: Bank Holiday issues

    Yeah, but it's the literal dayname, thus the result is language dependent.

    /Kenneth

  • RE: Gar!!! Really odd syntax error

    Well, the thing about nested comments -

    /* Version Control Information

    ** blah blah

    ** ns /* machine gen comt that caused the woes */ notes

    ** more notes

    ** more text

    */

    ..is that the...

  • RE: Gar!!! Really odd syntax error

    Or something like this?

    /* comment blah blah

       blah blah

       this works

    */

    select getdate()

    /* comment blah blah

       blah blah

       this will bomb due to the below batchterminator, even...

  • RE: time out expired error

    How many rows do you expect to be returned?

    Is there proper indexes in place to support your query? (name and/or textid per your example)

    How slow is 'very slow'?

    Is it always...

  • RE: using xp_cmdshell

    Please do explain a bit more what you're trying to do.

    xp_cmdshell can do what a DOS prompt can do. (it's why it's named as it is)

    Can you search those files...

  • RE: Bank Holiday issues

    Here's how to find out which particular weekday any given date is, regardless of what @@DATEFIRST is set to.

    --==== return weekday of @myDate regardless of @@DATEFIRST settings

    --==== 1...

  • RE: Primary Key Column

    Perhaps you could explain a bit more about what you really want..?

    (a written example would be nice)

    Note that 'Primary Key' and 'Unique Clustered Index' has nothing to do with eachother...

  • RE: Bank Holiday issues

    Perhaps you could benefit from a table with some more stuff in it than just each monday's date.

    Have a look here for a description of a more complete dates-table.

    http://www.aspfaq.com/show.asp?id=2519

    /Kenneth

  • RE: BCP Hint ! Rows_Per_Batch ! How do you use ?

    It could very well be to that extent...

    Another dimension missing is 'row'.. How big is a row? As long as a string, huh?

    For all...

  • RE: Length of a string

    You're correct Peter.

    However, the question seemed to be how to count how many spaces there was in a space-only string.

    The notion of dividing by two if there's a unicode string...

  • RE: Single Quote and Double Quote

    The 'correct' way to denote literal strings in T-SQL is by a single quote, not double quotes.

    If you always use single quotes, then you'll never see this problem.

    The reason being...

  • RE: Length of a string

    It's how len() works with spaces. You can use datalength() instead for your purpose.

    select len('      '), datalength('      ')

    ----------- -----------

    0           6

    (1 row(s) affected)

    /Kenneth

  • RE: Extracting data using substring and charindex?

    You probably get the 'invalid length' message because you have data where charindex finds no match. Since the substring endpoint is calculated, then it gets an invalid value.

    To fix it,...

  • RE: Get no of Rows using system table?

    Well, 'any variants' meaning any way you want but actually counting the actual rows. (afaik, the only place I can think of where you may find metadata rowcounts in 7.0 or 2k...

Viewing 15 posts - 451 through 465 (of 1,554 total)