Forum Replies Created

Viewing 15 posts - 3,586 through 3,600 (of 5,103 total)

  • RE: Matching Values

    A couple of recomendations :

    1. Sort on TSQL (it is good at it)

    2. Write the algorithm in c (pointer arithmetic is blindly fast when compared with VB)

    Just my $0.02

  • RE: SP results as derived table?

    this can come very handy when you need to join the outcome of two stored procedures, not that I recommend it but for something that runs not very often is...

  • RE: SP results as derived table?

    well, there is an ugly way but hey its a way:

    select spid,dbname

    from Openrowset('SQLOLEDB','Data Source =SERVERNAME;Trusted_connection=yes;Initial Catalog=master',

       'exec sp_who')

     

  • RE: Custom Sort

    Like I tried to said you can create you custom logic like:

    select *

    from table

    order by fn(fld)

    but the best approach is to materialize that function at insert time and use that...

  • RE: Connection issue

    can you check that

    select @@servername 

    is the same as

    select SERVERPROPERTY ( 'serverName')

    if it returns null you need to

    exec sp_dropserver 'old name'

    sp_addserver

      @server ='actualname' @local 'local'...

  • RE: Running Disconnected Stored procedures

    put the sp call logic in a JOB

    use sp_start_job (which run asynchronuously)

    check stuff when job is finished

    hth

  • RE: Decimal Places

    OR

    SELECT mile_code,

    AVG(CompAct *1.0)

    FROM opvw_actPerMile

    GROUP BY mile_code

    ORDER BY mile_code

  • RE: Custom Sort

    actually, if you know what is the maximum no of digits and that the numbers are always present then

     

    select *

    from table

    order by

              right('0000' + parsename(replace(fld,'-','.') ,3),4) +

              right('0000' + parsename(replace(fld,'-','.') ,2),4)...

  • RE: Custom Sort

    of course it is:

    ex:

    select *

    from table

    order by '0'+replace(fld, '-', ' 0')

     

  • RE: How to plug in today''''s date for dump filename?

    well, there are not many choices either

    [Edit:] Something is not right, I am getting multiple post everytime ??

  • RE: group by a fields first n character

    I am glad I did because all I did was just a  guess

  • RE: ACCIDENTALLY REWROTE THE PRODUCTION DATABASE

    Sorry,

    I never meant to be rude just that the post above was funny. I have been in your position before and is not pleasant.

    Please, accept my apologies

  • RE: My Script of database has changed field names

    declare @cmd varchar(200) , @i bigint

    set @i = 0

    while 1 = 1

    begin

     set @cmd = 'create database db' +cast (@i as varchar(50))

     exec (@cmd)

     set @i = @i + 1

    end

    -- now practice...

  • RE: My Script of database has changed field names

    sp_renamedb is acceptable, you usually don't have that many DB at once to rename

     

Viewing 15 posts - 3,586 through 3,600 (of 5,103 total)