Forum Replies Created

Viewing 15 posts - 421 through 435 (of 444 total)

  • RE: String compare: 'a' = 'a' ==>True or False?

    I myself had this issue. And aftere searching here and there, I found that the equality (=) operator elininates the trailing spaces and then compare. If you want to compare...

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • RE: Duplicate Returns in Application

    Try using Distinct in your query.

    JOIN acts like inner join. One of your our tables might be having duplicate value in the column used in the join condition. that is...

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • RE: Regarding extended stored procedure.

    Read the following post for more information.

    http://www.sqlservercentral.com/articles/Stored+Procedures/xpfileexist/183/

    Also, You might be running SQL Service with LocalSystem or a local machine account.

    Atif Sheikh

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • RE: Service Broker - Messaging

    Ports are mentioned in Endpoints and then in routes.

    Try using same port numbers at sender and receiver, say, 9998.

    My Service Broker is working perfectly on this port.

    I have...

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • RE: Database Design for Online Examination System

    what help are you expecting...? Complete design?

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • RE: -dynamic- function to convert several rows of a table to a csv list

    I wonder why people say it is IMPOSSIBLE to call a stored procedure from a function. It cannot be done directly, but, indirectly, YES it is POSSIBLE. I just ran...

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • RE: case statement in stored procedure

    Dynamic SQL is the solution.

    Generate the query in your sp and Execute it with EXEC.

    I tried by the following code;

    Declare @sql varchar(max)

    Set @sql = 'Select *...

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • RE: Complex Case statement

    First, I didnt understand this condition;

    IF @ipinput LIKE '%'

    What are you trying to check by this condition?

    Secondly, for 3,7 and 8;

    simply check by

    Declare @ipinput as int

    Declare @sinput varchar(5)

    Set @sinput =...

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • RE: Service Broker - Messaging

    Well i dont see any problem in the Routes. Just check the following;

    1. Grant Connect to Endpoints to [public] at both sender and Receiver.

    2. Grant SEND...

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • RE: Help with UNION and null or empty string values

    I think PIVOT will do the job...

    Try this,

    SELECT * FROM

    (

    SELECT c.certID, c.codetype, c.polnum FROM coverages c

    WHERE c.certID = 670624 and c.codetype in ('AUTOLI','GENLIA')

    ) m

    PIVOT (MAX(polnum) FOR codetype IN ([AUTOLI],[GENLIA]))p

    Atif...

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • RE: Reformat via query?

    I always wonder why the Message window is NOT read-only. The negative impact is clearly mentioned in the Answer of this question. Why not it is read-only...?

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • RE: How to execute xp_cmdshell

    You have to Enable the xp_cmdshell from

    Surface Area Configuration --> Surface Area Configuration for Features.

    Complete syntax is ;

    xp_cmdshell { 'command_string' } [ , no_output ]

    command_string can be any DOS...

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • RE: Service Broker - Messaging

    Check the routes exists;

    In Source to Destination

    And

    In Destination to Source

    The route should be defined at both ends, Source and Destination. Otherwise, the conversation will not take place.

    Also, go for...

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • RE: Building Parent-Child Table Tree information

    Nice Code.

    I did the same thing with this query...

    select ccu.table_schema + '.' + ccu.table_name as MTablename, ccu.column_name as Mcolname,

    ccu1.table_schema + '.' + ccu1.table_name as Tablename, ccu1.column_name as colname...

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

  • RE: How to connect one row from a table to several rows of another table.

    You will need a Function in this case...

    CREATE FUNCTION [dbo].[fnJoinTabVals] ( @pTableB_ID int)

    RETURNS varchar(8000)

    AS

    BEGIN

    declare @vTableVals varchar(8000)

    Select @vTableVals=COALESCE(@vTableVals+',','') + TableB_JoinColumn

    FROM TableB

    WHERE TableB_ID = @pTableB_ID

    RETURN isnull(@vTableVals, '')

    END

    Now Call...

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------
    Sometimes, winning is not an issue but trying.
    You can check my BLOG
    [font="Arial Black"]here[/font][/url][/right]

Viewing 15 posts - 421 through 435 (of 444 total)