Forum Replies Created

Viewing 15 posts - 121 through 135 (of 1,082 total)

  • RE: SELECT with variable number of search requirements

    ah sorry I must have miss read the spec...

    if you need more help just shout

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Weird execution (plan) for querying view with a cursor

    I know it may not help but please could you post the two graphical execution plans ?

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: SELECT with variable number of search requirements

    something like this:

    CREATE TABLE Client

    (ClientId INT IDENTITY(1,1),

    LastName VARCHAR(100),

    FirstName VARCHAR(100),

    MiddleName VARCHAR(100))

    CREATE TABLE ClientAccount

    (AccountId INT IDENTITY(1,1),

    ClientId INT,

    AccountNumber VARCHAR(100))

    --TEST DATA

    INSERT INTO Client

    SELECT 'Stobbs', 'Chris' , 'Terence' UNION ALL

    SELECT 'Joe', 'Blogs' , 'Middle' UNION...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: SELECT with variable number of search requirements

    would it not be possible to enter you various search items into a temp table/table variable with 1 col and do various left joins onto your main table and take...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: T-SQL script not quite what I want

    jamie (5/27/2009)


    You might consider trying (based on the last query posted) to remove that exists piece to stop your query from running many sub-queries against your database (it will run...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: SQL Query Details

    As far as I know by default this data is not sorted.

    You may need to implement some sort of Auditing in your db

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Convert column into row

    Marcus why don't you try the supplied solution and just add a where clause?

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: DDL Event Problems

    no problem at all 😉

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: DDL Event Problems

    As I understand it , you always specify ON DATABASE and simple make sure that you run it on the correct DATABASE

    if that make sense?

    USE [MyDB]

    GO

    CREATE TRIGGER ddl_log ON DATABASE

    FOR...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: DDL Event Problems

    try and remove the "1" from DATABASE1 and just have it say ON DATABASE

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: DDL Event Problems

    could you post the exact error and all the code for the trigger please

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Multiple column distinct on one Column

    Having you tried looking into the ROW_NUMBER() function and or the GROUP BY function for this type of problem.

    If you need more help just shout

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Weird execution (plan) for querying view with a cursor

    Hi there,

    Could you psot the execution plan a .sqlplan to this thread makes it easier to read.

    The second thing is that if might be good to have an index that...

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: T SQL

    no correct answers to choose from ::::

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life
  • RE: Reset table Identity

    what do you mean by reseed?

    Truncate is going to remove all your data!

    What about DBCC CHECKIDENT (tableName,reseed, ?)

    ----------------------------------------------
    Try to learn something about everything and everything about something. - Thomas Henry Huxley

    :w00t:
    Posting Best Practices[/url]
    Numbers / Tally Tables[/url]

    SQL-4-Life

Viewing 15 posts - 121 through 135 (of 1,082 total)