Forum Replies Created

Viewing 15 posts - 136 through 150 (of 330 total)

  • RE: Create index in table variable

    Then table variable(@) cant be use at this point use temp table (#) ,where you can use or modify the table

    Eg:

    --Create temp table

    create table #temp(

    number int not null,

    alpha varchar(50)...

  • RE: Create index in table variable

    adonetok (12/6/2010)


    How to create index in table variable? The code below will get an error:

    declare @order table (

    member_name varchar(30),

    address varchar(50)

    CREATE INDEX IX_member_name

    ON @order (member_name)

    Hi

    See the below samples

    declare...

  • RE: Incorrect syntax near the keyword 'end'.

    Hi

    where ProcedureCodeID = @CodeID)

    )-- is Missed

    Dont just post the code with out crossverfying it is simple and basic step, you should be able to solve.

    Thanks

    Parthi

  • RE: A way to script all DBs from a server

    DECLARE @string VARCHAR(MAX)

    SET @string = ''

    SELECT @string = @string + 'EXEC ( ''sp_helptext ' + name + ' '')' from sys.sysobjects where xtype in('p','tr','v') order by Xtype

    EXEC ( @string )

    and...

  • RE: How to know when data inside a table has been modified?

    SQL ORACLE (12/3/2010)


    Not table structure, but data.

    Any input will be greatly appreciated.

    Hi

    If your table is having datetime field then you can use order by datetime desc

    or if you dont...

  • RE: Query for selecting a criteria

    chloe-1002909 (12/3/2010)


    Hello Experts,

    I can run basic queries, but need a little assistance on a more difficult query:

    I have a table which contains order lines. Within this table I have...

  • RE: Data isssue - with time

    Hi,

    Check this

    declare @date datetime

    set @date='2010-11-30 22:30:38.047'

    SELECT substring(convert(varchar(32),@date,121),12,5)

    SELECT convert(varchar(32),Case When substring(convert(varchar(32),@date,121),12,2)>12 then

    substring(convert(varchar(32),@date,121),12,2)-12 else substring(convert(varchar(32),@date,121),12,2) end )

    +':'+substring(convert(varchar(32),@date,121),9,2)+' '+

    Case When substring(convert(varchar(32),@date,121),12,2)>12 then 'PM' Else 'AM' end

    go

    declare @date datetime

    set @date='2010-11-30 10:30:38.047'

    SELECT substring(convert(varchar(32),@date,121),12,5)

    SELECT...

  • RE: I need help in modifying this script

    Hi

    Can you explain clearly what you are trying to say,the above query runs fine for me it gives correct result

    Thanks

    Parthi

  • RE: smallint instead of decimal

    go

    Declare @input int

    Declare @input1 decimal(3,1)

    Select @input ='303'

    Select @input1 ='30.3'

    Select @input ,@input1

    go

    Declare @input int

    Declare @input1 decimal(3,1)

    Select @input ='30'

    Select @input1 ='3.0'

    Select @input ,@input1

    go

    Declare @input int

    Declare @input1 decimal(3,1)

    Select @input ='3'

    Select...

  • RE: Restore from 2008 R2 TRM to 2005 SP2 - is it possible?

    dbaduck (11/23/2010)


    All the answers have led you to the path that I stated, I thought I would just offer you a why, so that you understand it is not about...

  • RE: Restore from 2008 R2 TRM to 2005 SP2 - is it possible?

    GilaMonster (11/23/2010)


    You can't set compatibility mode to 100 in SQL 2005. The highest is 90. 100 requires SQL Server 2008.

    If you meant something else, please be clear.

    Thats why i have...

  • RE: Restore from 2008 R2 TRM to 2005 SP2 - is it possible?

    GilaMonster (11/22/2010)


    If you're talking about compatibility level, it makes no difference. A database on SQL 2008 cannot be restored to SQL 2005 no matter if the compat level is set...

  • RE: Restore from 2008 R2 TRM to 2005 SP2 - is it possible?

    Hi

    Is the version of SQL Server with which the database is to be made compatible. The value must be one of the following:

    80 = SQL Server 2000

    90 = SQL...

  • RE: Update Error

    Hi

    If you get the below things

    No row was updated.

    The data in row X was not committed.

    Error Source: Microsoft.VisualStudio.DataTools.

    Error Message: The row value(s) updated or deleted either do...

  • RE: SSIS Load data

    hi

    I have used the Source ---->derived column and unionall ---->Destination it has run sucessfully.i need to check duplicates in this ,that is i need to find the duplicate record in...

Viewing 15 posts - 136 through 150 (of 330 total)