Viewing 15 posts - 9,826 through 9,840 (of 13,461 total)
with stored procs, it's a best practice to add SET NOCOUNT ON as the first line of the proc;
this prevents other applications from thinking subsets or commands like (x...
March 22, 2010 at 9:51 am
slight formatting change, added a few aliases, this is syntactically correct:
INSERT INTO database2..table1 (Date, Emails1, Emails2, Emails3)
SELECT getdate() -1 As TheRightDate,X1.CNT,X2.CNT,X3.CNT
FROM
(SELECT count(*) AS CNT FROM database1..table1 WITH (NOLOCK) WHERE...
March 22, 2010 at 9:08 am
i'd have to test it, but by avoiding some string manipulations, it might save a microsecond or two on a big batch; i think it's just shorter and easier on...
March 22, 2010 at 9:00 am
data that is in YYYYMMDD format will natively change to datetime with the code i added...no need to chop it up into pieces; try convert(datetime,sdate) and it should work fine.
March 22, 2010 at 8:48 am
once you've converted to datetime, the comparison should be easy;
here's how to convert your julian date; the other appears to already be datetime....if it's not, explicitly convert it to datetime.
update...
March 22, 2010 at 8:32 am
i think SELECT COUNT(DISTINCT fieldname) will do what you want:
CREATE TABLE user_registration_tbl
(id int identity,
user_first_name varchar(100) not null,
parentid int not null, ---coresponding ID of parent
Node int not null, ----'0' if member...
March 19, 2010 at 11:03 am
if it HAS to be done in T-SQL, I've written a stored proc which returns the DDL of any table (or treats a view as if it were a table)...
March 19, 2010 at 7:36 am
sounds more like you are trying to make your databases bend to the will of the backup program.
Veritas certainly has the ability to backup a database that is in SIMPLE...
March 17, 2010 at 12:18 pm
I didn't see your previous post, but are you looking for @@SPID?
select @@SPID will give you your current connection id, is that what you are looking for?
here's a collection of...
March 17, 2010 at 9:06 am
ian your expanation doesn't make sense. half a case would be 6 bottles in a 12 unit case, right? where did "the actual stock is 33 cases and 3 bottles...
March 16, 2010 at 11:15 am
[facepalm] oh snap!
so obvious when someone rubs your nose in it; thanks
March 16, 2010 at 8:30 am
ok this is providing a fun learning curve for me;
generating a calendar table's easy, but updating it to have holidays is tripping me up.
all the holidays that are ...
March 16, 2010 at 7:42 am
there's some articles and webcasts here on SSC as well:
i remember reading an article "clustering in 15 minutes" but can't seem to find it.
March 15, 2010 at 12:06 pm
maybe you are refering to clustering?
clustering takes two or more servers, each with their real IP, and sets up a service so that they share any requests being services on...
March 15, 2010 at 11:40 am
glad you fixed it; what was the problem, and what was your solution? it might benefit some others if you can post some ideas and details.
Thanks!
HAJJAJ (3/15/2010)
yes...
March 15, 2010 at 11:31 am
Viewing 15 posts - 9,826 through 9,840 (of 13,461 total)