Forum Replies Created

Viewing 9 posts - 1 through 9 (of 9 total)

  • RE: Parameter in select statement

    Hi All,

    Thanks for your valuable inputs. I'm working on this and will update here as soon get any result.

    This forum i rocking 🙂

  • RE: Parameter in select statement

    SP attached

  • RE: Parameter in select statement

    SP as follows:

    CREATE PROCEDURE spGetVendor

    @CountryId INT,

    @CityId NVARCHAR(50)

    AS

    SET NOCOUNT ON;

    SELECT VendorId From Vendors

    WHERE CountryId = @CountryId +...

  • RE: Parameter in select statement

    CREATE PROCEDURE spGetVendors

    @CountryId INT,

    @CityId NVARCHAR(50)

    AS

    SET NOCOUNT ON;

    SELECT VendorId From Vendors

    WHERE CountryId = @CountryId + ' '...

  • RE: Parameter in select statement

    Hi All,

    Thanks for your valuable inputs. Is following query is doable??

    DECLARE @CountryId INT

    DECLARE @CityId NVARCHAR(50)

    SET @CountryId = 2

    SET @CityId = ' AND CityId IN (23,45,85,86)'

    SELECT VendorId From Vendors

    WHERE CountryId...

  • RE: Parameter in select statement

    INT mistype. In SP its VARCHAR

  • RE: Parameter in select statement

    This way working but i need to execute the select statement directly i.e, without storing it in variable @strQuery then execution. I need to execute as follows:

    BEGIN

    DECLARE @strQuery NVARCHAR(MAX)

    DECLARE @CountryId...

  • RE: Parameter in select statement

    Hi,

    Thanks for your quick reply. Actually i declared that as varchar. Mistyped in the question as INT.

    Any changes needed?

  • RE: Database backup

    DTS is supporting multiple databases.

    I am very weak in stored procedure. So added the query snippets in post.

    Can you please write me stored procedure.

Viewing 9 posts - 1 through 9 (of 9 total)