Forum Replies Created

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

  • RE: Search Table And Field In All Database And Return Field Value

    Declare @TableNameParameter Nvarchar(200)='Address'

    Declare @FieldNameParameterTable Table

    (

    FieldsName Nvarchar(200)

    )

    Insert into @FieldNameParameterTable(FieldsName) values ('AddressLine1'),('AddressLine2')

    DECLARE @TempDatabases Table

    (

    id int primary key identity(1,1),

    databaseId int,

    DatabaseName nvarchar(100),

    RowNumber int

    )

    Insert into @TempDatabases(databaseId,DatabaseName,RowNumber)

    Select database_id,Name,ROW_NUMBER()over(order by database_id)

    FROM SYS.databases

    WHERE name NOT IN...

  • RE: Search Table And Field In All Database And Return Field Value

    Declare @TableNameParameter Nvarchar(200)='DimGeography'

    Declare @FieldNameParameterTable Table

    (

    FieldsName Nvarchar(200)

    )

    Insert into @FieldNameParameterTable(FieldsName) values ('City'),('StateProvinceCode')

    DECLARE @TempDatabases Table

    (

    id int primary key identity(1,1),

    databaseId int,

    DatabaseName nvarchar(100),

    RowNumber int

    )

    Insert into @TempDatabases(databaseId,DatabaseName,RowNumber)

    Select database_id,Name,ROW_NUMBER()over(order by database_id)

    FROM SYS.databases

    WHERE name NOT IN...

  • RE: Search Table And Field In All Database And Return Field Value

    Yes ,I'm Sorry ,Forget Collate

    Declare @TableNameParameter Nvarchar(200)='UserInfo'

    Declare @FieldNameParameterTable Table

    (

    FieldsName Nvarchar(200)

    )

    Insert into @FieldNameParameterTable(FieldsName) values ('UserName'),('Password')

    DECLARE @TempDatabases Table

    (

    id int primary key identity(1,1),

    databaseId int,

    DatabaseName nvarchar(100),

    RowNumber int

    )

    Insert into @TempDatabases(databaseId,DatabaseName,RowNumber)

    Select database_id,Name,ROW_NUMBER()over(order by database_id)

    FROM...

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