How to Find Attachments of Type Long

Connect to Database by user APPS and Run the Following query this will return all documents of Type AP_INVOICES

SELECT fadf.seq_num, fdctf.NAME “Catagorey Name”, fdtf.file_name,
fdltf.long_text media_data_text
FROM fnd_attached_documents fadf,
fnd_documents fdf,
fnd_documents_tl fdtf,
fnd_document_categories_tl fdctf,
fnd_documents_long_text fdltf
WHERE fadf.document_id = fdf.document_id
AND fadf.document_id = fdtf.document_id
AND fdctf.category_id = fdf.category_id
AND fdtf.media_id = fdltf.media_id
AND fdctf.user_name = ‘Invoice Internal’
AND fadf.entity_name = ‘AP_INVOICES’
AND fadf.pk1_value = ‘63227’;

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s