Viewing 15 posts - 241 through 255 (of 1,124 total)
saurabh.dwivedy (5/8/2009)
Ramesh (5/4/2009)
In your case, one go...
May 9, 2009 at 3:18 am
Too much caffeinated today:hehe:
DECLARE @FromDate DATETIME, @ToDate DATETIME
DECLARE @FromDateConverted INT, @ToDateConverted INT
SELECT @FromDate = '2009-04-09',
@ToDate = '2009-04-10',
...
May 8, 2009 at 10:08 am
Never mind the newbies...:-D
DECLARE @FromDate DATETIME, @ToDate DATETIME
DECLARE @FromDateConverted INT, @ToDateConverted INT
SELECT @FromDate = '2009-04-09',
@ToDate = '2009-04-10',
...
May 8, 2009 at 8:47 am
Madhivanan (5/8/2009)
Ramesh (5/8/2009)
declare @DateTime DATETIME
declare @tablename varchar(100)
declare @sql nvarchar(4000)
create table #temp (starttime datetime)
-- Using sp_executesql
set @sql = 'select @DateTime = min(starttime) from...
May 8, 2009 at 8:45 am
It can also be done using sp_executesql system procedure
declare @DateTime DATETIME
declare @tablename varchar(100)
declare @sql nvarchar(4000)
create table #temp (starttime datetime)
-- Using sp_executesql
set @sql = 'select @DateTime = min(starttime) from ' +...
May 8, 2009 at 8:15 am
Good...
Thanks Flo for the script:-)
So here is the solution same as Flo's solution except that considers UNIX-EPOCH date formats.
DECLARE @t TABLE( sl_no INT, Initial_date INT, Log_Time INT, Description VARCHAR(100) )...
May 8, 2009 at 7:51 am
Something like this should work:
declare @DateTime datetime
declare @tablename varchar(100)
declare @sql varchar(8000)
declare @temp table(starttime datetime)
set @tablename = 'perf270409'
set @sql = 'select min(starttime) from ' + @tablename
insert @temp(starttime)
exec(@sql)
select @DateTime = starttime...
May 8, 2009 at 7:07 am
ansharma (5/8/2009)
This should be the output (Please note that teh data is stored in UNIX format i.e int data type :
sl_noinitial_datelog_timedescription
2454/9/2009 13:00 ...
May 8, 2009 at 7:02 am
You still didn't answered my question?
Edit:
I have the solution but it depends on what you answer to my question.
May 8, 2009 at 6:22 am
Its not the experience or the performance factor that decides the usage of data types but the business factors decides. If the business rule requires support for UNICODE (i.e....
May 8, 2009 at 6:11 am
Jeff Moden (5/4/2009)
Ramesh (5/4/2009)
I would go with SSIS and the following link should get to startedhttp://www.sqlis.com/post/Looping-over-files-with-the-Foreach-Loop.aspx
Not a bad recommendation... I just do it all from T-SQL. I hope to...
May 8, 2009 at 5:59 am
You just have to use the wild card characters, for e.g. to get all text files that begins with "ord" set the path value to "C:\ord*.txt"
May 8, 2009 at 5:32 am
What would be the expected output for the following data?
401 4/10/2009 23:00 4/10/2009 23:07 This should return null value
401 4/10/2009 23:00 4/10/2009 23:09 This is a description
May 8, 2009 at 5:00 am
In case if you're inserting multiple rows then you may want to have a look at the OUTPUT Clause in Books Online
DECLARE @T1Id INT
CREATE TABLE T1
(
Id INT...
May 8, 2009 at 4:29 am
Viewing 15 posts - 241 through 255 (of 1,124 total)