How To Query By Keyword For Image Field.
If the data type of field is "varchar",we can use "like" to query if it has
some substring.
Such as "where custom.valuevariant like '%Verizon%' ", it will query out all
records that contains string "Verizon".
But how to do when data type of field custom.valuevariant is "image"?
Thanks
View Complete Forum Thread with Replies
Related Forum Messages:
T-SQL Keyword 'AS' As Name Of Data Field
Hello forum, unfortunately i have a table with a column named 'AS'. I want to insert data into this table using a stored procedure but i get the error that the syntax is wrong near to the 'AS' keyword. I tried to build a query string and execute it with the EXEC command. But that doesn't help. Same error. I hope you understood my problem, Thanks in advance alex
View Replies !
Inserting Image In Image Field
I have a table with two fields 1 int datatype and the other Image data type. I have inserted quite a lot into the tables. And i can display the images in VB. Every thing is fine. Now the problem is I need to update another table on another server over which i cannot connect directly. I thought of inserting the image data field into a notepad directly from the table and from VB open the notepad and insert into the next table. But it doesnt work. Is there any way i can do it. Thanks Sudheesh
View Replies !
Contains Keyword For Integer Field Type
I have a field ID of type integer, I want to put two numbers in that field: 3 and 7, so what I do is just store the number 37.Now, is there a command in SQL server which checks if the ID field contains a number I look for, say 7.Something like a CONTAINS keyword...If there is, could someone please tell me what it is AND tell me a bit more about it :memory usage, (dis)advantages etc.
View Replies !
Adding A New Field To A Table With Image Field
Hi, I have a concern about adding a new field to a table with image field - which is huge. Will there be a problem with some databases, where they have a hard time locating data correctly after such a large field? Previously this happened to me, and what was advised to put all the big fields at the end of the table. Thanks.
View Replies !
Keyword Query
I have a sample photo database where we have added keywords to search for photos. I wanted a way to list all of the keywords that are in the database individually. The problem is in my keyword field there are many keywords seperated by a comma. Ex: "bull, barrel, rodeo, western, cowboy" would in the keyword field for one photo. I wanted to select distinct all of the individual words from each keyword field in all of the records. Can this be done? What would the query look like? I am looking for a list like: bull barrel rodeo western cowboy Any suggestions? Thanks, Rob
View Replies !
Need Help With SQL Query. Keyword Matching.
Hi all,I have two tables:workgroups (wg_id, wg_name)workgroups_keywords (wgk_wg_id, wgk_keyword)Each workgroup has an associated list of one or more keywords.What I want do to at first was given a particular list of keywordsbring back a list of workgroups that have at least one matching keywordassociated with it.I have the following query:select distinct(wg_id), wg_namefrom workgroups, workgroups_keywordswherewgk_keyword in (#QuotedValueList(Keywords.wgk_keyword)#)andwg_id = wgk_wg_idorder by wg_nameThis works great.However, is there a way in a single query to order the returned rows bythe number of keywords that are found to be matching (in other words anorder by relevancy, the more keywords that match the more relevant thereturned row)?Thanks in advance.David
View Replies !
Very Slow Query When Using In Keyword
hey guys i have a query that takes too long that, actually i never got it to finish excuting the query looks like tht select referer,count(*) from t1 where referer is not null and referer in( select distinct(Referer_Direct) from t2 where Referer_Direct is not null )group by referer the inner select just returns 5 rows so when i replace the inner select with actual values like tht select referer,count(*) from t1 where referer is not null and referer in('val1','val2','val3','val4','val5' )group by referer it excutes immediatly any clues how to solve this issue the db is running on sql server 2005 express SP2 thx in advance
View Replies !
DTS - Problem With Image Field
DTS is not properly exporting a database between the servers when a table is containing a image fieldReason it gives as ::Error::Transfer Status: Transferring Data: (Table '[dbo].[Here comes the table name used ]') Data truncation occurred in table [dbo].[Here comes the table name used ], column 1. any workaround or solutions would be more appericated
View Replies !
Reading Rtf From An Image Field
Hi,Tasks in a MS Project SQL Server database have an image field calledTASK_RTF_NOTES. It contains text in RTF format. We would like to convertthis within a standard SQL statement into plain text.I suspect this is not possible without some sort of bolt-on, or at the veryleast using T-SQL in some way.Any ideas?Thanks,Gareth
View Replies !
Union And Image Field
I have a union stored procedure and would like to include an image field however I read in BOL this is not possible. My next thought was to use the results from the union stored procedure and join them with the image field data however I have not had success using a stored procedure in another stored procedure, e.g. SELECT * FROM storedproc_GetEmployeeDate INNER JOIN tbl.employeesignature on employeeid = storedproc_GetEmployeeDate I'm open to any suggestions if I'm thinking about this incorrectly.
View Replies !
Image Field Cannot Be Exported Via DTS
I am trying to export a table using DTS. The table contains photographs, but these cannot be seen in Paradox 7 nor Access 97. The rest of the columns export OK, and Paradox 7 recognizes the imported data in the photographs column as BLOB (binary large object), but cannot show them and an error is raised. The same is true with Access 97. Does anyone know a way to overcome this and be able to see the photographs? It may be via DTS, the Query Analyzer or whatever. The table dwells in a machine using NT 4.0 and SQL Server 7.0.
View Replies !
Image Field In Trigger
Hi , i have a trigger that start on a record insert . . .This take de ID of the inserted record and start to fill other table in the database.In this triggher i have to update an image field of a table , getting the value from another table .I've casted this value in varbinary , but var binary can take only 8000 byte , and this fileis bigger than 8000 byte . . .How can i proced to solve the problem ???Thanks
View Replies !
A Query Where Title Includes 'Keyword'
i am having a problem querying a field in a database to show all records where the title has a keyword within the title. Select * FROM tblCourse WHERE title =@Search But not the full title just a keyword within the field? Thanks
View Replies !
Problem With Query Where Column Name Is The Same As A Keyword
hi I am having trouble with the following query within my store procedure. as you can see, i am making an union of 2 separate queries. in the 2nd part of the union, i encounter a column in the database where the column name is the same as the keyword "desc" is there a way which i can get around this, or is there any other way that i can sepecify the column? (excluding the possibility of using *) CREATE PROCEDURE topcat.getTransHistory ( @contact_id numeric(9) ) AS BEGIN DECLARE @phone_no varchar(255) set @phone_no = (select top 1 phone_num from topcat.class_contact where _id = @contact_id) select cast(trans_new.trans_date as varchar(50)) date, '' code, cast(payment.date_paid as varchar(50)) datepaid, '' "desc", case payment.payment_type when 'cheque' then trans_new.item_total else '' end pledged, '' mail, case payment.payment_type when 'cheque' then '' else trans_new.item_total end received, '' receipt from topcat.class_transaction trans_new left outer join topcat.class_payment payment on trans_new._id = payment.transaction_id where trans_new.contact_id = @contact_id union select cast(trans_old.date as varchar(50)) "date", trans_old.code, cast(trans_old.datepaid as varchar(50)) "datepaid", trans_old.desc, cast(trans_old.pledged as varchar(128)), trans_old.mail, cast(trans_old.received as varchar(128)), trans_old.receipt from topcat.MMTRANS$ trans_old where phone = @phone_no END GO Cheers James :)
View Replies !
Uppercase T-sql Keyword In Query Editor
In Query Editor I type statements like this: "select * from ...." Does Query Editor support a "macro" facility where I could, via keystorke, uppercase all t-sql keywords? (so it would look like SELECT * FROM...) TIA, barkingdog P.S. You think I'm lazy? I knew a programmer who was so lazy that his password was one character long!
View Replies !
Direct Display Of SQL Image Field
Hi I have a SQL 2000 table in which pictures are stored as an Image column. I want to display then onto a c# aspx webpage without storing them to disk. What is the best way to read and display the pictures? In classic ASP I used to do this: Response.ContentType = "image/jpeg" Response.BinaryWrite rs.fields("ThisImage") but I can't get this to work in c#.
View Replies !
Word Doc In Image Field Type
Hi, I was wondering if someone can help me with is problem. I have uploaded word docs to the db which is fine. The problem is viewing. I can view then as word documents but the boss does not want the files opened in word. Is it possable to retrieve the file from from the db and put into say a textbox or lable. I can see the letter P using this code Dim Doc() As Byte = New Byte(Convert.ToInt32(0)) {} Dim bytesReceived As Long = DBContent.GetBytes(0, 0, Doc, 0, Doc.Length) Dim encoding As ASCIIEncoding = New ASCIIEncoding lblTest.Text = encoding.GetString(Doc, 0, Convert.ToInt32(bytesReceived)).ToString Can any help Thanks
View Replies !
Deafult Data For Image Field
Hi, I am storing my upoaded images in sql server. However, if the user does not upload an image, a broken link is shown in the page. All that shows up in the DB field is <Binary>. Can we set this field to a default value? Is it possible to view this binary data. I would like a default blank gif to be returned if no image is uploaded. Regards, JB
View Replies !
Storing Pdfs In An Image Field
I am using an image datatype to store multiple filetypes includeing plaintext data. it works except for pdf Data. When I retrieve the the filecouldn't be opened in acrobat reader and the file was 3KB bigger than theoriginal.Any suggestions would be helpful.
View Replies !
Store Documents In Image Field
I am creating a document management systems using asp. I have beenresearching the different ways of handling the documents such as using thefile system and storing the path in the db, and actually storing thedocument in the db. I like the idea of storing it in the database muchbetter because I can allow users to manage documents themselves (I alreadyhave the code in place to do it if I decide), having a central system withthe ability to add my own document properties by adding fields to the table,security, and backups. I have found that most think it is better to storethe path due to performance issues and the rate the db can grow. I havelooked at our current system in access and we have a total of 4400 documents(of which probably 25% are in the database but don't actually exist anymorein the file system, one hangup about the file system) since 1988. Thiscomes to about 300 documents added each year. The other thing is the issuewith the size of the db. I don't see a whole lot of difference with thisissue because it is going to take up space in your file system too, althoughthe file system may be more efficient at storing them. I would say that 95%of our docs are under 1 mb in size and done in ms word.The last thing is using full-text search capabilities in SQL Server. I needto be able to search the contents of the field.Is there other issues around storing documents in the db to consider besidesthe above?
View Replies !
Storing Data In Image Field
I have a very large array of floating point numbers which I am tryingtostore in an image type field. I am using the dataset class todirectly enter the data but am having trouble trying to get this typeinto the image field. I guess the question is how do I get a largefloating point array into an image (byte)field of a database using thedataset class for new row entry.Thanks
View Replies !
Error When Replicating Image Field
Hi, When trying to replicate an image field (which contains a file uploaded with an appenchunk), I get an error in the error log: "Unable to replicate a text command because the corresponding TEXTPTR was not found in the replicated transaction (654243,11)". I have no problems extracting the data on the publisher so the data is not corrupt. max_text_repl have been increased. Does the the replication start before all data is appendend? If so how do I prevent that? Any solutions? Best Regards Mattias
View Replies !
Store A Dataset In An Image Field Using SQL
Hi, does anyone know a way, using native SQL, to store a result of a query in an image field of a certain table. The case is we have a selfmade replication to communicate with several SQL servers in stores, this replication is over a telephone line. So we collect all the data using SQL statements and store them in a separate table as an image field. This is done know through a Delphi application that streams the resultset to a image field. Thanks in advance,
View Replies !
Searching An Image Field (WHERE Clause)
I have an application that currently runs under MSSQL 6.5 that searches the database for keywords. These keywords are in a Microsoft Word document stored in an image datatype field (BLOB datatype). The following query works: SELECT * FROM tData WHERE oleresume LIKE '%test%' returning all records in which the Word document in olereume has the word 'test' in it. When run under MSSQL2K, the following error message is returned by SQL: "Invalid operator for data type. Operator equals LIKE, type equals varchar." I'm stumped. Can anyone explain this or give me a workaround? Thanks, Matthew
View Replies !
DB2 Write Image To Blob Field
I need some help in SSIS Package I am trying to write a byte array to an image (blob) in DB2 destination. I am getting SQL code -290 Invalid Description, if i set the output column to a byte stream. If I set the output column to an Image data type then I get a different error the package will not at that time even process it errors out right away. At least using a byte stream datatype it errors out when it is about to write to the olebd destination. Anybody have success using BLOB fields in SSIS package data flow? Thanks for any help.
View Replies !
Retrieving Image Field From A Table
i have a database (SQL Server) with a table that I retrieve records . One field is an image datatype and my problem is retrieving the image... my query is working in datatab (but it takes too much of time to retreive)... when i select preview.. it just hanged
View Replies !
Failed To Manage Image Field
In my simple table in MSDE 2000A, I have an image field. I have enabled 'text in row' using the stored procedure 'sp_tableoption'. How do I get jpeg images in the table, and how do I read them?
View Replies !
Filling Image Data Type Field
Hi I am currently working on an application that uses a stored procedure to retrieve data from a database and then display it in a web page. My problem is that some of the data in the database will be images, I am currently putting in test data to test my code/procedures my problem is how do I put in test data for images, when I am finished I am going to add an admin section that will allow me to add images that way but how do I go about adding them to the database until then? I have set the field to the image data type but have no idea how to relate this to an image on my server? Thanks, Adam
View Replies !
Updating The Image Field In SQL Server Via DataSet
Hello,I am trying to update the Image type field named as BlobData in sqlServer 2000. I capture the record in a data set to have the schema and try to update the BlobData field of type Image by assigning it a value of buffer as below. but my assignment seems to be wrong and generates an error saying Object reference not set. Code========================= Dim fileBuffer(contentLength) As Byte Dim attachmentFile As HttpPostedFile = Me.fileUpload_fu.PostedFile attachmentFile.InputStream.Read(fileBuffer, 0, contentLength) Dim cn As SqlClient.SqlConnection Try Dim sSQL As String Dim cmd As SqlClient.SqlCommand Dim da As SqlClient.SqlDataAdapter Dim ds As System.Data.DataSet = New DataSet cn = New SqlClient.SqlConnection(myconnectionString) cn.Open() sSQL = "SELECT * FROM Attachment WHERE ID = " & attachmentRecordID cmd = New SqlClient.SqlCommand(sSQL, cn) da = New SqlClient.SqlDataAdapter(cmd) da.Fill(ds) If (ds.Tables(0).Rows.Count = 1) Then ' ====================================== ' ERROR GENERATED HERE ' ====================================== ds.Tables("Attachment").Rows(0).Item("BlobData") = fileBuffer ' ====================================== da.Update(ds, "Attachment") Return True Else Return False End If Catch ex As Exception Me.error_lbl.Text = ex.Message Return False Finally cn.Close() End Try ========================== Can anyone please help this one out. Cheers.Imran.
View Replies !
Upload Blob To Sql Image Field (vb.net2kbeta)
grandma needs help on fileupload to a sq2000 image datatype field.I can upload files to a folder - no prob.Old asp utensil worked to upload to sql. I've looked at the c# examples but didn't work in vb.after kicking for hours I came here to see if anyone can help me.Camillehere's my code Protected Sub btnUploadPix_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles btnUploadPix.Click 'Dim imagelen As Integer = FileUpload1.PostedFile.ContentLength 'Dim picbyte As Byte() Dim pix As System.IO.Stream = FileUpload1.PostedFile.InputStream Dim cn As New System.Data.SqlClient.SqlConnection Dim cm As New System.Data.SqlClient.SqlCommand cn.ConnectionString = "Data Source=NTSQL;Initial Catalog=xx;User ID=xx;Password=xx" cm.CommandType = Data.CommandType.Text cm.CommandText = "UPDATE AccessATA set pixname=@pixname, pixsize=pixsize, pix=@pix, pixon=1 where wid=@wid" cm.Connection = cn cm.Parameters.Add("@wid", Data.SqlDbType.Int).Value = txtDwid.Text cm.Parameters.Add("@pixname", Data.SqlDbType.VarChar).Value = FileUpload1.PostedFile.FileName cm.Parameters.Add("@pixsize", Data.SqlDbType.VarChar).Value = FileUpload1.PostedFile.ContentLength cm.Parameters.Add("@pix", Data.SqlDbType.Image).Value = FileUpload1.PostedFile.InputStream cn.Open() cm.ExecuteNonQuery() cn.Close() End Sub Object must implement IConvertible. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.InvalidCastException: Object must implement IConvertible. Source Error: Line 194: cm.Parameters.Add("@pix", Data.SqlDbType.Image).Value = FileUpload1.PostedFile.InputStreamLine 195: cn.Open()Line 196: cm.ExecuteNonQuery()Line 197: cn.Close()Line 198: Source File: E:websitesprRcontenthrespeople.aspx.vb Line: 196 Stack Trace: [InvalidCastException: Object must implement IConvertible.] System.Convert.ChangeType(Object value, Type conversionType, IFormatProvider provider) +2410785 System.Data.SqlClient.SqlParameter.CoerceValue(Object value, MetaType destinationType) +561 [InvalidCastException: Failed to convert parameter value from a HttpInputStream to a Byte[].] System.Data.SqlClient.SqlParameter.CoerceValue(Object value, MetaType destinationType) +608 System.Data.SqlClient.SqlParameter.GetCoercedValue() +29 System.Data.SqlClient.SqlParameter.Validate(Int32 index) +45 System.Data.SqlClient.SqlCommand.BuildParamList(TdsParser parser, SqlParameterCollection parameters) +141 System.Data.SqlClient.SqlCommand.BuildExecuteSql(CommandBehavior behavior, String commandText, SqlParameterCollection parameters, _SqlRPC& rpc) +253 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async) +195 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result) +134 System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe) +415 System.Data.SqlClient.SqlCommand.ExecuteNonQuery() +135 people.btnUploadPix_Click(Object sender, EventArgs e) in E:websitesprRcontenthrespeople.aspx.vb:196 System.Web.UI.WebControls.Button.OnClick(EventArgs e) +72 System.Web.UI.WebControls.Button.RaisePostBackEvent(String eventArgument) +78 System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String eventArgument) +7 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) +11 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) +33 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +4839
View Replies !
Error In Image Field When Using CASE Statement
I've this Stored procedure on a SQLserver 2000 SP3: SELECT *,CASE immagine WHEN NULL THEN 0 ELSE 1 END AS hasImage FROM Squadre WHERE squadra = @squadra this is a flag that returns if the image field is present or not.. i've a lot of this type of stored procedures.. but this one returns me an error.. --------------------------- Microsoft SQL-DMO (ODBC SQLState: 42000) --------------------------- Errore 306: The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator. --------------------------- OK --------------------------- An i can't save.. why? reme,ber that in the same Db there's other Stored like this.. the same syntax and the same field or table.. can anyone help me??
View Replies !
Can Not Update A Replicated Image Datatype Field
Hi everyone. I have a field that is image datatype. That table is included in a snapshot replication. When I try to update that field - on the publication server, which is the same as distributor server - if the image is too big (in size), an error message appears. When I try to update with images that has less size it works. If I take out the subscriptions, it works for every image size. Any ideas?
View Replies !
How To Load/Unload Non-Graphical Files Into/From IMAGE Field?
I want to be able to load and unload, byte-for-byte, a file to and from a field of data type IMAGE in a SQL Server CE database. The files are larger than 8000 bytes so IMAGE appears to be the way to go data type wise. I'm using VB 2008 but pseudocode for any VS language would be awesome. I was able to do this without much effort using ADODB and its stream object, fetching a recordset object and updating the appropriate data field one "chunk" of bytes at a time. I cannot for the life of me find a way of doing this using, for example, a SqlCeResultSet. I've tried using ADODB to connect to a SqlCe SDF database file, using a connection string that I found online, and am able to write action and select queries successfully against the database... but when I try and return a recordset that is updatable, it returns an error. So no help there. I've searched other threads in the forums, and online in general, and I've found information on loading/unloading graphic files using a memoryStream and the toArray method thereof, but this will not work as many of the files I want to load and unload as BLOBs are not graphical in nature. FileStreams do not implement the toArray method, so I can't just stream an arbitrary file's worth of bytes that way. I also do not want to change the original file in any fashion--e.g., a hash of the source file should be identical to the file after it has been loaded into the data field and then unloaded into a new file. Any thoughts? Your help is MUCH appreciated!
View Replies !
How To Convert To Regular Text, Data Stored In Image Data Type Field ????
Hi,This is driving me nuts, I have a table that stores notes regarding anoperation in an IMAGE data type field in MS SQL Server 2000.I can read and write no problem using Access using the StrConv function andI can Update the field correctly in T-SQL using:DECLARE @ptrval varbinary(16)SELECT @ptrval = TEXTPTR(BITS_data)FROM mytable_BINARY WHERE ID = 'RB215'WRITETEXT OPERATION_BINARY.BITS @ptrval 'My notes for this operation'However, I just can not seem to be able to convert back to text theinformation once it is stored using T-SQL.My selects keep returning bin data.How to do this! Thanks for your help.SD
View Replies !
Replace&"***&" In Image Path Field.
I am hoping someone will be able to help me with this. i have a table of accountholders with the following fields account_no account_name image_path the image_path field has a defaultvalue images/***.jpg I am looking for a query code to update the value in the image_path field by replacing the *** value with the value of the account_no field
View Replies !
Slow Query With Table Containing Image
Hi, I have a table defined as such: PosterArtId int no 4 10 0 no (n/a) (n/a) NULL Graphic image no 16 yes (n/a) (n/a) NULL GraphicFilename varchar no 50 no no no SQL_Latin1_General_CP1_CI_AS I have a Stored Procedure defined in the database that queries this table (joins with some other tables) that takes about 1 1/2 minutes to return results (running directly in query analyzer). The table itself has 8900 records and the resulting stored procedure returns 33 rows. I have backed up this database and restored it to another database on a different machine also running SQL Server 2000. When I run the same stored procedure on this 2nd database (note the contents of the database and this table are exactly the same), it runs very quickly - in about 2 seconds. I'm trying to figure out what is causing the query to run so slow on the original database, which is our production database server (note that none of the other queries seem to be running extra slow on this machine, just this particular one). I've since been reading up on storing images in the database and I don't think the images are stored "text in row" - I ran the command: €œSELECT OBJECTPROPERTY(OBJECT_ID('tblPosterArt'),'TableTextInRowLimit')€? and got a 0 return value. My ultimate goal is to figure out: 1) why the timing is so different on the two databases even though the have the same data 2) is there something we can do to speed up the results on our production server For the first goal, I'm heading down the path that something in the database backup/restore did not recreate the btree storage of the image data in the same manner. Would this be correct? If not, is there some kind of analysis that I can do that will tell me some useful information? I've run the Stored Procedure for both databases in query analyzer with the "show execution plan", "trace", and "statistics" turned on. In the Execution Plan of the production database I see a significant amount of time in three areas: Nested Loops/Left Semi Join, Clustered Index Scan, and Clustered Index Seek. But being as I'm not a dba (nor do we have one on staff), I'm not sure how to interpret this data. I keep wanting to point to some sort of environment issue since the data is the same between the two machines. I suppose there is nothing to do about the 2nd goal without knowing why the query on the one machine is taking so long. Any thoughts on how to get more information here? Thanks, Beth
View Replies !
Sql Query Problem: To Select One Image Randomly From Each Category
hiiiiiiiiii plz help me........urgent my table is as follows CREATE TABLE [dbo].[tbl_photo_gallery]( [image_id_int] [int] IDENTITY(1,1) NOT NULL, [image_caption_vchr] [varchar](100) NULL, [image_path_vchr] [varchar](200) NOT NULL, [photo_cat_id_int] [int] NOT NULL, [posted_by_vchr] [varchar](45) NOT NULL, CONSTRAINT [PK_tbl_photo_gallary_1] PRIMARY KEY CLUSTERED ( [image_id_int] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]) ON [PRIMARY] now i wanna to get a randomly selected image_path_vchr(image path) from each photo_cat_id_int(category) i m doing this: select TOP (1) image_path_vchr from tbl_photo_gallery where photo_cat_id_int=1 ORDER BY NEWID() to get random image_path_vchr from category 1....only single category. but i wanna to use a simple query to get random image_path_vchr from each category without using any temporary table..... plzzzzzzzz help me out......... thanks in advance
View Replies !
Read A Image From A Location And Store It In A Table Using Query
Hello Everyone I have a doubt, Is it possible to read a image file and store it in a table column using a sql query.Its related with the sql 2000 reporting services, i want to render dynamic images to a report(.rdl) column, i have the images location url in a table, i can able to get the url of the image but i cannot render the image in the report, what i tried is to have a image in the report and pass the url to the src of the image, but its not displaying as sql 2000 reporting services is not having the feature of it, it has options of rendering either a embedded static image or the a image from a db column, as its not necessary for me to store the image all the time in the table, i want to use it only in a temporary table, so thats y asking this query, is it possible or not, if its not possible help me with some other solution.Thanks In advance.Venkat.
View Replies !
|