Viewing 15 posts - 7,831 through 7,845 (of 26,490 total)
Ganga-236835 (4/25/2013)
ChrisM@Work (4/25/2013)
April 25, 2013 at 10:48 am
karen.richardson (4/25/2013)
I'm working on a query to pull table name, schema, column name, data type, and field length; just can't get the data type right. Here is what...
April 25, 2013 at 10:45 am
Since you haven't showed us what you want, it is hard to provide you with an answer. To help I have created the SQL needed to allow others to...
April 25, 2013 at 9:03 am
rcherod (4/24/2013)
Thank u very much!!Now I have 2 great answers!!
SELECT CONVERT(datetime,CONVERT(int,'41389')-2) As Converted
select dateadd(day,'41389' - 2, 0) as FechaOriginal
Thank u Champion and Thank u Insane
Don't rely on the implicit...
April 24, 2013 at 1:49 pm
Just want to verify that you are using SQL Server 2008 or SQL Server 2008 R2 (or maybe actually SQL Server 2012).
This info can change things some as well.
April 24, 2013 at 1:42 pm
Lowell (4/24/2013)
Lynn, do you know why my calculation is off by two days? is it because SQL's zero date on 01/01/1900, but Excel thinks zero date is 12/30/1899 ?
Not really,...
April 24, 2013 at 1:19 pm
Glad to hear it. I think it makes the dynamic code easier to read. You don't have to count all those little single quotes as much.
April 24, 2013 at 1:16 pm
david.ostrander (4/24/2013)
Lynn -Thank you for the tip.
I used
dateadd(dd, datediff(dd, 0, d.DocDate), 0)but how do I get rid of the"00:00:00:00"?
Thanks,
David
If you want the datatype to be datetime,...
April 24, 2013 at 1:11 pm
rcherod (4/24/2013)
quisiera realizar una consulta acerca de como convertir un formato extraño de fecha, tengo un archivo txt que viene con el campo fecha de la siguiente manera :
Nombrefecha_asist
Pedro41388
Ana41389
Juan41390
al...
April 24, 2013 at 1:05 pm
Have you read this, http://msdn.microsoft.com/en-us/library/ff878183.aspx, and the links contained in that article? I installed SQL Server 2012 DE at home but don't remember how I handled this part of...
April 24, 2013 at 12:41 pm
dan-572483 (4/24/2013)
But you wouldn't miss an exam question because you picked the answer that left out the AS would you?
That I can't answer as I have yet to take any...
April 24, 2013 at 12:15 pm
dan-572483 (4/24/2013)
April 24, 2013 at 12:05 pm
Going from Enterprise Edition to Standard Edition will require an uninstall of SQL Server 2005 EE and then an install of SQL Server 2008 R2 SE if you want it...
April 24, 2013 at 11:55 am
A different take on what you are doing, wouldn't hurt to give it a try:
/* Provide test data for building script */
declare @DB_NAME nvarchar(128),
...
April 24, 2013 at 11:42 am
Or this:
with MaxDate as (
select
max(dateadd(month, MonthValue - 1, dateadd(year, YearValue - 1900, 0))) as MaxDate
from
dbo.DealerForecastSegmentValue
)
select
md.MaxDate,
...
April 24, 2013 at 11:22 am
Viewing 15 posts - 7,831 through 7,845 (of 26,490 total)