Viewing 12 posts - 1 through 12 (of 12 total)
There's alway that smart ***:-) I'm impressed by your knowledge of SQL. I didn't know this option existed. Honestly much of your code and the logic of your solution escapes...
September 18, 2013 at 6:42 pm
CREATE TABLE #Total_Count
(NUM_DEATHS_1870 numeric (8,0), NUM_DEATHS_1880 numeric(8,0))
INSERT INTO #Total_Count (NUM_DEATHS_1870, NUM_DEATHS_1880)
(SELECT COUNT (*), 0
FROM [dbo].[1870_1880_DAT]
WHERE YR_Died = '1870')
INSERT INTO #Total_Count (NUM_DEATHS_1870, NUM_DEATHS_1880)
(SELECT 0, COUNT (*)
FROM [dbo].[1870_1880_DAT]
WHERE YR_Died =...
September 17, 2013 at 6:35 pm
I'm learning SQL and much respect for those who program in SQL. Thank you. I learned something. My solution will paint me into a corner. My goal was to declare...
September 17, 2013 at 3:27 pm
CREATE TABLE #Total_Count
(NUM_DEATHS_1870 numeric (8,0) NOT NULL, NUM_DEATHS_1880 numeric(8,0) NOT NULL)
INSERT INTO #Total_Count (NUM_DEATHS_1870)
(SELECT COUNT (*) COD
FROM [dbo].[1870_1880_DAT]
WHERE YR_Died = '1870')
INSERT INTO #Total_Count (NUM_DEATHS_1880)
(SELECT COUNT (*) COD...
September 16, 2013 at 10:03 pm
(NUM_DEATHS_1870 numeric (8,0) Not Null, NUM_DEATHS_1880 numeric(8,0) Not Null)
How would I add 0's to INSERT?
September 16, 2013 at 10:00 pm
Use NV_morality_Study
Go
DECLARE @total_count AS int
SET @total_count =
(SELECT COUNT (*) COD
FROM [dbo].[1870_1880_DAT])
SELECT @total_count AS [total count]
Returns 1355
DECLARE @cause_count AS int
SET @cause_count =
(SELECT COUNT(*)
FROM [dbo].[1870_1880_DAT]
WHERE [COD] = 'Pneumonia')
SELECT @cause_count AS [cuase...
August 2, 2013 at 7:13 pm
I just tested these two statements outputs. The output was correct. The SELECT @cuase_count/@total_count As [Percent] failed.
August 2, 2013 at 7:06 pm
I'm a 60 year old unemployed person who enjoyed working in engineering. I can't break the habit of working. I create projects to work on. It was starting one of...
July 22, 2013 at 11:14 am
I heard TSQL defaulted in SELECT DISTINCT queries to sorting by ASC. The ORDER BY worked.
My next problem will be to order by the number of entries...
July 21, 2013 at 7:02 pm
I tried the first set of code.
UPDATE [dbo].[1870_1880_DAT]
SET [TOWN] = rtrim(ltrim([TOWN]))
WHERE [TOWN] <> rtrim(ltrim([TOWN]))
The query ran with out errors.
I tested the query's output by using a SELECT...
July 21, 2013 at 2:22 pm
I imported the csv file into Excel to edit it. I wanted to clean up the data before I created a table.
As I have stated. Part of my goal as...
July 20, 2013 at 6:09 pm
Thanks, for you time answering my question.
After creating a csv file, importing it into a Excel spreadsheet and finally importing it into a SQL table I notices white space both...
July 20, 2013 at 2:04 pm
Viewing 12 posts - 1 through 12 (of 12 total)