on 2011 Sep 02 8:04 PM
Can someone point out the error or my ways. I'm using xp_write_file to export BLOBs to TIFF images. When i run the Select query it works great, only does the first 110 rows, and will create more images if i page down...not to desirable for 170,000 images. So, I try to substitute CALL for SELECT and i get a syntax error near line 1 ',' Here is my select statement, why won't call work?
SELECT xp_write_file('c:inetpubwwwrootimagesimagesc02' || ImageID || '' || ImageDetailID || '.tiff', Image), CAST(ImageID AS VARCHAR) || '' || CAST(ImageDetailID AS VARCHAR) || '.tiff' FROM c04.imagedetail
Request clarification before answering.
You could try using a for loop to output all of your files. A brief example would be:
BEGIN DECLARE count INTEGER; SET count = 0; FOR acur AS acur CURSOR FOR SELECT xp_write_file('d:\\\\cases\\\\cust_' || id || '.file',surname || ' ' || givenname) AS my_ret FROM customers DO SET count = count + 1; END FOR; MESSAGE 'Exported ' || count || ' records!' TO CLIENT; END;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 14 | |
| 8 | |
| 6 | |
| 6 | |
| 3 | |
| 3 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.