Viewing 15 posts - 6,781 through 6,795 (of 13,469 total)
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'...
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
...
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...
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...
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...
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...
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...
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...
September 14, 2011 at 2:40 pm
views(as well as procs and functions) can become invalid if the underlying tables/views they use have changed, got dropped, etc.
in SQL 2000 (the forum you posted in) you cannot use...
September 14, 2011 at 2:15 pm
you can call CoreFTP via a command line, and it supports SFTP.
once a profile is setup for the destination SFTP with the username and password in it, you can call...
September 14, 2011 at 11:45 am
all right, this was interesting for me, as I know i could do it in TSQL.
here's a working solution for header and data...i ignored the footer information for now.
copy and...
September 14, 2011 at 11:13 am
well, you are using a two part test for the "Cash Payment"...chknumber has to be blank and ALSO you are checking the amount...
i'd think that the amount may be...
September 13, 2011 at 8:47 pm
yep null would probably be the culprit; just wraping it with ISNULL should fix it i think:
select
CASE
WHEN ISNULL(chcknumber,'') = '' AND checkAmount <> ''...
September 13, 2011 at 2:34 pm
just syntax; the case returns the desired value only, so you can't have a assigning, like that chknbr='Cash':
select
CASE
WHEN chcknumber='' AND checkAmount <> ''
...
September 13, 2011 at 1:48 pm
here's my take on it;
this query featuring a CTE lists all foreign keys, and if there is an index with the leading column on the child table or not.
if it...
September 13, 2011 at 12:52 pm
Viewing 15 posts - 6,781 through 6,795 (of 13,469 total)