Viewing 15 posts - 1,726 through 1,740 (of 3,500 total)
If you have any say in the structure of the database, stay away from a design where you have dates/information for column names. Been there, done that. It was an...
November 17, 2016 at 9:52 pm
Sounds like homework. So I'm not going to give you a direct answer, because then you wouldn't learn anything. And this forum isn't an answer machine...
If you're...
November 17, 2016 at 9:42 pm
Did this ever work in Access? If so, I would look at the RowSource properties of the various forms involved, so you know what's coming from where. Once you...
November 16, 2016 at 11:02 am
I guess I should see if I can find some more books... a few more and I'm gonna have to buy a new book case, or just dump some ......
November 8, 2016 at 7:51 pm
Thanks, Alan... is there a book on T-SQL that discusses using Temp tables etc vs TVFs etc? and CROSS/OUTER APPLY too? (although I like SQLKiwi's explanation of the topic)...
November 8, 2016 at 4:11 pm
Thanks for answering... I was wondering especially about when to use Temp tables etc when writing queries. Most of the stuff I read doesn't cover really complex querying, which...
November 8, 2016 at 2:58 pm
Does this work? Where's your data for 25?
SELECT CID
,SUM(Worked) AS Hrs_Worked
,SUM(Sick) AS Hrs_Sick
FROM (
SELECT CID
, Hrs
--, Hr_type
, CASE WHEN Hr_Type IN ('Full', 'Part', 'Contract') THEN Hrs ELSE 0 END...
November 7, 2016 at 4:37 pm
This is a bogus question.
There are times when you need table-valued functions, and even cursors, which a lot of developers strongly dislike. Sometimes, using a cursor is the best...
November 7, 2016 at 11:59 am
You need OR, not AND.
select * from #employee
where FirstNm = 'John'
OR FirstNm = 'Linda'
November 6, 2016 at 7:00 pm
What would you return if the value were NULL? Kind of depends on what you're trying to do. NULL is no the same as zero. NULL means "unknown".
If you're...
November 5, 2016 at 2:36 pm
This worked...
USE Tempdb;
GO
DROP TABLE #tempTable;
GO
CREATE TABLE #tempTable(
col1 varchar(5),
col2 varchar(5),
col3 varchar(5)
);
GO
INSERT INTO #tempTable VALUES ('aa', '100', 'vv'),
('200', 'bb', 'dd'),
('dd', 'nn', '300');
SELECT COALESCE(TRY_CONVERT(INT,col1),TRY_CONVERT(INT,col2),TRY_CONVERT(INT,col3)) AS Result
FROM #tempTable;
If the TRY_CONVERT...
November 5, 2016 at 1:53 pm
We don't do your homework... that's your job. the way to test your design is to add a few records to your table and test... did you do that...
November 4, 2016 at 8:48 pm
"However I do not know how to create multiple groupings based on different parts of the same sql server 2012 column containing different literals."
Normalization is a beautiful thing. And...
November 2, 2016 at 2:08 pm
"However I do not know how to create multiple groupings based on different parts of the same sql server 2012 column containing different literals."
Normalization is a beautiful thing. And...
November 2, 2016 at 2:06 pm
why not just put each letter in its own rectangle? (and all 3 inside another rectangle). Then you can control the page breaks yourself
November 2, 2016 at 9:11 am
Viewing 15 posts - 1,726 through 1,740 (of 3,500 total)