Viewing 15 posts - 466 through 480 (of 626 total)
When I'm looking for that kind of info I just normally write a query something like this.
USE AdventureWorks2012
SELECT
COLUMN_NAME,
DATA_TYPE,
CHARACTER_MAXIMUM_LENGTH,
IS_NULLABLE,
NUMERIC_PRECISION,
NUMERIC_SCALE
FROM
INFORMATION_SCHEMA.COLUMNS
WHERE
TABLE_NAME = 'Address'...
September 14, 2015 at 12:36 pm
Ed Wagner (9/14/2015)
Duplicate post. Direct replies to http://www.sqlservercentral.com/Forums/Topic1719361-2799-1.aspx
Although similar the other post asks about information regarding Foreign Keys while this thread asks for Columns Data Type and Size. ...
September 14, 2015 at 12:04 pm
Sorry folks, just realized that I actually didn't ask a question.
Any ideas what else I can do to troubleshoot this issue? There seems to be so little documentation around...
September 14, 2015 at 9:36 am
I suspect there is a piece of info missing. Are you sure they are actually stored as double quotes.
For example try this:
DECLARE @test-2 TABLE(myString VARCHAR(25))
INSERT INTO @test-2
VALUES ('TEST FSC'),...
September 14, 2015 at 8:33 am
September 8, 2015 at 8:52 am
If you just want AdventureWorks just simply change your code to...
Use DBSizeTrack
INSERT INTO Track (RunDate,Dbname,file_Size_MB)
SELECT
GETDATE() as RunDate,
DB_NAME() AS DbName,
SUM(size)/128.0 AS File_Size_MB
FROM AdventureWorks2012.sys.database_files
September 2, 2015 at 9:07 am
That's because you execute it once for every DB but always tell it to use 'AdventureWorks'
Try this instead
EXEC sp_MSforeachdb
'USE [?];
SELECT
GETDATE() as RunDate,
DB_NAME() AS DbName,
SUM(size)/128.0 AS File_Size_MB
FROM sys.database_files'
That...
September 2, 2015 at 8:15 am
Lynn Pettis (9/1/2015)
GilaMonster (9/1/2015)
Why don't you just leave...
September 1, 2015 at 2:04 pm
GilaMonster (9/1/2015)
Ed Wagner (9/1/2015)
ZZartin (9/1/2015)
Steve Jones - SSC Editor (9/1/2015)
Passwords: http://www.pcworld.com/article/2978316/security/tired-of-memorizing-passwords-a-turing-award-winner-came-up-with-this-algorithmic-trick.htmlNow if only all websites used the same algorithm to determine whether a password is strong enough.....
That's a neat approach...
September 1, 2015 at 12:55 pm
Just submitted my request to attend PASS this year. (First Time)
Really hope it gets approved. :Whistling:
However, I just noticed the housing block is all sold out. Maybe, I should...
September 1, 2015 at 11:56 am
Luis Cazares (9/1/2015)
SELECT
t5.pgroup,
CONVERT(NUMERIC(5,2),SUM(CASE WHEN t6.state = 'INSTALLED' THEN 100. END) / COUNT(*)) AS INSTALLED,
CONVERT(NUMERIC(5,2),SUM(CASE WHEN...
September 1, 2015 at 8:54 am
This worked for me.
SELECT DISTINCT
t5.pgroup,
CONVERT(NUMERIC(5,2),(CAST(COUNT(CASE WHEN t6.state = 'INSTALLED' THEN 1 ELSE NULL END) OVER (PARTITION BY t5.pgroup) AS NUMERIC)/CAST(COUNT(t6.state) OVER (PARTITION BY t5.pgroup) AS NUMERIC))*100) AS INSTALLED,
CONVERT(NUMERIC(5,2),(CAST(COUNT(CASE WHEN t6.state...
September 1, 2015 at 8:36 am
ChrisM@Work (9/1/2015)
yb751 (9/1/2015)
September 1, 2015 at 7:42 am
TSQL Tryer (9/1/2015)
I've not designed the database or the table. I'm simply trying to get a report out of it
In that case I suggest breaking out tableA in a temp...
September 1, 2015 at 7:38 am
You shouldn't have multiple CompanyID's stored this way. You'll want to normalize your data. You can't do joins that way unless the actual ID in tableB was "1,2,3,4".
September 1, 2015 at 7:25 am
Viewing 15 posts - 466 through 480 (of 626 total)