Forum Replies Created

Viewing 15 posts - 931 through 945 (of 1,170 total)

  • RE: Computed column with subquery

    a_ud (4/19/2013)


    Hi,

    Questions:

    1) Is it possible to have a computed column based on previous columns which are subqueries?

    ...

  • RE: Stored procedure not giving desired output

    Hi

    You have this in your SP:

    SELECT Closing_Soh,item_id,created_date

    from #TempClosingStock where item_id=@item_id1 and

    created_date between '2012-04-1T00:00:00.000' AND '2013-01-3T00:00:00.000'

    Is '2012-04-1T00:00:00.000' AND '2013-01-3T00:00:00.000' ok? What is the datetime format at your...

  • RE: Migration from SQL server 2005 to SQL server 2008

    Since it's your first time, you should do more test.

    This link is good also: http://vyaskn.tripod.com/moving_sql_server.htm

  • RE: Lazy Writes / sec

    Hi

    When this indicator is greater than 20, then it indicates a need for more memory. Yours is much greater than 20.

    Is your memory small?

    Check some more like Page reads/writes per...

  • RE: Are my statistics being used?

    Hi

    Statistics can take max up to about 200 rows of data, which means they are tiny in terms of size.

    I think you cannot know which statistics were used by the...

  • RE: Generating a counter table in SQL

    Hi

    You can do it similarly with t-sql:

    declare @RecNum int=1

    declare @Total int=1

    declare @Cnt int=1

    declare @row int=1

    if object_id('tempdb..#Sheet') is not null

    drop table #Sheet

    create table #Sheet(RecordNumber int,Total int,[Counter] int)

    while @Total<=300

    begin

    while @Cnt<=@Total

    begin

    insert into #Sheet(RecordNumber,Total,[Counter])

    values(@RecNum,@Total,@Cnt)

    set...

  • RE: How to track table schema changes

    Hi,

    Try this may help you find which objects were changed since yesterday

    select o.name, o.create_date, o.modify_date, o.[type], o.type_desc

    from sys.objects o

    where o.is_ms_shipped !=1 and datediff(d,o.modify_date,getdate()) <= 1

    select c.name,o.name,o.create_date,o.modify_date,o.[type],o.type_desc

    from sys.columns c

    join...

  • RE: QUERY and TABLE HINTS

    The question is: "Which of the following hints require the word WITH? (choose 3) Assume SQL Server 2012.". - Not good.

    The correct answer is: FORCESCAN and FORCESEEK.

    Microsoft: The...

  • RE: Exclude Specific Index From Query

    GilaMonster (4/28/2013)

    Disabling a clustered index prevents all access to the table, read or update, until the index is rebuilt

    Correct. Just tried for clustered indexes. And, once you disable a clustered...

  • RE: Exclude Specific Index From Query

    Hi

    You can disable an index. Once you disable it, then you have to rebuild it in order to enable it.

    If your index is clustered, then after disabling it, your data...

  • RE: Table Structure

    It depends on TransactionID as Kingston said.

    How big are the tables? Do they have many indexes?

    Regards

    IgorMi

  • RE: problem with stored procedure

    Hi,

    Change table:

    alter table SINHVIEN

    alter column MATKHAU varbinary(max) not null

    Change SP:

    Alter PROCEDURE SP_INS_SINHVIEN

    @MASVnvarchar(20),

    @HOTENnvarchar(100),

    ...

  • RE: identity insert

    Then it seems very likely you have unexpected '' in your data somewhere.

  • RE: identity insert

    Why is your ROWTERMINATOR = '', shouldn't it be "back slash n"?

  • RE: identity insert

    Hi

    Try to do that with KEEPIDENTITY option in the WITH() section of the BULK command. See this http://msdn.microsoft.com/en-us/library/ms186335.aspx

    Regards,

    IgorMi

Viewing 15 posts - 931 through 945 (of 1,170 total)