Forum Replies Created

Viewing 15 posts - 181 through 195 (of 268 total)

  • RE: inserting and deleting in views

    You could use stored procedures for insert / delete / update on the view.

    Of course this will be row by row processing, since the sp's would be called once for...

  • RE: Boost SQl Server priority on Windows

    It makes the SQL Server process run with a higher priority than other processes on the computer. This will make the OS to prioretize (give more time) to SQL Server...

  • RE: Losing description on export

    If You are scripting the tables there is a checkbox for "include extended properties". Both in EM(Formatting Tab) and QA(Script Options).

    If you are using DTS I find it good practice to...

  • RE: Try this Quick T-SQL Quiz!

    Yeah, I assumed it just wasn't the ELSE thing.

    Too simple, it must have been something else that upset John Jakob !

    cheers,

    /rockmoose

  • RE: need help with query

    Yup Jeff, just wanted to help some, I didn't see your solution at first.

    Probably barsuk just wanted to get the job done .

    And also...

  • RE: Try this Quick T-SQL Quiz!

    From BOL:

    The return type from a CASE statement is:

    "Returns the highest precedence type from the set of types in result_expressions and the optional else_result_expression"

    So You get DECIMAL(10, 4)...

  • RE: Empty String behaviour for number datatype (e.g Float, int etc)

    One point to make:

    Have You considered allowing NULL values in the column ?

    A NULL would be considered "Value Not Known".

    But first consider if You REALLY need to allow null in...

  • RE: need help with query

    Sorry,

    Didn't notice there were several pages at first...

    Oh well at least skipped the temporary tables

    And for explanation:

    The FLOOR(CONVERT(FLOAT,w1.Begin_Work)) =...

  • RE: need help with query

    CREATE TABLE #work(Client_Rep VARCHAR(20) NOT NULL,Begin_Work DATETIME NOT NULL,End_Work DATETIME NOT NULL,

    PRIMARY KEY(Client_Rep,Begin_Work))

    INSERT #work(Client_Rep,Begin_Work,End_Work)

    SELECT 'Vitalio Arini','9:00','9:45' UNION

    SELECT 'Vitalio Arini','10:00','12:00' UNION

    SELECT 'Vitalio Arini','14:30','17:00' UNION

    SELECT 'Nino Verto','8:30','11:00' UNION

    SELECT 'Nino Verto','15:00','17:00' UNION

    SELECT 'Ken...

  • RE: Help with multiple measures on columns in MDX

    Hi, try this:

    SELECT { CrossJoin( { [Call Class].Members },{ [Measures].[Call Count],[Measures].[Other Measure1],[Measures].[Other Measure2] } ) } ON COLUMNS

    { [Regions].Members } ON ROWS

    FROM BilledCallDetail

    /rockmoose

  • RE: Which items are not linked??

    Correction:

    select #table1.*, #table2.* from #table1 cross join #table2

    left outer join #table3 on #table1.ItemID = #table3.ItemID and #table2.WidgetID = #table3.WidgetID

    where #table1.ItemName = 'AAA'

    and #table3.ItemID is null

    and #table2.WidgetType in(

     select #table2.WidgetType from #table2

     join...

  • RE: backup all jobs

    To script the jobs:

    In EM right click the Jobs icon under SQL Server Agent and choose Tasks -> Generate SQL Script.

    Otherwise BACKUP the msdb database, which is where all the...

  • RE: Which items are not linked??

    select #table1.*, #table2.* from #table1 cross join #table2

    left outer join #table3 on #table1.ItemID = #table3.ItemID and #table2.WidgetID = #table3.WidgetID

    where #table1.ItemName = 'AAA'

    and #table3.ItemID is null

    and #table2.WidgetType in(

     select #table2.WidgetType from #table2

     join...

  • RE: Table sizes

    Hi,

    Actually sp_spaceused can be of somuse, like so:

    create table #table_size(

     name nvarchar(128),

     rows int,

     reserved_kb varchar(18),

     data_kb varchar(18),

     index_kb varchar(18),

     unused_kb varchar(18) )

    insert #table_size exec sp_MsForeachTable 'exec sp_spaceused ''?''--,true'

    -- "uncomment" --,true above to...

  • RE: Query question....

    Try this:

    delete sysuser_webpage

    where sysuser_id = '2'

    and webpage_uuid in(

     select webpage_uuid

     from webpage

     where state_code in('CT','NH'))

    /rockmoose

Viewing 15 posts - 181 through 195 (of 268 total)