Forum Replies Created

Viewing 15 posts - 706 through 720 (of 907 total)

  • RE: Check to see if the value is alpha

    Maybe I should have added some explaination to my post. The above post shows a method to determine if a character string contains any characters that are not alpha...

    Gregory A. Larsen, MVP

  • RE: MS Patch Applied?

    Thank you for the tip. I will check these out.

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples

    Gregory A. Larsen, MVP

  • RE: Check to see if the value is alpha

    declare @s-2 char(10)

    declare @like char(1000)

    declare @found int

    declare @cmd nvarchar(1000)

    set @s-2 = 'abcxxxxx'

    set @like = replicate('[a-z]',len(@S))

    set @cmd = 'select @found=1 where ''' + rtrim(@s) + ''' not like (''' + rtrim(@like)...

    Gregory A. Larsen, MVP

  • RE: NEWBIE : SQL Data Type?

    Either date field type will store a time. The difference is what are acceptable dates, and whether the time is store as minutes or milliseconds.

    If you truely don't what a...

    Gregory A. Larsen, MVP

  • RE: how do you do a rollup without using the rollup

    Ok, I know this is not what you where asking but here is an example the "USEs" rollup, sorry.

    http://www.geocities.com/sqlserverexamples/#sum

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check out my...

    Gregory A. Larsen, MVP

  • RE: Probably an easy one for u guys..

    If all your user databases reside on a single server you could run something like this via QA. Kind of convoluted, but will work.

    declare @cmd varchar(1000)

    set @cmd = 'if...

    Gregory A. Larsen, MVP

  • RE: using Distinct Sum

    What is the error message you are getting?

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples

    Gregory A. Larsen, MVP

  • RE: How to spool the output from a script?

    In QA there is a option called "Results to File" under the "Query" menu, or you can use "Cntl+Shift+F".

    If I am building a batch type script, I always...

    Gregory A. Larsen, MVP

  • RE: Dynamic IN with strings.

    Since you are building a string to be executed you need to change your datetime varables to a string. Use the CAST function like this:

    cast(@date1 as char)

    Also you will...

    Gregory A. Larsen, MVP

  • RE: Dynamic IN with strings.

    Wonder if the @date1 and @date2 variables could be causing the problems. What format are they and what is there value?

    Normally when I get a error in dynamic SQL...

    Gregory A. Larsen, MVP

  • RE: schedule jobs to skip holidays

    I might make the holiday_date a char(10) and only do one conversion. Only because it make SQL work a little extra.

    I would suggest you test yourself to make sure...

    Gregory A. Larsen, MVP

  • RE: schedule jobs to skip holidays

    Be aware that when you specify the "=" sign when comparing dates fields they need to be the same down to the millisecond.

    I'm guessing your holidays table contains a date...

    Gregory A. Larsen, MVP

  • RE: Finding most recent date.

    You will need to determine what it is you really want. A timestamp column will change if you update the row. Therefore it might not be the best...

    Gregory A. Larsen, MVP

  • RE: Density of indexes -> HELP !

    You might consider creating a TXT file from the output of DBCC SHOW_STATISTICS and processing through that TXT file inserting only the data you want into your table.

    Gregory Larsen, DBA

    If...

    Gregory A. Larsen, MVP

  • RE: schedule jobs to skip holidays

    A table sounds like a good, option.

    Another possibility, so the job only runs on the days you want would be to do something like this. Everyday the...

    Gregory A. Larsen, MVP

Viewing 15 posts - 706 through 720 (of 907 total)