You at that you are pulling in a string of integers, is the string comma delimited?
If so then you can use Dynamic SQL. Something like this
declare @sql varchar(2000)
set @sql = 'UPDATE CT_Time SET Approved = -1 WHERE CONVERT(VARCHAR, THID) In (' + @TimeToApprove + ')'
exec (@sql)
This doesn't sound like a back end problem so you might be better off asking your question on the following forum :
http://www.macromedia.com/cfusion/webforums/forum/categories.cfm?catid=144
Good Luck!
I am guessing that the the poster is an Oracle User in which case you could try and use UPPER(), LOWER() or INITCAP() functions to achieve your result.
Something like this might help :
SELECT * FROM tbl WHERE UPPER(myfield) LIKE '%SMITH%'
I don't think you should really store the images in a SQL Server table. How about storing a pointer to an image (you can use the file name, directory name or URL). The actual image can be stored on a file system or on the web server.
It's actually quite easy to write ASP code to build an image...
Your question is a little bit vague to be honest. The second line of your id contains 3 different IDs separated by a pipe so do you want to return the first one or all three?!
anyway, perhaps the following bit of code might give you the inspiration to find a better solution!
declare @test...
Strictly speaking the above is not actually a nested select statement but a correlated sub query.
A nested query would look something like :
SELECT a.title,
(SELECT codeName from Codes where CodeID = 1),
a.price
FROM books
Of course there are many ways to achieve the same...
select title, retail
from books, orders, orderitems
where orders.customer# = 1017
and orders.order# = orderitems.order#
and orderitems.isbn = books.isbn
and retail = (select max(retail)
from books b
where books.isbn = b.isbn)
select a.*
from yourTable as a
where a.datest = (select max(datest)
from yourTable as b
where a.claimno = b.claimno)
and Status <> 'Case closed'
Reality of a dreameR.
Try this :
DECLARE @TableName nvarchar(60)
DECLARE @SqlCommand nvarchar(4000)
CREATE TABLE #Return (TableName nvarchar(60), [RowCount] int)
-- Get the names of all tables owned by 'dbo', excluding 'Shadow' tables
DECLARE c_tbl CURSOR FAST_FORWARD FOR
SELECT a.[name]
FROM sysobjects as a...
What do you mean it doesn't work for you?! Did you run this in query analyzer?
Search Books On Line for more information on @@Version
.. and it does give you information on the your current Service Pack (if you get it to work that is)
Good Luck!
Nigel your script returns two rows only
5 2003-01-02 00:00:00.000 21
6 2002-06-09 00:00:00.000 27
How about :
SELECT *
FROM TBLAS A
WHERE VENDORID IN (SELECT VENDORID
FROM TBL
GROUP BY PROPERTYID, VENDORID
HAVING COUNT(*) > 1)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.