Forum Replies Created

Viewing 15 posts - 11,581 through 11,595 (of 13,469 total)

  • RE: Drop all database objects in sql 2005

    there is a built in procedure to get all your objects in dependancy order:

    EXEC sp_msdependencies @intrans = 1

    I've only used it to build script, and not to drop...

  • RE: DB design

    I think you are planning the right way. I try to analyze the issue like this:

    say i was going to support Spanish language version of my data, and consider...

  • RE: how to Find the most critical queries

    you really need to start with creating a trace with profiler....create one and let it run for a while...I'd say one business day.

    with that, it will give you every query,...

  • RE: help me to know

    somewhere in your classes, notes and lectures, you must have heard there is an INFORMATION about SCHEMA information in the database I wonder if you were to look at some...

  • RE: help me to know

    With this being your final year project at school, it wouldn't be right for us to do the work...you'd never gain the knowledge by copying our code. Being aware of...

  • RE: Function - Check Count

    you were so close on the syntax;

    to assign to a static value, you usually use SET; but

    you can assign a variable inside a select, like SELECT @CITY=CITY,@STATE=STE FROM ADDRESSES....

    here's...

  • RE: Calling Stored procedure at specific time

    dunno why i keep looking at this...

    you can add a trigger on the VIEW to handle the status column....

    rename the original table.

    --add a view that has the old table name...

  • RE: Calling Stored procedure at specific time

    Lynn he had stated previously that he actually has to check a couple other tables to get the true status...i think this was just a simplified example....since he's got to...

  • RE: Calling Stored procedure at specific time

    the point trying to make, is that if the "status" is based on criteria, which you said was a combination of the end date and other factors in other tables,...

  • RE: Calling Stored procedure at specific time

    Here's a complete example for you...

    you simply change whatever application is looking at "my_table" to report the current status to point to "ViewOfMyTable"...all done...no process needing to run every thirty...

  • RE: generating non-numeric primary key

    well...you can have a calculated column as a primary key...so i'd make it built off of an identity like this:

    [font="Courier New"]CREATE TABLE #example(myid INT IDENTITY(1,1),

    myCalculatedPK AS 'martmp_' + RIGHT('00000000' +...

  • RE: Only one expression can be specified in the select list when the subquery is not introduced with EXISTS

    select

    ALIAS1.naam,

    ALIAS1.Aantal_Incidenten,

    ALIAS2.naam,

    ALIAS2.Aantal_Inc_Portal

    FROM

    (

    select vestiging.naam, count(*) as Aantal_Incidenten

    from incident, vestiging

    where incident.aanmeldervestigingid = vestiging.unid

    group by vestiging.naam

    ) ALIAS1,

    (

    select vestiging.naam, count(*) as Aantal_Inc_Portal

    from incident,...

  • RE: putting two select statements together as two columns in a resultset

    another way to do it wiht a CASE statement, if you need to do lots of different race codes:

    SELECT

    SUM(CASE WHEN race_code = '01' THEN 1 ELSE 0...

  • RE: putting two select statements together as two columns in a resultset

    it's suprisinglyy easy... you just need to use the two tables as aliased subselects:

    SELECT ALIAS1.AM,ALIAS2.CM

    FROM

    (SELECT COUNT(*) AS AM

    FROM dwh_test.dim_employees

    WHERE

    ...

  • RE: How to get a count of occurences of a string within multiple substrings

    the trick for # of recurring substrings in a string is to use the replace function:

    declare @MySchedule varchar(168)

    SET @MySchedule = REPLICATE('123456789',40) --overkill

    select @MySchedule

    /*results:

    123456789123456789123456789123456789123456789

    123456789123456789123456789123456789123456789

    123456789123456789123456789123456789123456789

    123456789123456789123456789123456

    */

    --how many times is there a 9 in...

Viewing 15 posts - 11,581 through 11,595 (of 13,469 total)