Viewing 15 posts - 1,381 through 1,395 (of 2,007 total)
Simon Parry (11/9/2011)
thanks, but that just returns 0 as the resultany more ideas
thanks
simon
It returns 0 because "dur" is an integer. So as I said, you'll need to CONVERT it.
e.g.
UPDATE my_table
SET...
November 9, 2011 at 9:38 am
Simon Parry (11/9/2011)
i am having problems with a query i have
i am trying to do a select update
i want to have something like
update my_table
set dur = (SELECT
@rec_count = (select ...
November 9, 2011 at 9:21 am
First, thanks for the sample data! It makes things much easier 🙂
Let's just tidy it up a little bit: -
IF object_id('tempdb..#testEnvironment') IS NOT NULL
BEGIN
DROP TABLE #testEnvironment
END
SELECT IDENTITY(INT,1,1) AS ID,
stock,...
November 9, 2011 at 9:12 am
anthony 80098 (11/9/2011)
Hi Jeff, even in the instance where there are only 2 rows, i still need to display 15 rows.
We got that you want to display 15 rows. What...
November 9, 2011 at 8:59 am
JimS-Indy (11/9/2011)
November 9, 2011 at 8:36 am
Hakuna Matata (11/9/2011)
I need to retrieve all the tables, stored procedure's, views, functions etc which are related to a particular field in a database.
For example if the field...
November 9, 2011 at 2:29 am
Hello and welcome to SSC!
It seems that your DDL script has become detached from your post, or perhaps you were unaware of the benefits of providing one.
When you have time,...
November 9, 2011 at 2:21 am
JayK (11/9/2011)
I have a query which sums the total number of commercial seconds aired in a clock hour
SELECT SUM(BookedLength) As TotalPerHour
FROM ComercialsBreaks
GROUP BY ClockHour
So a result might be 700 seconds...
November 9, 2011 at 1:56 am
goofbauer (11/8/2011)
http://stackoverflow.com/questions/58429/sql-set-based-range
No dependencies, backward compatible w/ 2005.
DECLARE @MyDates TABLE(d DATETIME NOT NULL);
WITH CTE AS (
SELECT1 AS n
UNION ALL
SELECTn + 1...
November 8, 2011 at 8:03 am
The complication is in allowing more than 2 words.
The following checks for 2 words that are 5 or less words apart.
using System;
using Microsoft.SqlServer.Server;
using System.Data.SqlTypes;
using System.Text.RegularExpressions;
namespace searchFeatures
{
public...
November 8, 2011 at 7:35 am
Damion (11/8/2011)
I am trying to retrieve the first part and the first letter on the second part of a UK postcode, i.e. if a postcode is AB12 3CB, I would...
November 8, 2011 at 6:41 am
Interesting.
I don't have time to develop a fully working script, but this will generate SELECT statements of the data from your table.
Note, it's reliant on the size of VARCHAR(MAX), so...
November 8, 2011 at 4:20 am
adonetok (11/7/2011)
How to modify code to display as '09:30:00 PM'?
declare @date datetime
set @date = '2011-11-08 21:30:00.000'
select CONVERT(VARCHAR, @date, 108) + ' '...
November 7, 2011 at 10:19 am
adonetok (11/7/2011)
The third party applicaton only take format like below(including space):
'11/07/2011 09:30:00...
November 7, 2011 at 9:38 am
Viewing 15 posts - 1,381 through 1,395 (of 2,007 total)