Forum Replies Created

Viewing 15 posts - 3,046 through 3,060 (of 3,615 total)

  • RE: SQL query SIZE

    DECLARE @sSQLSELECT VARCHAR(8000)

    DECLARE @sSQLFROM VARCHAR(8000)

    DECLARE @sSQLWHERE VARCHAR(8000)

    SET @sSQLSELECT='SELECT .......'

    etc

     

    EXEC( @sSQLSELECT + @sSQLFROM + @sSQLWHERE)

  • RE: Weird error, probably easy

    Think of the BEGIN and END statements in TSQL as being like the curly braces in JavaScript, C#, C++, C, Java etc.

    BEGIN = {

    END = }

    As with these languages TSQL...

  • RE: Deleting 170 Million rows - Database Maintenance

    If possible I try and avoid SHRINKFILE in live systems because there is an overhead in growing the file as data is put back in.

     

  • RE: Equivalent of MS Access FIRST() function in SQL Server 2000

    There is no direct equivalent.

    You could try using the TOP predicate to return the TOP 1

  • RE: Transferring Logins

    The users within a database have a SID column which matches to the SID value of the login.

    If you transfer your logins first then restoring your database will maintain your...

  • RE: Lookup Table Madness

    Yep, no DRI.

    A few years back there was an discussion on this site about leaving out DRI in order to get the maximum throughput on the database. 

    The example given...

  • RE: Lookup Table Madness

    In the particular vendor database (I stress vendor) it held a list of countries.

    The problem you face with a database with thousands of tables are

    • Comming up with a meaningful, common-sense...
  • RE: Primary key Clustered or Clustered Index?

    Over and above the previous answer

    A Primary key cannot contain nulls.

    A unique index can contain a single null.

    A clustered index holds its data in the leaves of the index.  You...

  • RE: Transferring Logins

    A login within SQL Server has a unique identifier called a SID and an encrypted password.

    The way I do it is to use a SQL query to generate the sp_addlogin...

  • RE: Lookup Table Madness

    If you have 3,000 or more tables then having a meaningful naming scheme for your tables becomes VERY important, otherwise your developers get lost in the mire.  This was one...

  • RE: Lookup Table Madness

    Its is great trying to maintain hundreds of tables when the tables have meaningless names.  Anyone care to guess what A35020 holds?

  • RE: Lookup Table Madness

    Don,

    In your example the Id field is an IDENTITY field and therefore there is no way that EmployeeTypeId can return an entry for CompanyStatus or whatever.

    If you are talking about...

  • RE: Lookup Table Madness

    I am still in the dark as to why my MUCK table with a single field primary key can break referential integrity.

    If I've got a contacts table with an AgeBandId...

  • RE: Lookup Table Madness

    OK, who has the time to design, code and test a database that needs 300+ lookup tables within the time that management have been promised the finished application

  • RE: Lookup Table Madness

    I had an application where "best practice" described in this article would have resulted in around 300 lookup tables averaging 7 entries per table.

    A single table with and id, type,...

Viewing 15 posts - 3,046 through 3,060 (of 3,615 total)