Forum Replies Created

Viewing 15 posts - 46 through 60 (of 137 total)

  • RE: Tesing If a linked server exists.

    I used osql

    1. to avoid the error message. Without osql you get this for an unknown server :

    Test :

    DECLARE @rc int

    EXEC @rc = dbo.usp_TestLinkedServer 'SQLTRIX'

    PRINT @rc

    print 'Batch is here'

    Result...

  • RE: Tesing If a linked server exists.

    Try this stored procedure : it returns 1 if the server link is OK, 0 if not...

    use master

    go

    if object_id('dbo.sp_VerifLinkedServer') is not null

     drop procedure dbo.sp_VerifLinkedServer

    go

    create procedure dbo.sp_VerifLinkedServer

    (

     @RemoteServer sysname

    )

    as

    begin

     set nocount on

     declare @cmd...

  • RE: XMLHTTP In DTS?

    What is the Now in the xmlhttp.Send(Now) line ? I suppose it should be xmlhttp.Send() ...

  • RE: sql query problem

    You can try this solution. But this is only OK for little tables, as it allways results in a table scan. If the column au_lname contains ',' , you have...

  • RE: union all and order by

    In the order by, you can only use column names from the first select. In pubs, this would work :

    select au_id as ID,au_lname,au_fname,phone from authors

    union all

    select au_id as URN,au_lname,au_fname,phone from...

  • RE: Contigous Data Periods

    Simon,

    I am not usre I understood the request, but here is some code :

    set nocount on

    go

    --exec sp__droptable 'dbo.sample'

    go

    -- set up a test environment

    create table dbo.sample

    (

     EntryDate datetime not null,

     Name varchar(10) not...

  • RE: help with a query output

    My mistake ... I  did not see it was javascript ... Try this :

    <%

    var to = Server.CreateObject("ADODB.Recordset");

    to.ActiveConnection = MM_s4r_STRING;

    to.Source = "SELECT newdate, news FROM dbo.news";

    to.CursorType = 0;

    to.CursorLocation = 2;

    to.LockType =...

  • RE: help with a query output

    <%

    var to = Server.CreateObject("ADODB.Recordset");

    to.ActiveConnection = MM_s4r_STRING;

    to.Source = "SELECT newdate, news FROM dbo.news";

    to.CursorType = 0;

    to.CursorLocation = 2;

    to.LockType = 1;

    to.Open();

    var to_numRows = 0;

    %>

    <%

    Response.Write "&news=" & Server.URLEncode(to.Fields.Item("news").Value)

    Response.Write Server.URLEncode(to.Fields.Item("newdate").Value)

    %>

    <%

    to.Close();

    %>

  • RE: help with a query output

    I think it should be

    Response.Write "&news=" & Server.URLEncode(to.Fields.Item("news").Value)

    Bert

  • RE: How to make HTTP call out of SQLServer 2000?

    Thanks ... just found a little problem. The parameter @Doing is declared as @Doing varchar(512). It should be @Doing varchar(4000), as it is used to contain the posted...

  • RE: Just a basic SQL question, Finding Dups for a part of a field...

    I am not sure what you mean with 'it only returns rows that has duplicate course codes'.

    Can you give a DDL of the table and some...

  • RE: There''''s GOTTA Be a Better Way!

    OK ... it was just only an exemple .. You can play with the rowcount and the waitfor values ...

  • RE: join parent child tables but only to return the first child row

    Matt,

    in my opinion, the real problem is the definition of 'first row of Consignees/Shippers table for an id'.

    Once you can define what is the 'first row', you can use...

  • RE: SELECT Query

    You can not use select .. from @var. But you can use execute @procname. I would suggest to use a temporary procedure to do the select. To have exec() and...

  • RE: There''''s GOTTA Be a Better Way!

    I would add a waitfor, to make sure the server is not occupied all the time ... I use this technique a lot. It also helps to avoid a...

Viewing 15 posts - 46 through 60 (of 137 total)