Viewing 15 posts - 6,766 through 6,780 (of 13,460 total)
i didn't see any relationship between the two queries, so i could only assume a CROSS JOIN would be right.
does this do what you are looking for?
SELECT
a.accountnumber,
...
Lowell
September 16, 2011 at 12:05 pm
you can wrap the commands for all 15 alters in a single transaction though...so you can make sure it's all or nothing.
SET XACT_ABORT ON --bailout and rollback on any error...
Lowell
September 16, 2011 at 11:26 am
however, if htey connected using a SQL login, the windows username is not available in any way, shape or form, unless you specifically code an application to get the information...
Lowell
September 16, 2011 at 9:28 am
well, this is syntactically correct, and a good basisi for the way I would do it; i changed your @body variable name, i hate having a local variable the smae...
Lowell
September 16, 2011 at 8:45 am
piece of cake.
add some CSS to the top of your command to put the default style on the td tags.
my example here is using font size 11 points...change it to...
Lowell
September 16, 2011 at 8:22 am
Sean Lange (9/16/2011)
Lowell that picture is awesome. It fits perfectly in another thread from a couple days ago. I will have to "steal" your pic and paste it in there.
kewl!...
Lowell
September 16, 2011 at 7:34 am
ACinKC (9/16/2011)
Lowell
September 16, 2011 at 7:15 am
looking at it but my first try didn't make sense;
here's sample data for other posters to fiddle with:
;with MySampleData (TheDate,TheValue)
AS
(
SELECT CONVERT(datetime,'20100101'),'-1' UNION ALL
SELECT '20100201','-1' UNION ALL
SELECT '20100301','1' UNION ALL
SELECT '20100401','1'...
Lowell
September 15, 2011 at 1:47 pm
i think you can just do it with inline SUM..CASE...
you almost had the syntax in your example:
does this do what you wanted?
SELECT
...
Lowell
September 15, 2011 at 12:00 pm
dave_vicary (9/15/2011)
Now receiving this error:
Msg 208, Level 16, State 82, Line 1Invalid object name 'BULKDATA'.
Sorry to keep bugging you with...
Lowell
September 15, 2011 at 10:49 am
glen.wass (9/15/2011)
HI if your willing to share i would love a copy of the script you mention i have SQL2005 and 2008
It's here on the forums in a few different...
Lowell
September 15, 2011 at 9:55 am
i copy and pasted the file into a text document from the web page, so my lines all ended in Carriage Return Line feeds(CHAR(13) + CHAR(10) because of the enhanced...
Lowell
September 15, 2011 at 9:46 am
note that those two new DM views are in SQL 2008R2 and above:
sys.dm_sql_referencing_entities
sys.dm_sql_referenced_entities
i went to test in 2008 and saw they were not there...
you might have to stick witht...
Lowell
September 15, 2011 at 9:26 am
yeah without taking Foreign keys into consideration, doing a straight DELETE will typically raise errors .
this snippet generates teh TRUNCATE TABLE/DELETE FROM statements in Foreign key hierarchy Order:
that avoids issues...
Lowell
September 15, 2011 at 7:39 am
Beginner_2008 (9/14/2011)
I have a table say table 1 which has many columns but out of these one column say Tid is null and all...
Lowell
September 14, 2011 at 2:40 pm
Viewing 15 posts - 6,766 through 6,780 (of 13,460 total)