i want to create a sql query to store some document numbers in a text file and then create an another sql query which will take the input from the first query result text file.
select d.dmedocno from document d JOIN custprop c
ON d.documentid=c.documentid
where (c.strdata is not null
or c.datedata is not null or c.numdata is not null
or c.booldata is not null or c.blobdata is not null)
group by d.dmedocno having count(c.propertyname)=4
This above returns returns about 63000 rows each containing one document number like eg
13434
22321
83534
90345
etc...
now for each of this document number i have to find specific property and each of this document number may be associated with 4 of the properties
deepak carter wrote:for every document number where are some properties associated with it.I want to use that document number and search for those properties.
Having trouble understanding your problem, but where are these "properties"? If they're in a table, why can't you just select them from the table using the document number as a search criterion?
Why don't you tell us what your tables look like? Maybe then somebody can help you write the query. But if your document attributes are not in a table, then obviously SQL queries won't help much (unless you want to get into things like Oracle external tables).
No more Blub for me, thank you, Vicar.
Hang a left on main. Then read this tiny ad:
Gift giving made easy with the permaculture playing cards