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 TouchToneTommy 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: *

  • Users: karen4201
  • Content: Threads
  • Order by date
  1. karen4201

    group by 30 min. intervals

    Hi, I'd like to organize my data based on a datatime field grouped by 30 minute intervals. I'm thinking about using a CASE statement that would look at the minute and if 0..30 then it would get 1, otherwise it would get 2...so 1 is the first half hour, and 2 is the second half hour. There are...
  2. karen4201

    trigger doesn't work. why?

    I've developed a trigger that runs for an UPDATE on table A. It simply calculates some information and updates table B when table A has an update. It works fine if the update is on only 1 item in table A. However, if table A has multiple items that are updated, then the trigger returns an...
  3. karen4201

    sql variable not working. why is this?

    I have a variable that doesn't work properly, but the query works when I use a string of characters.... DECLARE @nameStr _str varchar(3500) set @nameStr = 'aaa','bbb','ccc' this works: select * from tableA where name in ('aaa','bbb','ccc') but this does NOT work: select * from tableA where...
  4. karen4201

    what sql would do this?

    Hi, I have a table with a document's history. The table's fields are: docid (int), name (varchar), version(int), status(varchar) status could be = under construction, published, expired with each editing of a document, a new record is inserted and the version number is incremented. Here is...
  5. karen4201

    xsl question...

    Hi, I couldn't find an XSL forum, so I thought I'd post my question here. I'm trying to create a hyperlink based on a value-of. Here is the code, which is not working: <a href='<xsl:value-of select="myURL"/>' >the link</a> How could I get this to work? Thanks in advance.
  6. karen4201

    how do I modify a string field?

    Let's say I have a table field that contains "Joe, Bob, Mike" and the names might be rearranged (like "Bob, Joe, Mike"). Is there an easy way to update ALL fields that contain "Bob" so that the field would simply have Bob removed from it? So, in essence: there is a table with a text field...
  7. karen4201

    handling the &quot;&amp;&quot; character in a string

    Hi all, I'm trying to build 2 drop-down lists. When the first (list A) drop-down is selected and an item is picked, the JS will automatically populate the second (list B) drop-down list. I have it working for most items. However, if list A contains an item with a "&" character, such as...
  8. karen4201

    SQL Server version control?

    I'd like to apply the principles of Version Control to my database objects. How are others doing this? I am thinking about saving the db scripts as text files and then using a version control program to organize and manage the text files. However, this puts a requirement on any database...
  9. karen4201

    can I do a combined update?

    I'm not sure what it would be called, but could this be done? Just as how I could do an INSERT by using a SELECT statement, such as: insert into tableA(the_id, the_date) select tableB.the_id as [the_id], '2006-01-01' as [the_date] from tableB left outer join tableB_other on tableB.the_id =...
  10. karen4201

    set VS. select...difference?

    what's the difference in SQL Server for these two statements? set @a = 'hello' select @a = 'hello' they seem to have the same result...so what's the difference?
  11. karen4201

    how to speed this up?

    I have 2 tables. One gets a nightly feed of data. The second table contains my own calculations based off of the data from the feed. Here is the sql that I'm using to make the calculations and make my customized data. It's very slow. Any thoughts on how to speed it up would be GREATLY...
  12. karen4201

    what if I'm running a SP and get disconnected from web?

    Hi, What if I use my local query analyzer to execute a stored procedure, but then lose my connection to the network? Would the SP continue running on the server, or would the SP stop running? Thanks
  13. karen4201

    how do I speed up a &quot;not in&quot; ?

    Hi, I have a query that looks like (variables are set before running the query): select id from tableA myA where a > @start_date and a < @end_date and a.userid not in ( select userid from userTable where age > myA.age ) The purpose of the query has been made up, but the problem...
  14. karen4201

    how do I UNION and GROUP BY these queries?

    I have two select statements, both of which return two fields of information: select a.something as [my_something], b.otherthing as [my_otherthing] from tableA a, tableB b where a.the_date > b.the_date and select a.something as [my_something], c.otherthing as [my_otherthing] from tableA a...
  15. karen4201

    query caching?

    This is a beginner question: It seems like SQL Server caches a query and its results. Is there a way to clear the cache so that I can test the run-time for a query? I'd like to see how long it would run for a new visitor to my database-driven web site. Then I could optimize the query...
  16. karen4201

    organizing datetime by week?

    Hi, I'm trying to use the code "DateAdd(day, datepart(dw, ReviewDate), ReviewDate )" to organize the ReviewDates by weeks. However, my code keeps grouping some items incorrectly. Since I don't know what is happening, I'll include all possible information. -there is a date field that is...
  17. karen4201

    how to use sql to make a list of dates?

    Let's say I don't have any date items to select. How could I generate a list of dates? For example, I might want a list of all dates between Jan. 1, 2002 and Mar. 1, 2002. Could I use something like "getdate()" or a similar date function to do a select? Thanks in advance.

Part and Inventory Search

Back
Top