Viewing 15 posts - 256 through 270 (of 5,356 total)
CREATE TABLE #showme
(
sku INT
, item VARCHAR(8000)
)
INSERT INTO #showme
SELECT 123, '10001,10002,10003,10004,10005,10006,10007'
UNION ALL
SELECT 124, '20001,20002'
SELECT
sku, CAST(RIGHT(LEFT(item,Number-1)
, CHARINDEX(',',REVERSE(LEFT(','+item,Number-1)))) AS CHAR(30))
FROM
master..spt_values, #showme
WHERE
Type = 'P' AND Number BETWEEN 1 AND LEN(item)+1
AND
(SUBSTRING(item,Number,1) = ','...
May 30, 2005 at 12:51 pm
That's what I meant. I would like to see some code and am interested what the standard methodology of CASE is.
May 30, 2005 at 8:04 am
Have you read this: http://www.sqlservercentral.com/articles/articlelink.asp?articleid=1885 Gert makes several interesting remarks on the system tables in the next version.
May 30, 2005 at 8:02 am
I'm not sure if I understand you, but your append query translated to a stored procedure might look something like this:
CREATE PROCEDURE dbo.InsertSomething @startdate DATETIME, @enddate DATETIME, @hours FLOAT
AS
INSERT INTO...
May 30, 2005 at 7:37 am
I've learned to read between the lines over the years
Then you should learn to read closer. No offense intended.
May 30, 2005 at 6:49 am
I have no problem with that, the more people get active here, the better for all. Just keep in mind quantity != quality.
May 30, 2005 at 6:40 am
and as we know sql server does not support the stantdard methodology of CASE
Do we? AFAIK, CASE is pretty much ANSI SQL Standard.
Can you be more specific in your requirement?
May 30, 2005 at 6:30 am
See if this helps: http://www.sql-server-performance.com/fk_datetime.asp
May 30, 2005 at 5:29 am
Have a look at OBJECTPROPERTY. There are two that might be interesting for you :
May 30, 2005 at 2:52 am
You first need to move tables and indexes from the *.ndf files back to the *.mdf file. For tables this is fairly straightforward, just (re)create the clustered index WITH DROP...
May 30, 2005 at 2:34 am
Another approach might be:
SELECT
CAST(
CAST(
(@year * 10000 +
@month * 100 +
@day)
AS CHAR(8))+' '+ @time
AS DATETIME)
Note, that this doesn't check for a valid date before...
May 30, 2005 at 2:02 am
If you don't care about the time portion, you can also do:
SELECT
DATEADD(d, 1-DAY(GETDATE()), GETDATE())
May 30, 2005 at 1:45 am
You can't do that, AFAIK.
May 30, 2005 at 1:42 am
Viewing 15 posts - 256 through 270 (of 5,356 total)