User Profile

Collapse

Profile Sidebar

Collapse
j420exe
j420exe
Last Activity: Mar 24 '09, 03:39 PM
Joined: Jan 25 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • j420exe
    started a topic Parameterized query for schema name?

    Parameterized query for schema name?

    How can I parameterize the schema and table name? This is for a report. The user will be prompted to select the schema. The schema names are SALES_PRODUCT_D B.PRODUCT and SUPPORT_PRODUCT _DB.PRODUCT.

    Code:
    SELECT PRODUCT_ID as "ID", PRODUCT_NAME as "Product", to_char(CREATION_DATE, 'mm/dd/yyyy') as "Creation Date", PRODUCT_STATUS as "Status"
    FROM
    :DEFAULTDIVISIONPRODUCT
    WHERE
    ...
    See more | Go to post

  • j420exe
    replied to Return first occurance of record
    Thank you - both queries worked

    Both queries returned the same result set and I learned something new.

    I will have to read up on the Oracle OVER (PARITION ..) keywords and the row_number() method and how it's used/processed in oracle-sql.

    Code:
    row_number() OVER(PARTITION BY TEST_ID ORDER BY lag_time) rn
    Thanks again!!!
    See more | Go to post

    Leave a comment:


  • j420exe
    started a topic Return first occurance of record

    Return first occurance of record

    I would like to return the first occurance of a record. The first occurance is date driven. Searched on message boards and internet and saw a few different ways to tackle this. Is using the ROWNUM = 1 the way to do it? If not, what is the recommendation solution?

    Code:
    SELECT 'BILLING' as "Repository", o.ORDER_ID as "Order ID", O.ORDER_DATE as "Date Ordered", s.SHIP_DATE as "Date Shipped", (s.SHIP_DATE-O.ORDER_DATE)
    ...
    See more | Go to post

  • j420exe
    replied to ASP.NET 1.1: Country DropDownList
    in .NET
    You could consume a public web service that provides the county codes and country name. You will just have to trust or validate what countries they provide in the soap (xml) response.
    See more | Go to post

    Leave a comment:


  • j420exe
    started a topic sql query help

    sql query help

    I have 3 tables: ARTISTS, ART and PAINTINGS
    ARTISTS has columns (data):
    userid (adam, betty, gil, jack, larry, steve, tyler)
    full_name (firstname lastname)

    ART has columns:
    art_id (auto number created when new art_name added via application)
    art_name (name of piece of art entered)
    designed_by (populated with userid)

    PAINTINGS has columns:
    paint_id (auto number created...
    See more | Go to post
    Last edited by debasisdas; Jan 29 '08, 06:33 AM. Reason: added code tags

  • j420exe
    replied to SQL table join + count help
    Thanks for the fast reply. What do the a, b, c reference?

    b on a.userid = b.designed_by

    When executing it, an error comes back as invalid identifier "b"
    See more | Go to post

    Leave a comment:


  • j420exe
    started a topic SQL table join + count help

    SQL table join + count help

    I have 3 tables: ARTISTS, ART and PAINTINGS
    ARTISTS has columns (data):
    userid (adam, betty, gil, jack, larry, steve, tyler)
    full_name (firstname lastname)

    ART has columns:
    art_id (auto number created when new art_name added via application)
    art_name (name of piece of art entered)
    designed_by (populated with userid)

    PAINTINGS has columns:
    paint_id (auto number created...
    See more | Go to post
No activity results to display
Show More
Working...