Viewing 15 posts - 1,921 through 1,935 (of 2,171 total)
See also
http://p2p.wrox.com/topic.asp?TOPIC_ID=47422
http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=69501
N 56°04'39.16"
E 12°55'05.25"
July 24, 2006 at 5:41 am
declare @ids varchar(5)
SET @ids = '1,2'
declare @sql varchar(1000)
select @sql = 'SELECT SATA_AllocationObject.*, Id AS Expr1'
select @sql = @sql + ' FROM SATA_AllocationObject'
select @sql = @sql + ' WHERE Id IN ('...
N 56°04'39.16"
E 12°55'05.25"
July 22, 2006 at 3:14 pm
Check out the MSDB database tables
Sysjobs
SysjobHistory
SysjobSchedules
SELECT * FROM msdb..sysjobs
SELECT * FROM msdb..sysjobhistory
SELECT * FROM msdb..sysjobschedules
N 56°04'39.16"
E 12°55'05.25"
July 21, 2006 at 8:46 am
select MyField,
stuff (
MyField,
8,
case
when charindex('&', MyField) = 0 THEN LEN(MyField)
ELSE charindex('&', MyField) - 8
end,
10 + case
when charindex('&', N 56°04'39.16"
E 12°55'05.25"
July 21, 2006 at 6:39 am
Do you have sample data from your REAL table?
It seems to me that you do not have "VIEWID=" first in every row, if any text at all is present.
Run this...
N 56°04'39.16"
E 12°55'05.25"
July 21, 2006 at 2:45 am
Yes, they are equally safe.
The DATEDIFF(day, 0, GETDATE()) calculates the number of days passed since day Zero, which is January 1, 1900. This is what clips the time information.
These number...
N 56°04'39.16"
E 12°55'05.25"
July 21, 2006 at 2:41 am
No.
Just copy this code and paste to you Query Analyzer.
select MyField,
stuff (
MyField,
8,
case
when charindex('&', MyField) = 0 THEN LEN(MyField)
ELSE charindex('&', MyField)...
N 56°04'39.16"
E 12°55'05.25"
July 20, 2006 at 2:50 pm
That is just for simulating your environment. I am populating my table variable with test data.
-- Populate test data
declare @a table (z nvarchar(100))
insert @a
select 'VIEWID=582' union...
N 56°04'39.16"
E 12°55'05.25"
July 20, 2006 at 2:26 pm
declare @a table (z nvarchar(100))
insert @a
select 'VIEWID=582' union all
select 'VIEWID=582&PARAM1=A%25' union all
select NULL
select z,
stuff (
z,
8,
case
when charindex('&', z) = 0 THEN LEN(z)
ELSE charindex('&', z) - 8
...
N 56°04'39.16"
E 12°55'05.25"
July 20, 2006 at 2:15 pm
This might give you an idea how to start
-- Prepare test data
declare @customers table (custid int, custname varchar(2))
insert @customers
select 1, 'AA' union all
select 2, 'AB' union all
select 3, 'C' union all
select 4,...
N 56°04'39.16"
E 12°55'05.25"
July 20, 2006 at 4:45 am
As the error says, you are trying to change a column that has a foreign key constraint to another table.
N 56°04'39.16"
E 12°55'05.25"
July 20, 2006 at 4:11 am
Yes, R2ro's solution is fast. And if I change
SET @daysDiff = DATEDIFF(day, @prmLoDate, @prmHiDate)
to
SET @daysDiff = 1 + DATEDIFF(day, @prmLoDate, @prmHiDate)
it calculates the right days too.
I...
N 56°04'39.16"
E 12°55'05.25"
July 20, 2006 at 3:50 am
Good! Here is a guy who actually read the first part of the article where I wrote that a CROSS JOIN solution is the fastest solution
E 12°55'05.25"
July 20, 2006 at 3:33 am
Otherwise just put a $sign after the name for the sheet,
[test$]
N 56°04'39.16"
E 12°55'05.25"
July 20, 2006 at 1:31 am
This is an interesting approach!
However, since float is not exact value there might be a difference in result. But since we only want to keep day information that might not...
N 56°04'39.16"
E 12°55'05.25"
July 20, 2006 at 12:47 am
Viewing 15 posts - 1,921 through 1,935 (of 2,171 total)