Forum Replies Created

Viewing 15 posts - 13,411 through 13,425 (of 13,841 total)

  • RE: Why this error ?

    I suspected that you would say something like that ... but then why does the CREATE TABLE solution work (just tested it)?

  • RE: Why this error ?

    Why does it matter whether it exists, if the DELETE block is not going to be executed?

  • RE: Why this error ?

    Not tried it, but I think that the error would not appear if the script were run when TableA existed and had the extra field.

  • RE: SQL Vs Windows Authentication

    SQL authentication requires more user admin than Windows authentication - but in a mid-sized company that might not matter so much, as it's not that much more when there are...

  • RE: Why this error ?

    If you replace your SELECT * INTO and ALTER TABLE statements with a single CREATE TABLE statement containing the new column and constraint, your problem will go away.  But why? ...

  • RE: Not in search in multiple tables?

    Just following this one up.  So this query:

    SELECT a.Municipality_No, a.Id_No

    FROM TableA a

    WHERE not exists (select x.Municipality_No from TableX x join TableA a on x.Municipality_No = a.Municipality_No)

    Is faster than this one

    SELECT Municipality_No,...

  • RE: Exporting data to Excel

    Is it about time that your users started using something like Access instead?

    With that much data (as you've found), Excel just starts getting ungainly.

  • RE: Exporting data to Excel

    The Excel row limitation is way more than 10,000 - 65,535 rings a bell - so I am surprised that you are getting an error.

  • RE: Primary Key Violations in DTS package - import from Excel file

    It may be possible to do all of this in one step through DTS, but my DTS is not good enough to know.  What I would do is

    a) Create a...

  • RE: Primary Key Violations in DTS package - import from Excel file

    Is the primary key an identity field?  If not, you need to populate it (uniquely) as part of the import - otherwise SQL Server tries to create multiple records with...

  • RE: Months in Ascending order

    Convert your month to an integer between 1 and 12 (1 = Jan, 2 = Feb etc) using datepart and then use that in your ORDER BY clause:

    select datefield

    order by...

  • RE: RE:

    I know - but your original post quotes 'an identity column called row id' - you cannot insert 'to the middle of the table' with such a design.

  • RE: RE:

    Disagree.  INSERTS won't hurt a clustered ID index, as the records just go in at the end and no reorg required.

  • RE: Splitting 1 column into 2 based on spaces

    Try running this code and you'll get the idea:

    declare @a varchar(120), @b-2 varchar(120)

    set @a = 'COMPUTER CORP                                    45474'

    set @b-2 = 'SQL IMAGING, INC     90159S'

    select reverse(left(reverse(@a), charindex(' ', reverse(@a))-1))

    select rtrim(left(@a, len(@a)...

  • RE: corelated subquery to join query

    Hi Jesper

    I was actually answering the previous message; not yours, which made perfect sense.  Your solution effectively replaces my view idea with a standard (non-corelated ?) subquery and is the...

Viewing 15 posts - 13,411 through 13,425 (of 13,841 total)