Viewing 15 posts - 466 through 480 (of 851 total)
[font="Verdana"]Well, I haven't been able to make it work. If you can, let me know! :D[/font]
March 12, 2009 at 1:17 pm
[font="Verdana"]Reiterate: expecially where holidays are concerned, use a Calendar table.
Although having said that, holidays can differ depending on location. They get a little tricky.
[/font]
March 12, 2009 at 1:16 pm
[font="Verdana"]No, I think that's eliminated it as being a date format issue. Have you had a look at the query plans both for the query and for running the...
March 12, 2009 at 1:15 pm
[font="Verdana"]Rather than convert to varchar and back again, can you try the following?
dateadd(dd, 0, datediff(dd, 0 [DateTime]))
I'm not sure whether that will resolve the problem, but it's a better way...
March 11, 2009 at 10:28 pm
[font="Verdana"]I've been playing around with this for days, and I'm about to give up. I think what I will do is get the packed decimal fields written out as...
March 11, 2009 at 9:19 pm
[font="Verdana"]So far as I can tell, bulk insert (and bcp) expect all of the records in the file to match the format, irrespective of whether they are actually loaded. ...
March 11, 2009 at 6:15 pm
[font="Verdana"]Yeah, I forgot... SQL Server just needs white space to separate statements, not actually a semi-colon or carriage return. I'm trying to use semi-colons consistently these days (mostly...
March 11, 2009 at 6:14 pm
[font="Verdana"]I considered doing something like that, but he said he didn't want to use temporary tables, so I excluded table variables as well.
BTW, don't you need a semi-colon or carriage...
March 11, 2009 at 5:36 pm
[font="Verdana"]I would use something similar to the following (remembering that it is possible to have more than one log file per database.)
Note code is untested!
declare @databaseName sysname;
declare @sql...
March 11, 2009 at 5:09 pm
[font="Verdana"]Doh! I need to read questions better. No, that won't work because you are doing a subsequent exec(). You could get it to work by using sp_executesql...
March 11, 2009 at 3:05 pm
[font="Verdana"]Actually, why do you need the quotes around the @object at all?
set @sql = ''select substring(@object,3,1)''
... should work.
[/font]
March 11, 2009 at 2:51 pm
[font="Verdana"]I think the "if exists" needs to go in the procedure that calls BCP. So you would change your logic as follows.
Your current procedure will be something like this:
...
exec...
March 11, 2009 at 2:33 pm
[font="Verdana"]Can I put my hand in the air and recommend a Calendar table? It's a specialised version of a Tally/Numbers table, and you can do all the necessary date...
March 11, 2009 at 1:34 pm
florian.reischl (3/10/2009)
Strange...! I tried on SQL Server 2005 in our company and on my SQL Server 2008. The single inserts are always faster than the union syntax..?
[font="Verdana"]Probably dependant on the...
March 10, 2009 at 6:21 pm
[font="Verdana"]You could use substring and UNPIVOT to take the data from the form
User1-AB
to:
User1 A
User1 B
That would then simplify the join. I'd do the UNPIVOT as a CTE.
[/font]
March 10, 2009 at 5:26 pm
Viewing 15 posts - 466 through 480 (of 851 total)