Forum Replies Created

Viewing 15 posts - 91 through 105 (of 167 total)

  • RE: How to caal a UDF on a linked server

    Setup a Linked-Server via Enterprise Manager or with the system sprocs.

    Then call the scalar UDF via OpenQuery as such:

    Select * from OpenQuery(LnkSrv,'select dbname.dbo.udf(parms)')

    or for table-valued UDF as such:

    Select * from...

  • RE: High ASCII Characters in data

    Try this:

    -------------------------------------------------------------------

    Declare @i Int,@Str VarChar(8000)

    -- Setup test string with weird stuff in it.

    Set @Str=Char(7)+'Line1'+Char(9)+'Line2'+Char(255)

    Print @Str

    Set @i=PatIndex('%[^'+Char(32)+'-'+char(126)+']%' collate Latin1_General_BIN,@Str)

    While @i<>0 Select @Str=Replace(@Str,SubString(@Str,@i,1),' '),

       @i=PatIndex('%[^'+Char(32)+'-'+char(126)+']%' collate Latin1_General_BIN,@Str)

    Print @Str

    -------------------------------------------------------------------

    Create a UDF with something...

  • RE: Sort column without ORDER BY

    You can use Select Distinct ... or Group By in special cases where you don't care if things get aggregated...

  • RE: SQL statement

    To strictly answer you question you could:

    Select distinct(MasterCodeID),Min(othercolum),max(anothercolum) ...

    could be used to get something from the other non-distinct colums. You choose the aggregate function that suits your purposes.

  • RE: Password check / special characters

    Or, more generically,

    like '%['+Char(0)+'-'+Char(31)+Char(127)+'-'+Char(255)+'!@#$%^&*()_+=-]%' Collate Latin1_General_BIN

     

  • RE: Connect string by IP Address when mutliple instances

    Change the : to a \ ...

  • RE: 4 gigs of RAM withSQL 2005 Standard

    If you've only got 4GB RAM I would only enable the /3GB boot config switch, and that if you don't mind loosing 1GB from the OS (increased paging if using...

  • RE: adding more ram

    ... and once you get the OS lined up don't forget:

    /PAE boot startup configuration option

    and

    "Lock Pages in Memory" in the Local Security Policy settings

    as well as letting SQL Server know you...

  • RE: sproc output while running

    Try:

    RaisError() with NoWait

    ... and don't foget to escape any '%' in your output string...

  • RE: Find all fields with null values in table

    Try this (using Pubs as a test...)!

    Use Pubs

    Exec sp_MSForEachTable

    'Set NoCount On;

    Declare @wc VarChar(8000);

    Set @wc=''''

    Select @wc=@wc+'' [''+[Name]+''] is Null or'' from dbo.syscolumns with (nolock) where [id]=object_id(''?'') and IsNullable=1;

    If Len(@wc)>0 Begin

      ...

  • RE: How do I isolate an SP''''s parameter values inside the SP generically? Please read

    As mentioned above sp_help will get you the SP's parameters but generically obtaining their values is another issue. DBCC InputBuffer(@@SPID) (also mention above) would get you the values of the...

  • RE: Link Server doesn''''t work except through query analyzer: MSSQL freezing / timing out

    Compare the connection properties of the two environments. One or more of the differences could be causing your problem...

  • RE: Case function in a Join

    select t1.* from t1

    join t2

    on ... and t1.HouseNumber=t2.HouseNumber and ('' in (t1.Flat,t2.Flat) or t1.Flat=t2.Flat)

  • RE: Modify the Auto Number

    dbcc checkident('tablename',reseed,<seednum&gt

  • RE: A big Delete

    Select ... into <new table> from <old table> where <rows to keep>

    drop <old table>

    sp_rename <new table>,<old table>

    barring any "constraints"

Viewing 15 posts - 91 through 105 (of 167 total)