Forum Replies Created

Viewing 15 posts - 1 through 15 (of 40 total)

  • RE: Displaying NULL as the last row + ORDER BY

    Another possible solution is:

    SELECT * FROM (SELECT N

    from Tally

    where N < 11

    ORDER BY N)

    UNION ALL

    SELECT NULL

    ORDER BY used in UNION construction affects whole result set.

  • RE: Problem with maintenance plan with replication jobs

    Thanks for the reply.

    I see what you mean... it is not definitely bad solution. What I use now instead is backup-restore solution. So I am not using replication and this...

  • RE: Error while altering a table - maximum row size exceeds

    It is only warning. Your table has so many columns (or so big columns) that it si possible you will not be able to store all data by INSERT...

  • RE: Problem with maintenance plan with replication jobs

    No, it seems like the jobs doesn't wait for prevoius job completion. So for example snapshot creation is executed and the next step (distribution) is started before the snapshot...

  • RE: Job processing all views in DB

    Thanks Jeff! I hoped you would help me. This was for the first time I was not able to find set-based solution and I am glad I don'nt need it...

  • RE: Job processing all views in DB

    So my solution is below. But Is it possible to do without cursor?

    DECLARE @sql_vw nvarchar(max)

    DECLARE @sql_tbl nvarchar(max)

    DECLARE @name nvarchar(max)

    DECLARE c_view CURSOR FAST_FORWARD

    FOR

    select object_name(object_id)

    from sys.objects

    ...

  • RE: Job processing all views in DB

    Oh, I am fool, as Vladan said before, I only need a view name and then do SELECT * INTO table FROM view....

  • RE: Job processing all views in DB

    OK, I have to solve it by own....

    I have just written SELECT statement separating View's SELECT statement:

    select STUFF(STUFF(OBJECT_DEFINITION(object_id),1,

    ...

  • RE: Job processing all views in DB

    I cant use 'AS' to find SELECT statement begining 🙁 Those characters can be used inside view name. And I have also problem with creating table structure according view definition....

  • RE: Job processing all views in DB

    Any suggestions? 🙁

    What I have found out until now is:

    select OBJECT_DEFINITION(object_id) from sys.objects where type = 'V' and is_ms_shipped = 0

    Is it right way to do my job? I would...

  • RE: Job processing all views in DB

    I want to do this processing on replication snapshot used for reporting and I want to do it during night so I don't suppose any problem with locking.

    And I know...

  • RE: NOLOCK inside view vs. NOLOCK in selection from view

    Of course, I use this hint only when I don't need accurate data - in my case this is acceptable for some reports.

    Thanks for replies.

  • RE: Interesting but Stupid Question

    "Col1 Like '%Cu_%' " means that matches string with "everything before Cu followed by at least one character"

    '_Cus' = matches because there is substring Cu followed by one character

    'Cus_' =...

  • RE: Joining Tables without PK's

    Maybe when you have special one-row table (for example with some application parameters), then primary-key is useless 🙂

  • RE: GO statement

    I am using GO to separate statements in long scripts and then my C# application is able to display how much (%) of the script is already processed.

Viewing 15 posts - 1 through 15 (of 40 total)