Forum Replies Created

Viewing 15 posts - 106 through 120 (of 125 total)

  • RE: Import and export data

    Server A is not a SQL SERVER, B anc C are SQL2K

    Accessing A from B by DSN

    C lnked on B

    Thanks

  • RE: ROUNDING PROBLEM

    Thanks Linto,

    It worked.

  • RE: DBNETLIB error on connection

    Looks like the client machine using named pipes (Default), try to change the connection to use TCP/IP.

  • RE: dynamically FROM clause

    IT WORKS FOR WHERE CLAUSE ALSO. TRY THE FOLLOWING EXAMPLE.

    CREATE TABLE TESTTB

    (id INT, Name CHAR(20))

    INSERT INTO TESTTB VALUES(1,'SQL')

    INSERT INTO TESTTB VALUES(2,'T-SQL')

    DECLARE @table VARCHAR(30)

    DECLARE @owner VARCHAR(20)

    DECLARE @Database VARCHAR(30)

    DECLARE @SQL VARCHAR(200)

    DECLARE @where...

  • RE: dynamically FROM clause

    TRY THIS

    DECLARE @table VARCHAR(30)

    DECLARE @owner VARCHAR(20)

    DECLARE @Database VARCHAR(30)

    DECLARE @SQL VARCHAR(200)

    SET @Database = 'YOUR DATABASE NAME'

    SET @owner = 'dbo'

    SET @table = 'YOUR TABLE NAME'

    SET @SQL = 'SELECT * FROM ' +...

  • RE: Getdate() in a UDF

    Hi Sarat,

    Create a view to return getdate() and use that view in your UDF. You cannot call getdate() function in UDF.

    CREATE VIEW get_date

    AS

    SELECT CURRENT_TIMESTAMP AS CUR_DATE

    Thanks.

  • RE: Creating view using Openquery and embedded quotes

    Try This

    SET QUOTED_IDENTIFIER OFF

    GO

    SET ANSI_NULLS ON

    GO

    CREATE VIEW dbo.vw_test

    AS

    SELECT * FROM OPENQUERY(TEST,"Select * from customer where state = 'AL'")

    GO

    SET QUOTED_IDENTIFIER OFF

    GO

    SET ANSI_NULLS ON

    GO

  • RE: Report

    Steve,

    we are not storing the answers in different place, included with whole text. "testxxx" some other data and we don't care that(the data is stored in text datatype...

  • RE: Converting Row into columns using Field Seperator

    Prakash,

    Use the following function to split the row

    CREATE FUNCTION dbo.fn_Split(@String VARCHAR(8000), @Delimiter CHAR(1))

    RETURNS @Results TABLE (Items VARCHAR(8000))

    AS

    BEGIN

    DECLARE @index INT

    ...

  • RE: OR Evaluations

    I did not under stand what you want to do here

    WHERE AreaDesignatorID IS NULL OR AreaDesignatorID = ISNULL( @areaDesignatorID, AreaDesignatorID )

    ISNULL( @areaDesignatorID,...

  • RE: SELECT UDF FROM MS ACCESS

    Thanks Gary,

    That's what i did.

  • RE: OR Evaluations

    It will stop if first expression is true.

  • RE: nulls in a table

    Hi,

    Let's suppose you have a table called Table1 and the columns are Column1, Column2,Column3

    Column1Column2Column3

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

    1NULLtest1

    2test2NULL

    3test3test4

    SELECT * FROM Table1 WHERE column1 IS NULL OR Column2 IS NULL

    Then you will get the following

    Column1Column2Column3

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

    1NULLtest1

    2test2NULL

    Hope...

  • RE: Running Stor Proc from DTS package

    Hi,

    Yes you can execute the stored procedures from DTS

    1. make a connection to your server

    2. create new task called Execute SQL Task and provide the connection which you created in...

  • RE: help with stored procedure

    ALTER PROCEDURE au_info @lastname varchar(40), @firstname varchar(20) AS

    SELECT au_lname, au_fname

    FROM authors

    WHERE au_lname = @lastname OR au_fname = @firstname

    GO

    EXECUTE au_info @firstname = NULL, @lastname = 'Ringer'

    GO

Viewing 15 posts - 106 through 120 (of 125 total)