Viewing 15 posts - 2,326 through 2,340 (of 2,463 total)
Using Jeff Moden's splitter[/url] you can do this...
DECLARE @spitme TABLE (Item varchar(40));
INSERT @spitme VALUES ('HEYE-B Euro-IPA 69793'), ('HEYE-B RFE-IPA 70940');
SELECT s.Item
FROM @spitme val
CROSS APPLY test.[dbo].[DelimitedSplit8K](val.Item,' ') s
WHERE ItemNumber = 2
-- Itzik Ben-Gan 2001
December 17, 2012 at 5:49 pm
Thanks Gail.
-- Itzik Ben-Gan 2001
December 17, 2012 at 5:08 pm
Your typo messed me up too...
You can also try:
;WITH x AS
(SELECT ID, Stat, StatDate
FROM #Apps
WHERE Stat='AppRec' AND StatDate >= '2012-12-01' )
SELECT ID, Stat, StatDate
FROM #Apps
WHERE ID...
-- Itzik Ben-Gan 2001
December 17, 2012 at 5:03 pm
zilla (12/17/2012)
-- Itzik Ben-Gan 2001
December 17, 2012 at 3:45 pm
In case anyone was curious - the line in the Ben Gan book I was referring to is:
The SQL Server documentation indicates that not terminating T-SQL statements with a semicolon...
-- Itzik Ben-Gan 2001
December 17, 2012 at 11:58 am
I cannot find anything that states that it has become mandatory, but I did find someone claiming that the BOL for SQL 2008 (not R2) stated that it was...
-- Itzik Ben-Gan 2001
December 17, 2012 at 9:35 am
Great Post!
-- Itzik Ben-Gan 2001
December 13, 2012 at 8:43 pm
Sean Pearce (12/11/2012)
+1
-- Itzik Ben-Gan 2001
December 13, 2012 at 4:27 pm
forceman29 (12/13/2012)
-- Itzik Ben-Gan 2001
December 13, 2012 at 10:57 am
I second all those that said Itzek Ben-Gan. There are some great stairways on this site. I would say that Greg Larson's Stairway to DML and Celko's Stairway to Data...
-- Itzik Ben-Gan 2001
December 13, 2012 at 9:47 am
capnhector (12/12/2012)
-- Itzik Ben-Gan 2001
December 12, 2012 at 6:07 pm
CELKO (12/12/2012)
Read about the Window clause, which makes it very easy to write running totals:
CREATE VIEW Running_Balance (payment_nbr, receipt_date, payment_amt, acct_balance)
AS
SELECT payment_nbr, receipt_date, payment_amt,
...
-- Itzik Ben-Gan 2001
December 12, 2012 at 5:25 pm
Sean Grebey (12/11/2012)
-- Itzik Ben-Gan 2001
December 12, 2012 at 3:15 pm
sanandh87 (12/12/2012)
Hi,... and I need dump also.
Thanks,
Anandh
I like this guy's blog and am using it to study for the SQL Serve 2012 certs. Note how he passed and why he...
-- Itzik Ben-Gan 2001
December 12, 2012 at 2:53 pm
SSIS is the best tool for this.
-- Itzik Ben-Gan 2001
December 12, 2012 at 1:51 pm
Viewing 15 posts - 2,326 through 2,340 (of 2,463 total)