SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Zealot LSW's Avatar
    Join Date
    Jul 2004
    Location
    Juneau Alaska
    Posts
    186
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    'On the Fly unique ID' in PL/SQL needed

    Background: I am rewriting part of an ASP classic app into crystal reports using my own SQL. I am using sub-reports and groups. Language is PL/SQL, Crystal Reports XI.

    SQL: My SQL returns the data correctly in Toad. 9 rows sorted by transfer date descending.

    Problem: When using a CR group, it considers the data to be distinct. However in fact, on one date two transfers were made, the result being that my report suppresses the duplicate data although I must show it. All the data in the table is duplicated somewhere, so any field I group by drops rows. Just TransDate comes the closes only 1 row short.

    Needed: I guess I need a form of "On the Fly temp unique ID". A field for this instance that will ensure that each row has a unique ID I can "Group BY" in Crystal. I cannot create a view & I cannot change the originating table. I need an on the fly id of some sort created when my sql is run. I am looking for ideas for a simple way if one exists, not using triggers etc. I have looked at sequences but they do not seem to offer what I need and MAX(????) + 1 AS WHATEVER, but max of course takes the highest date so not really helpful either.

    Any suggestions would be appreciated greatly.
    Thank You, Migwetth, Gunalche’esh, Ha’w'aa, Danke

    Kyle Lamson



  2. #2
    SitePoint Zealot LSW's Avatar
    Join Date
    Jul 2004
    Location
    Juneau Alaska
    Posts
    186
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Man, not often you can stump the people in this forum. Guess there is no way to get what I want.

    Thanks anyways folks.
    Thank You, Migwetth, Gunalche’esh, Ha’w'aa, Danke

    Kyle Lamson



  3. #3
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,263
    Mentioned
    60 Post(s)
    Tagged
    3 Thread(s)
    Quote Originally Posted by LSW View Post
    Man, not often you can stump the people in this forum.
    this is a database forum

    what you have is a crystal reports problem

    just sayin'

    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  4. #4
    SQL Consultant gold trophysilver trophybronze trophy
    r937's Avatar
    Join Date
    Jul 2002
    Location
    Toronto, Canada
    Posts
    39,263
    Mentioned
    60 Post(s)
    Tagged
    3 Thread(s)
    whoops, this thread ~was~ in the database forum, it got moved to the .NET forum for some reason
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL
    "giving out my real stuffs"

  5. #5
    SitePoint Author silver trophybronze trophy
    wwb_99's Avatar
    Join Date
    May 2003
    Location
    Washington, DC
    Posts
    10,633
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Generate a GUID at the appropriate layer.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •