Viewing 15 posts - 10,021 through 10,035 (of 15,381 total)
sabnavees (11/19/2012)
At the destiation the datatype is nvarchar. But we can insert the date ffrom excel i this datat type isn't it...
Ding ding. There is the problem. Your destination...
November 20, 2012 at 7:22 am
There is no explanation of the business rules so this a shot in the dark. It does produce the same results as you stated based on the sample data provided.
select...
November 19, 2012 at 4:06 pm
SQL server rokee (11/19/2012)
I tried the following code
select CONVERT (varchar, CONVERT(datetime,STR(MY_COLUMN)),101)
FROM mytable;
It is giving me the following error
Msg 242, Level 16, State 3, Line 1
The conversion of a varchar...
November 19, 2012 at 3:58 pm
sabnavees (11/19/2012)
One of the column in excel is in Date format. But this column is not populating in to...
November 19, 2012 at 3:49 pm
haiao2000 (11/19/2012)
For the OP solution this seems one of those times it would actually be ok to use select *. The very challenge is due to changes in the source...
November 19, 2012 at 3:39 pm
swarup.malli (11/19/2012)
I was trying to create a view for all the tables.
Could you demostrate how to implement this commoand inside a DDL statement for creating...
November 19, 2012 at 3:35 pm
IgorMi (11/19/2012)
Sean Lange (11/19/2012)
IgorMi (11/19/2012)
Select * INTO TargetTable from ... is not a good practice.
Use queries like last one:
insert into TargetTable(A,B,C)
select A,B,C FROM #TempTable;
Where did you hear this? There is...
November 19, 2012 at 3:26 pm
swarup.malli (11/19/2012)
You are right mycolumn is defined as decimal in its DDL statement.
SELECT convert(varchar, mycolumn,101)
FROM Mytable;
that's why the above code is not giving the right...
November 19, 2012 at 3:18 pm
IgorMi (11/19/2012)
Select * INTO TargetTable from ... is not a good practice.
Use queries like last one:
insert into TargetTable(A,B,C)
select A,B,C FROM #TempTable;
Where did you hear this? There is nothing wrong with...
November 19, 2012 at 3:02 pm
swarup.malli (11/19/2012)
Hello,I have a date filed in the YYYYMMDD format ,want to convert it into MM/DD/YYYY.
I have tried using
SELECT convert(varchar, MY_date_field,101) from mytable;
it still gives result in YYYYMMDD format
Thanks
SM
Is...
November 19, 2012 at 2:58 pm
It seems that CELKO missed his meds again.
The way to educate people is not to berate them. You could bring so much knowledge and understanding to the community if...
November 19, 2012 at 12:24 pm
sharon.chapman7 (11/19/2012)
Can you tell me how to write this code if I only want certain fields from each table? I get errors when I try to select a few fields...
November 19, 2012 at 10:56 am
The best isolation level is the one that best fits the needs of your requirements.
November 19, 2012 at 10:30 am
Alex-815008 (11/19/2012)
That was a smart solution Sean.I've implemented this approach in the script now. Thanks for much 🙂
You are quite welcome. Glad that worked for you and thanks for...
November 19, 2012 at 8:33 am
jbm6401 (11/19/2012)
So if this is the case, is there any way around the dynamic SQL? Thanks.
The way around it is to get rid of the cursor. We can't help...
November 19, 2012 at 8:31 am
Viewing 15 posts - 10,021 through 10,035 (of 15,381 total)