Forum Replies Created

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

  • RE: how to query a table via its id

    Sean Lange (5/12/2011)


    If you want help figuring it out post some ddl and some sample data and we can give it a whirl.

    Indeed I changed my plan and created a...

  • RE: how to query a table via its id

    Sean Lange (5/11/2011)


    So there is a field in each record of the Journal table that tells you which table name to join to?? This is what I have been suspecting...

  • RE: how to query a table via its id

    Sean Lange (5/11/2011)


    I tried the following code before and it works fine except that I need to supply the @jtName variable dynamically inline the query.

    DECLARE @jtName nvarchar(max);

    DECLARE @qry nvarchar(max);

    SET @jtName...

  • RE: how to query a table via its id

    parthi-1705 (5/11/2011)


    Have a look on this,

    use master

    Select * from sys.sysobjects where xtype='u' order by id

    Go

    declare @Name varchar(100)

    Select @Name=Object_Name(1131151075)

    exec ('Select * from '+@Name)

    -- Select * from spt_values

    Go

    I tried the following...

  • RE: how to query a table via its id

    The Dixie Flatline (5/11/2011)


    Forget the object_ID. You need to know the object name for a table_source in the SELECT ... FROM.

    I can think...

  • RE: how to query a table via its id

    I have a table with field type nvarchar contains a name of another table

    now I need to query the 1st table and within the query I want to query the...

  • RE: Restore database with new name using SQLDMO

    Very useful ........ Thnak you very much

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