Viewing 15 posts - 76 through 90 (of 206 total)
You can put one of the selects into the original and just make it a subselect with an alias of y. Does this work?
select x / y
from
(select...
September 14, 2009 at 2:05 pm
I just noticed a problem in my script also. You will probably need to change the line to read: partition by checksum(c1.countryName+c2.countryName) as the other way could cause...
September 14, 2009 at 8:47 am
Will this work?
;WITH cte AS
(
SELECT c1.countryName CountryName1, c2.countryName CountryName2, ROW_NUMBER() OVER (partition by checksum(c1.countryName)+checksum(c2.countryName) ORDER BY c1.groupid) rowNum
FROM countries c1
FULL OUTER JOIN countries c2 ON c1.groupID = c2.groupID...
September 14, 2009 at 6:51 am
See if this is what you are looking for.
http://www.sqlservercentral.com/scripts/Miscellaneous/30659/
September 11, 2009 at 11:39 am
Brad Allison (9/11/2009)
SELECT DISTINCT Case_Code, (glued + plant) as Glued, flat
FROM Carton_Inventory.dbo.vwscheduledcasesavailable3
WHERE [date]>='9/11/2009'
The following data is returned:
CASECODE ...
September 11, 2009 at 6:05 am
There is probably a better way to do this but here is my first shot.
CREATE TABLE #temp (NAME VARCHAR(10), leavetypeid INT, gender CHAR(1))
INSERT INTO #temp
SELECT 'A',1,'M'
UNION ALL
SELECT 'A',2,'M'
UNION ALL
SELECT 'A',3,'M'
UNION...
September 10, 2009 at 6:05 am
I am not sure the criteria is correct. If you want sites that span across a given date range then your operators are incorrect. This will get you...
September 9, 2009 at 11:40 am
Not sure about the internals but changing it to use a temp table instead of a table variable worked for me.
CREATE TABLE #table1 (cID bigint,Uid bigint)
insert into #table1 select...
September 9, 2009 at 7:18 am
ok, what about the status column of the sp_helpdb sproc?
edit: doesn't look like this returns anything for offline databases in sql 2008
September 8, 2009 at 2:19 pm
Found this on the site:
select name as DBNAME,
CASE WHEN (STATUS & 1) = 0 THEN 'FALSE' ELSE 'TRUE' END AS [AUTOCLOSE_(ALTER_DATABASE)],
CASE WHEN...
September 8, 2009 at 1:41 pm
It looks like it is the status column you are after but it is the addition of the bits. Someone has probably written a script to query this but...
September 8, 2009 at 1:38 pm
have you checked sysdatabases? i don't have a sql 7 instance available. try sysdatabases or sys.databases
September 8, 2009 at 1:30 pm
Just to throw another wrench in the mix. You will also have to work out the order the scripts are processed. Either by standard naming conventions or by...
September 8, 2009 at 1:28 pm
That functionality isn't really built in to SQL server but you can do this if you are using SQL 2005 or later
SELECT *, ROW_NUMBER() OVER (ORDER BY [column name]) as...
September 8, 2009 at 1:19 pm
Jacob Pressures (9/8/2009)
Both tables...
September 8, 2009 at 12:00 pm
Viewing 15 posts - 76 through 90 (of 206 total)