Forum Replies Created

Viewing 15 posts - 736 through 750 (of 907 total)

  • RE: Retrieve specific number of records from a table

    Here is an example of a way you can retrieve 10-15 without a cursor using the top and order by clauses.

    Create table top_test (id int identity, description char(1))

    insert into top_test...

  • RE: database schema migration

    Basically the views are not created in the correct order. We have views that use views so probably this has something to do with it. So if you...

  • RE: Using @@ROWCOUNT or Similar function

    make that typo:

    update abc set

    @Hellobye = v1 = isnull(v1,@Hellobye),

    @Hellobye2 = v2 = isnull(v2,@Hellobye2)

    basically I think you want to set @Hellobye2 (instead of @Hellobye)to v2, or @hellobye2.

    Gregory Larsen, DBA

    If...

  • RE: Using @@ROWCOUNT or Similar function

    It looks to me, that Prakash's solution sets the V1 to the prior V1, and V2 to the prior V2, by saving the prior v1 in variable @Hellobye, and prior...

  • RE: DTS packages

    From BOL ....

    ....in the sysdtspackages table in the SQL Server msdb database as BLOB (binary large object) data.

    ...

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check out my...

  • RE: Sales for x months grouped by 2 columns

    Possible something like this will work for you.

    create table sales (account int, month int, part int, amt money)

    insert into sales values(1,6,1,1)

    insert into sales values(1,7,1,1)

    insert into sales values(1,8,1,1)

    insert into sales values(1,9,2,1)

    insert...

  • RE: Failed Nightly Job

    I assume this message is coming from "job history" "step details" information. The job history step details, don't always contain the real error. You might be able to use...

  • RE: Find date of last SQL login

    I'm not aware of one, but you could build your own, it think. If I needed to do that I would consider changing your "Security" "Audit" level to "All",...

  • RE: Schedule restore?

    If I understand you correctly you want some code that will schedule a job. Here is some code that will schedule job "ADRN1303 TRIGGER" to run in 15 minutes...

  • RE: Schedule restore?

    You might consider using a linked server from your dedicated machine to your production machine. This way from your dedicated machine you can launch jobs on your production machine...

  • RE: Growing Log File

    If you truly don't want to keep any transaction log information, to keep the transaction log small your might consider changing your "Recover Model" to "Simple" if you are in...

  • RE: Schedule restore?

    You can schedule whatever you want using a SQL Server Agent job. If you look in EM there is a directory called "Management" under that there is another directory...

  • RE: Can some please explain this error for me.

    Yep. I think you got it....

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check out my website at http://www.geocities.com/sqlserverexamples

  • RE: Odd SQL Server Behavior with table functions

    You need to remove the WHERE clause the "Get the employee supervisor record" select statement. This statement is causing you to never return any supervisor records because supervisor records...

  • RE: Column Name & Value pairs

    You could easily output the column_name and the value with something like this:

    use pubs

    select 'title_id',title_id,'title',title from titles

    Gregory Larsen, DBA

    If you looking for SQL Server Examples check out my website at...

Viewing 15 posts - 736 through 750 (of 907 total)