Viewing 15 posts - 10,786 through 10,800 (of 26,489 total)
gerard-593414 (7/11/2012)
There are numerous users and want...
July 11, 2012 at 11:50 am
Probably for the same reason I do, the sysstem views have more information available than the INFORMATION_SCHEMA views. If I was writing something that had to be portable between...
July 11, 2012 at 11:44 am
SQLRNNR (7/11/2012)
Lynn Pettis (7/11/2012)
July 11, 2012 at 10:37 am
You keep asking the same question. There are two system views that will help you: sys.databases and sys.master_files. Look up these views in Books Online and figure out...
July 11, 2012 at 10:24 am
mitzyturbo (7/11/2012)
Haven't...
July 11, 2012 at 10:13 am
Mark-101232 (7/11/2012)
with cte as (select row_number() over (partition by identifier, templateid order by CreateDate desc ) as num,
count(*) over (partition by identifier, templateid)...
July 11, 2012 at 10:10 am
Here is one way:
create table #tmp1 (
formfileid int,
identifier varchar(100),
templateid int,
[status] tinyint,
createdate datetime
);
insert into #tmp1
select 1, 'xx1', 1, 0, '1/1/2010'
union select 2, 'xx1', 1, 0, '1/2/2010'
union select 3, 'xx1', 1,...
July 11, 2012 at 10:09 am
Sounds like you don't have permissions to create a stored procedure.
July 11, 2012 at 9:56 am
ChrisM@Work (7/11/2012)
Or like this:
;WITH Numbers AS (SELECT * FROM (VALUES (1),(2),(3),(4),(5),(6),(7),(8),(9),(10),(11),(12),(13),(14),(15),(16),(17),(18),(19),(20),(21),(22),(23),(24),(25),(26),(27)) d(n))SELECT CHAR(a.n+64) + CAST(b.n AS VARCHAR(2))
FROM Numbers a CROSS JOIN Numbers b
WHERE a.n < 27
I like this...
July 11, 2012 at 9:52 am
Or you could do it this way:
WITH e1(n) AS (SELECT n FROM (VALUES(1),(1),(1),(1),(1),(1),(1),(1),(1),(1)) dt(n)),
e2(n) AS (SELECT ROW_NUMBER() OVER (ORDER BY (SELECT NULL)) n FROM e1...
July 11, 2012 at 9:41 am
Since you are running a aggregate query, SQL Server has to sort the data by the group by columns so that it can properly complete the aggregation. This will...
July 11, 2012 at 9:26 am
Looking for something like this? Granted, I hardcoded, but if needed I'm sure I could come up with something more generic.
SELECT
dt.a + CAST(dt1.n AS VARCHAR)
FROM
...
July 11, 2012 at 9:20 am
I am confused slightly by your initial post. Your procedure takes two dates as input parameters, a start date and an end date. As you did not provide...
July 11, 2012 at 9:00 am
Problem I see with your sample data is that ther is no clear seperator between the values. Some of your beaks appear to be the semicolon (;) but others...
July 11, 2012 at 8:39 am
Ray K (7/11/2012)
I just signed up!!!Go Orange Engineers!!!
The returning champions, the SQL Bolts, have arrived!
May the best team win, even if it isn't me.
July 11, 2012 at 7:47 am
Viewing 15 posts - 10,786 through 10,800 (of 26,489 total)