Viewing 15 posts - 1,516 through 1,530 (of 2,462 total)
Jeff Moden (5/11/2015)
Alan.B (5/11/2015)
If you are talking about...
-- Itzik Ben-Gan 2001
May 11, 2015 at 1:52 pm
Glad that worked. Happy to help.
-- Itzik Ben-Gan 2001
May 11, 2015 at 10:50 am
spaghettidba (5/11/2015)
LIKE would do as well:
WHERE ex NOT LIKE '%[^A-G0-9]%'
... and would be better than what I posted. I have not finished my coffee this morning and need to do...
-- Itzik Ben-Gan 2001
May 11, 2015 at 10:30 am
Yes and Yes no. If you post an example of what you are trying to do specifically we can provide a specific example.
If you are talking about doing something like...
-- Itzik Ben-Gan 2001
May 11, 2015 at 10:06 am
What have you tried?
For scripting multiple tables to be trunctated it would be something like this:
TRUNCATE <Table1>;
TRUNCATE <Table2>;
TRUNCATE <Table3>;
TRUNCATE <Table4>;
--etc...
For...
-- Itzik Ben-Gan 2001
May 11, 2015 at 10:02 am
I don't 100% understand your question but think that PATINDEX will help if you're asking what I think you're asking...
You want fields that only contain the letters A through G...
-- Itzik Ben-Gan 2001
May 11, 2015 at 9:51 am
The best way would be to have a second parameter that allows the user to specify what they want (first day of the month, week, etc) then have the next...
-- Itzik Ben-Gan 2001
May 11, 2015 at 9:33 am
First, Month and Year are terrible field names. Second, Splitting date attributes into separate columns is a bad idea.
Using your original sample data you could do this:
DECLARE @yourData AS...
-- Itzik Ben-Gan 2001
May 11, 2015 at 9:23 am
I agree, no problem. Here's a good MSDN page that talks about what to look out for.
https://msdn.microsoft.com/en-us/library/ms143674(v=sql.110).aspx
I will add that anytime you upgrade your reports to a new version...
-- Itzik Ben-Gan 2001
May 10, 2015 at 9:53 pm
Yes, paging can be done in T-SQL. Below is some sample data and two examples of how to do it.
-- Sample Data
DECLARE @sales TABLE
(
sale_id int primary...
-- Itzik Ben-Gan 2001
May 10, 2015 at 9:38 pm
Are the [predicates] the columns in the WHERE clause of a SELECT statement?
There is no WHERE clause in a SELECT statement. There is a WHERE clause in a SQL...
-- Itzik Ben-Gan 2001
May 8, 2015 at 5:50 pm
I would start with the The Microsoft Data Warehouse Toolkit, Second Edition: With SQL Server 2008[/url]
Great books for SSAS and MDX specifically are the "Step by Step" books.
SQLServerCentral...
-- Itzik Ben-Gan 2001
May 8, 2015 at 3:46 pm
How about...
WITH containsString AS (SELECT string FROM (VALUES ('% sports %'),('% exercise %'),('%toy%')) t(string))
SELECT DISTINCT c.Name
FROM Sales.Store c
JOIN containsString cs ON c.Name LIKE cs.string
Quick edit: Did not see Nevyn or...
-- Itzik Ben-Gan 2001
May 8, 2015 at 3:18 pm
My question is why do you care how many rows of each column have NULL?
That does seem like an odd requirement.
-- Itzik Ben-Gan 2001
May 8, 2015 at 10:09 am
cppwiz (5/8/2015)
Neither of these will directly prepare you for certification, but they will give you a much broader learning opportunity....
-- Itzik Ben-Gan 2001
May 8, 2015 at 9:20 am
Viewing 15 posts - 1,516 through 1,530 (of 2,462 total)