Forum Replies Created

Viewing 15 posts - 166 through 180 (of 405 total)

  • RE: BEFORE TRIGGER issue

    I think you need to find a diffferant way to acheive this. Inserted virtual table has the same definition as of the real table so the studentname column will capture...

  • RE: Problem in dataconversion

    You are using dynamic string so the type of the variable does not matter.

    Moreover you are getting this error when trying to concatenate the integer variable with varchar string 'Select...

  • RE: Problem in dataconversion

    Try

    set @table_query='SELECT [ID], [Question_ID] FROM ['+@table+'] WHERE [Section_ID]='+convert(@sec_id as varchar(50))

  • RE: Eliminate FileGroup and move contents to Primary FG

    Hi, you can acheive this through dynamic scripts. First you should find out the list of indexes in the particular filegroup. You can use sys.partitions to get this data.

    select Object_ID,Index_id...

  • RE: Blob data handling - best option?

    Filestream is the most efficient way to store unstructured data, and is available since 2008

    You need to enable filestream for the database and add a filestream filegroup.

    Alter the table...

  • RE: Stuck on new fault with my update

    Alan,

    What you need to do is right click the Both tables in SSMS, select Script table as Create , paste the code in the forum. Otherwise whatever suggestions we...

  • RE: Resolving a deadlock

    You should look at the queries found in the deadlock trace and the resources that are being locked. You can try tuning these queries. But sometimes you may need to...

  • RE: DB Normalisation Help required

    ManiDBLover (3/4/2013)


    Hi,

    I agree with your point. But if i have more columns you mean to say i need seperate seperate tables?

    Not really. The I dea is to think of all...

  • RE: DB Normalisation Help required

    MyDoggieJessie (3/3/2013)


    Table A: (Master)

    PCID (PK)

    ComputerName

    OS

    OSVersion

    Manufacturer

    Table B:

    PCID (FK)

    SoftwareName

    SoftwareVersion

    SoftwareLiscencekey

    Installedversion

    ?

    Or you could go really crazy and create an OS, Manufacturer, Software table - but that'd probably be overkill 🙂

    No, no . It will...

  • RE: send data in small size by backup is possible

    Backup contains only used pages (If it is full backup). No use of shrinking the database.

    If it is a differential backup, it contains all pages changed since last Full backup.

    So...

  • RE: can this update statement be made easier

    I am still not clear why your update is not working. One thing, your case statement should be changed

    update dbo.BigTable set BigTable.Software_Version_Raw =

    case

    when CHARINDEX('.',Software_Version_Raw,0) >0 then

    substring(Software_Version_Raw,0, CHARINDEX('.',Software_Version_Raw,0)...

  • RE: can this update statement be made easier

    We both wrote the examples with assumptions that you have only two patterns, if not you can go with the case stament itself

    create table #SoftwareTest

    (

    SoftVersion varchar(500),

    SoftVersionUpdated varchar(500)

    )

    insert into #SoftwareTest...

  • RE: can this update statement be made easier

    Jeff Moden (3/3/2013)


    Heh... dang it. Roshan Joe beat me to it. You can, however, make it one notch simpler. Not sure which will be faster, though.

    UPDATE...

  • RE: can this update statement be made easier

    alan

    Try something like this

    create table #SoftwareTest

    (

    SoftVersion varchar(500),

    SoftVersionUpdated varchar(500)

    )

    insert into #SoftwareTest (SoftVersion)

    Select '10.78.5'

    union

    Select '1.78'

    union

    Select '2'

    union

    Select '4.5'

    union

    Select '20.5'

    union

    Select '4'

    union

    Select '8.63.0'

    union

    Select '10'

    union

    Select '4.56.89'

    update #SoftwareTest set SoftVersionUpdated=

    case when CHARINDEX('.',SoftVersion,0)...

Viewing 15 posts - 166 through 180 (of 405 total)