Viewing 15 posts - 346 through 360 (of 388 total)
Hi, a few questions 😉
How do you store your data in SQL database: do you use char or varchar data type in biggest fields? Do you use appropriate types for...
January 2, 2008 at 9:34 am
this is a pretty good way. maybe you should consider backup/restore route? this way you don't have to take db offline, though this probably does not matter too much.
December 19, 2007 at 12:40 pm
you take result of inner replace and put it as first parameter to outer, and so on.
select replace(replace(REPLACE(CONVERT(varchar(30), GETDATE(), 120),'-',''), ' ', ''), ':', '')
December 19, 2007 at 10:46 am
Why do you need to insert into both tables in one query? All you end up with is a set of queries hidden in a trigger on this view. Isn't...
December 18, 2007 at 1:29 pm
Before you run the query, click 'Include actual execution plan' and see how it looks like when the query is finished. look for table scans for example, try to eliminate...
December 12, 2007 at 2:46 pm
Check for the MOVE option in the restore database statement. Also, to get list of files, read about restore filelistonly.
Piotr
December 12, 2007 at 10:56 am
just an idea, what would happen if you add an empty string before your number?
as in
Select '' + [Serial Number] as [Serial Number],
GM,
[From Date],
[To Date] from txtsrv2...test#csv
December 7, 2007 at 8:50 am
no prob.
does it mean that collate database_default does not work either?
December 7, 2007 at 3:56 am
This is what I learned:
you can create temp tables and specify collation of character fields to current database collation.
collate database_default works nicely, for example
create table #temptable
(
field1 int,
field2 varchar(15)...
December 6, 2007 at 4:04 pm
maybe you could set up a linked server instead of using openrowset? openrowset has to be enabled on server which is not what every DBA likes
and as far as the...
December 6, 2007 at 3:55 pm
textman (12/6/2007)
SELECT table1.column1, table2.column1, table3.firstname, table3.lastname, table3.addressFROM table1, table2, table3
WHERE table1.column1 = table2.column1
The WHERE clause does.nt work.
what do you mean by it doesn't work?
from what I see it should return...
December 6, 2007 at 9:07 am
You should not use * in queries, the order of columns in view and table may be physically different.
you must use
insert dest (col_a, col_b, unique_col) select cola, colb, null from...
December 6, 2007 at 8:43 am
That's what I meant Gail. Application should not rely on physical order of rows in a table. Sorry for the confusion 🙂
December 4, 2007 at 6:29 am
Viewing 15 posts - 346 through 360 (of 388 total)