Forum Replies Created

Viewing 15 posts - 14,791 through 14,805 (of 14,953 total)

  • RE: Snippet of code from procedure

    It means one (or more) of the rows of data you are converting to datetime from char isn't acceptable to the database.

    Try selecting the columns referenced in those lines of...

  • RE: Listing gaps in numeric sequences

    I've never had to change a business process to match the system. I've had business processes that I couldn't enforce with the system, because they weren't things a computer...

  • RE: Strange failing of Convert (varchar to decimal)

    It means you have some strings that aren't strictly numeric in the select.

    If you run:

    select dsp_sth_ds

    from (whatever table that field is in)

    where isnumeric(dsp_sth_ds) = 0

    You'll find out which rows are...

  • RE: Cross Tab or Pivot Question

    If you add the reps as another column, you should be able to use Reporting Services to pivot it the way you want using cross-tab reports. If not, put...

  • RE: JOIN Operator - Migration problem

    It looks like it should work, but the only way to be sure is to test it. If you can't, you're just guessing. Always test. Work out...

  • RE: The In-House Expert

    If I've specialized in anything, it's in learning new things.

    I've not done IT work for large multinationals, so I have no idea how specialized things are there. My work...

  • RE: Create 'Vanilla Database'

    If you want a clean database (no data in any tables), use "Generate Scripts" in Management Studio (Query Analyzer for SQL 2000).

    Right click the database -> Tasks -> Generate Scripts

    Select...

  • RE: Listing gaps in numeric sequences

    Decided to also try:

    select number

    from common.dbo.numbers

    left outer join dbo.serialnumbers

    on number = id

    where number >=

    (select min(id)

    from dbo.serialnumbers)

    and number <=

    (select max(id)

    from dbo.serialnumbers)

    and id is null

    Because that way I'm not assuming I already...

  • RE: Listing gaps in numeric sequences

    create table dbo.SerialNumbers (ID int primary key)

    go

    insert into dbo.serialnumbers

    select number

    from common.dbo.numbers

    where number between 1 and 100

    go

    delete from dbo.serialnumbers

    where id in (55, 56, 71, 80, 99)

    Opened a separate connection.

    set statistics time...

  • RE: Get count as part of query

    SELECT DISTINCT cdds_Metadata.DatasetId AS ID,

    cdds_Metadata.DataCurrencyDate AS CurrencyDate,

    cdds_Metadata.DataFormatType AS DataFormat, ...

  • RE: Build a Delimited List And Query Syscomments, Tricks of the Trade

    Personally, I prefer using a single coalesce statement to produce a delimited list:

    declare @List varchar(max)

    select @list = coalesce(@list ',' + nullif(col1, ''), nullif(col1, ''), @list, '')

    from dbo.Table

    This will deal with...

  • RE: JOIN Operator - Migration problem

    On that final join, when you say there's no relation between them, do you mean you want a "cross join", where you get all rows in those final two tables...

  • RE: What T-SQL commands exist which can be used in Query Analyzer to export a select statement within a stored procedure?

    I'm not familiar with Oracle, so not sure what "spool" does. From what you are describing, the BCP command-prompt utility is what you're looking for.

    From a command prompt, you...

  • RE: Multiple Groupings

    Unfortunately, I'm not familiar with that reporting application. Can't help you on that one.

    You're probably stuck with one of the Union queries outlined earlier in this discussion.

  • RE: Resources for learning SQL Server 2005: Suggestions?

    Personally, I found "SQL Server 2005 Bible", by Paul Nielsen (www.isnotnull.com), very easy to read and incredibly helpful in learning SQL.

    I found the related "... for Dummies" books to be...

Viewing 15 posts - 14,791 through 14,805 (of 14,953 total)