T SQL logic

  • I have a following rows in the table and wanted to store TableName from the following rows and the position of the tablename is on 8 rows in the first time and after that every six rows table name will be there. for example in the following rows ZSECUSER is the name name and it's on 8 rows in the first time and after every 6 rows ZSECAPP table name is there. I need to capture using TSQL command.

    column Name

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

    IDX_ODS_DAILY

    MS SQL SERVER

    Security Plus Files

    Pre_SecurityPlus

    NO SCRIPT

    ZSECUSER_91

    9395

    ZSECUSER

    Full

    Yes

    No

    ZSECAPP_91

    54647

    ZSECAPP

    Full

    Yes

    No

    ZSECUSE2_91

  • If I'm understanding you correctly, I think you could use the row_number() function to do that. Check that out in Books Online.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • It is not real clear what you are trying to accomplish here. I am going to assume that you are using a linked server from SQL Server to your Flowcast system (in Intersystems Cache).

    If you can explain what you need to do a little better - I may be able to help you write your query as a view on the Cache system, or - help write the T-SQL side to get the same results.

    What table/object are you accessing?

    Jeff

    Jeffrey Williams
    “We are all faced with a series of great opportunities brilliantly disguised as impossible situations.”

    ― Charles R. Swindoll

    How to post questions to get better answers faster
    Managing Transaction Logs

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

You must be logged in to reply to this topic. Login to reply