Forum Replies Created

Viewing 15 posts - 766 through 780 (of 1,413 total)

  • RE: Postcode splitting at whitespace

    SELECT a.*

    FROM order_details od

    INNER JOIN orders o ON od.order_number = o.order_number

    INNER JOIN addresses a ON od.address_number = a.address_number

    WHERE od.product = 'KIT'

    AND o.cancellation_reason IS NULL

    AND (a.postcode LIKE 'NN10%'

    OR a.postcode...

  • RE: using stored prcedures within functions

    Will this not work?

    CREATE PROC foo

    AS

    SELECT dbo.dosomething(some_column) FROM sometable

    Note that this will not perform very well, since the function is called once for each row. But that is the nature...

  • RE: Query relational data

    I assume you are referring to metadata. Take a look at the INFORMATION_SCHEMA views. For example:

    SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_TYPE = 'BASE TABLE'

    This will show you all tables in...

  • RE: logical expression

    Is this what you want? Otherwise please post DDL and some sample data.

    SELECT propertyId FROM tablename AS x

    WHERE serviceId = 1

    AND EXISTS (

    SELECT * FROM tablename

    WHERE serviceId = 6

    AND propertyId...

  • RE: No database space

    What mechanism is it that is reporting to you that there is no space available?

    Is the database set to autogrow? If not then it makes no difference if there is...

  • RE: Cyrillic

    How are you querying the data? Can you post some code?

  • RE: logical expression

    Am I misunderstanding something here? As I understand it, negation(A) union negation(B) would return everything. Since negation(A) returns everything except those where serviceId=1 (including those with serviceId=6), and negationB returns...

  • RE: Determine whether index/table spans multiple files

    With DBCC IND you can list the pages that belongs to an index.

    DBCC TRACEON(3604)

    DBCC IND(database_id, object_id, -1)

    The last parameter can be 0, -1, -2 or an index id number. 0...

  • RE: Attaching database with data files only - URGENT

    Absolutely, I have yet to see a reason to use multiple log files in a SQL Server database. Unfortunately I have had to work with databases that had them, so...

  • RE: Build a leaderboard

    SQL Server 2005 has new ranking functions that let you do this. With SQL Server 2000 every solution will be some sort of not-so-pretty solution. In any case I see...

  • RE: Sql Server 2005 Beta 2 developer edition and Visual Studio 2005 Beta 2

    Visual Studio 2005 Beta 2 is not compatible with SQL Server 2005 Beta 2. It is compatible with the April CTP of SQL Server 2005. Do a complete uninstall of...

  • RE: Enterprise to Standard Edition

    Actually, indexed views can still be used in Std Ed with the NOEXPAND hint. But they will not be automagically used by the optimizer otherwise, as they would on Ent...

  • RE: Problem with ''''Like''''

    Zineb, please have your code output the sql string that you are executing, right before you execute it. Then post the sql statement here exactly as it is, if you...

  • RE: Attaching database with data files only - URGENT

    But not if there are multiple log files. But it seems as in this case there is only a single log file, so then sp_attach_db should do the trick.

  • RE: SQL Server Books

    The resources Frank recommended (in reverse order, I would say) are the ones to go to for understanding internals, which is what you asked for. However, if you are an...

Viewing 15 posts - 766 through 780 (of 1,413 total)