Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. dreameR25

    In Operator in Update Statement

    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)
  2. dreameR25

    MS SQL encoding. Macedonian cyrilic

    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!
  3. dreameR25

    Sql Like statement to ignore case

    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%'
  4. dreameR25

    substring function

    The question states,
  5. dreameR25

    substring function

    Relax rudy, it was a joke dude.
  6. dreameR25

    Problem while inserting image type data

    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...
  7. dreameR25

    substring function

    no rudy, you just copied it from mine, now give up the little games! :p
  8. dreameR25

    substring function

    Oops!! My mistake... the questio is clear if you read it properly D'oh. Anyway, hmckillop does the job.
  9. dreameR25

    substring function

    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...
  10. dreameR25

    Help with MIN function

    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...
  11. dreameR25

    Help with MIN function

    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)
  12. dreameR25

    Distinct alternative

    You can use the GROUP BY clause in your query. Something like this : SELECT townName FROM yourTable GROUP BY townName HAVING COUNT(*) > 1
  13. dreameR25

    Finding claims after the status 'case closed'

    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.
  14. dreameR25

    Conversion issue

    why not just CAST(0 as money) Reality of a dreameR.
  15. dreameR25

    getting records from database

    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...
  16. dreameR25

    Numberic to Date function

    select convert(datetime, '20040419', 112) -- using dat format YYYYMMDD
  17. dreameR25

    How to check SQL version?

    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!
  18. dreameR25

    How to check SQL version?

    select @@version
  19. dreameR25

    Issues with Grouping Data according to the Date.

    Sunila, your query produces : 5 2003-04-23 00:00:00.000 20 5 20 5 2003-02-05 00:00:00.000 20 5 20 5 2003-01-02 00:00:00.000 21 5 20 6 2003-10-14 00:00:00.000 26 6 26 6 2003-09-21 00:00:00.000 26 6 26 6 2002-06-09 00:00:00.000 27 6 26
  20. dreameR25

    Issues with Grouping Data according to the Date.

    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)

Part and Inventory Search

Back
Top