Forum Replies Created

Viewing 15 posts - 13,051 through 13,065 (of 13,468 total)

  • RE: Problem with Sequence Number

    ok here is the function and an example of how i use it; like i said, i use a calculated column for the sort order ;

    also note that there is...

  • RE: Updating many rows into single cell

    --As A cursor solution:

    declare

     @fruitlist varchar(2000),

     @categ varchar(64)

     

     declare c1 cursor for select distinct category from #fruittable

     open c1

     fetch next from c1 into @categ

     While @@fetch_status <> -1

      begin

                    set @fruitlist=''

      select  @fruitlist=@fruitlist +  isnull(name,'') + ',' ...

  • RE: Updating many rows into single cell

    using your fruittable as a model, maybe something like this will help?

    you'd still need to use a cursor, but just one cursor for each category; the code for within the...

  • RE: Problem with Sequence Number

    i did something similar as well;in mine i assumed 4 sets like an ip address( it was actually version information, major/minor/revision andthe fourth param i can't remember right now) ,...

  • RE: Problem installing SQL Server 2000

    nowadays, some programs will install the desktop edition as their database, instead of access or some other system; i've heard that new dell systems have it preinstalled to hold some...

  • RE: Problem installing SQL Server 2000

    seen this many times; you can search SSC for "completely uninstall" or "manually uninstall" and find lots of info like this thread here:

    http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=5&messageid=254290

  • RE: Moving indexes

    i picked this script up from the forums a couple of months ago; it creates all the stements to move all indexesto a new file group:

    I'm sorry i don't have...

  • RE: Multiple Instance Connection Question

    if this were an internal only applicaiton, i might agree it would be no big deal to install an extra installation of SQL server, but if this is going to...

  • RE: Multiple Instance Connection Question

    The name that goes in your connection string is SOMEMACHINNAME\INSTANCENAME;

    I would ask this first: why must you create an additional instance, instead of using the default instance on the...

  • RE: Insert into Table with Identity Column in Trigger

    I think we need to see the table definitions; it looks to me like you have separate tables for ID, name and address;

    at the very least the ID and NAME...

  • RE: Find and replace

    very simple:

    update some_table set somecolumn=replace(somecolumn,'.txt','.csv')

  • RE: Need some help with a select statement

    you want to use the datediff function for this:

    SELECT DATEDIFF(day, somedatecolumn, getdate()) AS no_of_days from sometable

     

    SELECT * from sometable where DATEDIFF(day, somedatecolumn, getdate()) =3 --exactly 3 days old

    SELECT * from...

  • RE: searching for value in the database

     monster searches like this are bad, but sometimes you gotta do it:

    I made an ugly server intensive cursor for a similar question a while back;noone came up with a...

  • RE: script all stored procedures into one file

    you would not need to increase the size of the isql variable; that is just containing the command "sp_helptext your_long_procedure_name" ; i think the max size it could ever be...

  • RE: select UNION

    ahh;

    the subquery in the parenthesis needs an alias:

    this fails: select name from (select name,id from sysobjects union select name,id from syscolumns)

    this works:select name from (select name,id from sysobjects union...

Viewing 15 posts - 13,051 through 13,065 (of 13,468 total)