Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    MS SQL Server


SuperbHosting.net have generously sponsored dedicated servers to ensure a reliable and scalable dedicated hosting solution for BigResource.com.





Help! - Query On Time Field In SQL Server - How?


Hi,

I have an orders database and I need to be able to write a query
that groups sales by:

1. Date
2. Time of day (both am and pm)

I currently have a date/time field named "Submitted" that stores
just the date.

However, how do I store the time?

I know I can store the date/time in the "Submitted" field I
created. However, because of the time being stored in that field, I
can't execute an easy query such as:

select * from database where submitted = '2/10/05'

(reason being, the time portion makes each "Submitted" field
record unique, so just the date won't be recognized)

I realize there probably is a much better way to do this in the
SQL query language that I am not aware of.

Two questions:

1. Based on what I'm trying to do -- query based on date and group
by number of sales for each hour of the day (am and pm) -- what is the
best approach to store the time?

2. What does the query look like that querys by date and groups
orders by time of day (am and pm)?

Thanks for your help.

J




View Complete Forum Thread with Replies

Related Forum Messages:
Query With Time Field In Sql Server Express 2005
 

Dear All,
 
I have a table in access
 
fldDate                  fldTime                        fldEnrolled
12/1/2006             1:39:30 PM                    Biswa
2/27/2008             10:08:40 PM                   Tom
 
 
Now I have converted it in sql server 2005 table calld tblTime.
 
I am using VB.Net 2005 for that My Sql command is for accesing the .mdb i.e. access database
 

pstrFIELDS = "* "

pstrFROM = "FROM tblTime "

pstrWHERE = "WHERE [fldDateCreated] = #" & DateCreated_In & "# " _

& " AND [fldTimeCreated] = #" & TimeCreated_In & "#"
 

Its running well.
 
But Whenever I am going to retrieve it from SQL Server database its not retriveni any data at all. 
 
For Sql My code is
 

pstrWHERE = " WHERE [fldDateCreated] = '" & DateCreated_In & "' " _

& " AND [fldTimeCreated] = '" & TimeCreated_In & "'"
 
 
SQL Table
=======
 
fldDate                                     fldTime                                       fldEnrolled
12/1/2006 12:00:00 AM            1:39:30 PM  12/30/1899                  Biswa
2/27/2008 12:00:00 AM            10:08:40 PM  12/30/1899                 Tom

 
----
 
Can any body tell me the solution to resolve the prob.
 
 
Regards,
Biswajit

View Replies !
Need Help Running Query On Data/time Field
I have a date/time field with a sql format of "datetime" The actualdate/time data format is MM/DD/YYYY^hh:mm:ss:pm or "1/25/200712:00:16 AM" Both the date and time are combined on the same fieldwith a space seperating the two.I need to run a query on this date/time field using the criteria oftoday's date so if I want to search all records with todays date, Ineed to query on this field. I don't need the time, but just today'sdate (MM/DD/YYYY) portion of the field.Thanks,Brian

View Replies !
Convert A Time Field In The Select Statement Of The Query
Hi,

 

I have a field called "Starting DateTime" and I want to convert into my local time. I can convert it in the report with the expression "=System.TimeZone.CurrentTimeZone.ToLocalTime(Fields!Starting_DateTime.Value)", but that is too late. I want to convert it in the Select statement of the query.

 

Can anyone help me please?

 

Thx

View Replies !
How To Add Date Field And Time Field (not Datetime Field )
Good morning...

I begin with SQL, I would like to add a field that will be date like 21/01/2000.

Actually i find just "datetime" format but give me the format 21/01/2000 01:01:20.

How to do for having date and time in two different field.

Sorry for my english....

Cordially 

A newbie

View Replies !
Sum Of Time Field In SQL Server 2000 - Very Urgent
Hello all. I have a nvarchar field in the format dd:hh:mm:ss I need to get a sum of these fields in the same format. So for example if the values are 01:23:00:00 and 00:01:00:00 then the sum of these fields should be 02:00:00:00. Can someone help me? Thanks.

View Replies !
Query Time In SQL Server
I am using SQL Server and ASP.NET. I am executing a couple of stored procedures and displaying the results in a datagrid. Since these Stored procedures takes around 2-4 minutes each, I want to display a status bar on the web by displaying the approximate time the user needs to wait before seeing the results.

My question is: Is there a way to find out the approximate EXECUTION TIME of the stored procedure before hand. Also, if that is possible, how do i access the same from the ASP.NET code..

Thanks
Sathya

View Replies !
Query 2 Server At The Same Time
can some one please tell me with an example,how to query data from two db server in the same tsql query.

Thanks in advace

View Replies !
Help Writing Query (find The Entry With The Closest Time Given A Time)
Hi,

I have a table which has a few fields, one being "datetime_traded". I need to write a query which returns the row which has the closest time (down to second) given a date/time. I'm using MS SQL.

Here's what I have so far:


Code:


select * from TICK_D
where datetime_traded = (select min( abs(datediff(second,datetime_traded , Convert(datetime,'2005-05-30:09:31:09')) ) ) from TICK_D)



But I get an error - "The conversion of a char data type to a datetime data type resulted in an out-of-range datetime value.".

Does anyone know how i could do this? Thanks a lot for any help!

View Replies !
Scheduling A Query To Be Executed At Given Time In SQL Server 2005
Hi friend!

I want to schedule a query or procedure running at given time regularly eg: at  12AM daily. Please tell me how to do that in sql server 2005.

 We use SQL server 2005 developer edition.

Thanks in advance.

View Replies !
TIME Field
Hi ALL,

We use MS SQL Server 6.5 for Backend database, when the TIME field displays on the frontend window, it alwasys defaults as 12:00:00 am, but we would like it to be 00:00:00 am instead, Would anyone tell me how I can get this work? Thank you in advance.

Michael

View Replies !
Query Takes Too Much Time At The Time Of Execuion
Hello All,

Below carry takes too much time while execution


Select
'PIT_ID' = CASE WHEN Best_BID_DATA.PIT_ID IS NOT NULL THEN Best_BID_DATA.PIT_ID ELSE Best_OFFER_DATA.PIT_ID END,
Best_Bid_Data.Bid_Customer,
Best_Bid_Data.Bid_Size,
Best_Bid_Data.Bid_Price,
Best_Bid_Data.Bid_Order_Id,
Best_Bid_Data.Bid_Order_Version,
Best_Bid_Data.Bid_ProductId,
Best_Bid_Data.Bid_TraderId,
Best_Bid_Data.Bid_BrokerId,
Best_Bid_Data.Bid_Reference,
Best_Bid_Data.Bid_Indicative,
Best_Bid_Data.Bid_Park,
Best_Offer_Data.Offer_Customer,
Best_Offer_Data.Offer_Size,
Best_Offer_Data.Offer_Price,
Best_Offer_Data.Offer_Order_Id,
Best_Offer_Data.Offer_Order_Version,
Best_Offer_Data.Offer_ProductId,
Best_Offer_Data.Offer_TraderId,
Best_Offer_Data.Offer_BrokerId,
Best_Offer_Data.Offer_Reference,
Best_Offer_Data.Offer_Indicative,
Best_Offer_Data.Offer_Park

from
(
Select PITID PIT_ID, CustomerId Bid_Customer, Size Bid_Size, Price Bid_Price, orderid Bid_Order_Id, Version Bid_Order_Version,
ProductId Bid_ProductId, TraderId Bid_TraderId, BrokerId Bid_BrokerId,
Reference Bid_Reference, Indicative Bid_Indicative, Park Bid_Park
From OrderTable C
Where
version = (select max(version) from OrderTable where orderid = c.orderid)
and BuySell = 'B'
and Status <> 'D'
and Park <> 1
and PitId in (select distinct pitid from MarketViewDef Where MktViewId = 4)
and Price =
( Select max(Price) From OrderTable cc
where version = (select max(version) from OrderTable where orderid = cc.orderid)
and PitId = c.PitId
and BuySell = 'B'
and Status <> 'D'
and Park <> 1
)
and Orderdate =
( Select min(Orderdate) From OrderTable dd
where version = (select max(version) from OrderTable where orderid = dd.orderid)
and PitId = c.PitId
and BuySell = 'B'
and Status <> 'D'
and Price = c.Price
and Park <> 1
)
and OrderId = (select top 1 OrderId from OrderTable ff
Where version = (select max(version) from OrderTable where orderid = ff.orderid)
and orderid = ff.orderid
and PitId = c.PitId
and BuySell = 'B'
and Status <> 'D'
and Price = c.Price
and Orderdate = c.Orderdate
and Park <> 1
)

) Best_Bid_Data

full outer join
(
Select PITID PIT_ID, CustomerId Offer_Customer, Size Offer_Size, Price Offer_Price, orderid Offer_Order_Id, Version Offer_Order_Version,
ProductId Offer_ProductId, TraderId Offer_TraderId, BrokerId Offer_BrokerId,
Reference Offer_Reference, Indicative Offer_Indicative, Park Offer_Park
From OrderTable C
Where
version = (select max(version) from OrderTable where orderid = c.orderid)
and BuySell = 'S'
and Status <> 'D'
and Park <> 1
and PitId in (select distinct pitid from MarketViewDef Where MktViewId = 4)
and Price =
( Select min(Price) From OrderTable cc
where version = (select max(version) from OrderTable where orderid = cc.orderid)
and PitId = c.PitId
and BuySell = 'S'
and Status <> 'D'
and Park <> 1
)
and Orderdate =
( Select min(Orderdate) From OrderTable dd
where version = (select max(version) from OrderTable where orderid = dd.orderid)
and PitId = c.PitId
and BuySell = 'S'
and Status <> 'D'
and Price = c.Price
and Park <> 1
)
and OrderId = (select top 1 OrderId from OrderTable ff
Where version = (select max(version) from OrderTable where orderid = ff.orderid)
and orderid = ff.orderid
and PitId = c.PitId
and BuySell = 'S'
and Status <> 'D'
and Price = c.Price
and Orderdate = c.Orderdate
and Park <> 1
)

) Best_Offer_Data
ON Best_Bid_Data.Pit_Id = Best_Offer_Data.Pit_Id

Can any one please help me?

Thanks
Prashant

View Replies !
Get The Time From A DateTime Field
 
I looked at this post and it didn't work for me.
 
Trying to extract the time portion from a datetime field. ex  7:15:12 AM from    1/1/2008 7:15:12 aM
This is what I tried and neither functions give me the results I want....
 SELECT     DueTime, CONVERT(varchar, DueDate, 108) AS Expr1, SUBSTRING(CAST(DueDate AS varchar), 10, LEN(DueDate)) AS Expr2, CAST(DueDate AS varchar)                       AS Expr3FROM         TODO
Due Time                              Expr1                Expr2                         Expr3
1/1/2008 5:15:00 PM           00:00:00            12:00:00 AM              Jan 1 2008 12:00:00 AM
It seems Cast(DueDate as varchar) is the problem it converts the time to the default 12:00:00 AM
In the above example I want 5:15:00 PM
 
Tx in advance 
 

View Replies !
How To Get Time Value From Datetime Field?
dear friends..................                   i have a table like below..  name                                    date                                      ------------------------------------------------------------------------------------------------------------ anbumani                   2/18/2008 4:15:56 PM  anbumani                 2/18/2008 4:21:29 PM   anbumani                     2/18/2008 4:23:03 PM   anbumani                  2/18/2008 4:25:25 PM   i want a out put as only time (ex : 4:15:56 PM                                                     4:21:29 PM                                                     4:23:03 PM )   give me the stored procedure code in sql server 2005.. thanks and regards Samuel Chandradoss . J   

View Replies !
Time Part Of Field
Hi,

I have a very beginer's question. I am trying to compare datetime field with time only. how can i just compare with time?

Select start_time,end_time from tblvouchers as sv,tblvoucherlines as svl
where sv.voucher_no = svl.voucher_no and
sv.equip_no = '01325' and svl.line_date ='03/14/2004'
and svl.start_time = '18:00' and svl.end_time = '00:00'

this query is not displaying any data.

Any help will be highly appreciated.

View Replies !
Date / Time Field
Dear Frends
Iam using SQL Server 2000
Is there any way to use Date time field to store value before the Date 01-Jan-1753?
Thanks

View Replies !
SELECT Field &> 1 Time
hello !

for MS SQL 2000

how can I get something like

SELECT name from users WHERE Count(name) > 1

i want to return only the rows where name appears more than 1 time

thank you

View Replies !
Bcp - Not Handling Time Field
Hi
I have a time field coming from a text file which needs to go into a sqlserver datetime field.

Can I concatenate 2 fields in the text file into 1 field in the database?

Pls advise

thanks
Liju

View Replies !
Importing A Time Field
I am attempting to import a text file into a Sql Server table. The file contains a time field. The column in the table that I am trying to import into is a Smalldatetime field. The data looks like this "10:30". I keep getting errors on the import of the time field. Any suggestions?

View Replies !
To Update A Field At Run-time
Hi,
I'm trying to use the Update command to change a field value. I only know the field name at run-time, how do you write this command. This is what I have done which just sets the variable @cFieldName to the value and not the field within the table.

UPDATE [Atable] SET @cFieldName = @aValue WHERE ([Id] = @Id_1)

Thanks

View Replies !
Range On Time Field...
I want to create one complex query with Date time field,   my query is  I want a grouping   between the time range
 

EX:

 

13/09/2007 1:00:00 PM     to   14/09/2007  4:00:00 AM     will be as Day1

14/09/2007 1:00:00 PM     to   15/09/2007  4:00:00 AM     Will be as Day2

''

''

''
This way the end date for the period will be 13/10/2007 4:00:00  as Day 30

pavan

View Replies !
How To Compare Time......... Using DateTime Field
 
hi guyz i want to compare time from DateTime field i.e. i want to identify if the time is from 1pm to 2pm the do this else do......
select DATEPART(hour, loginTime) ......returns me the hour i can get the Hour part of the time but the prblem is how to identify it
whether it is less than 2:00:00 pm and greater than 1:00:00 pm i can do this task using at application level but i want this to b done at query level
any  ideas??????????

View Replies !
Insert TIME Only In DateTime Field
I am doing a temporary retro-upgrade right now. So, I know this isn't exactly in the scope of ASP.Net. Ordinally my posts are. However, I need a VBScript example of how to insert the Date only into the DateTime field of an SQL 2000 Server. By default, if you try to, the server automatically adds the date "1/1/1900". Can anyone help me please?

View Replies !
Extracting Time From The SQL DateTime Field.
Any help on extracting the time part from the datetime field in SQLdatabase.even though i had entered only the time part in the database when iextract the field it gives me only the date part. i’m using Vb.netdatagrid as a front end.any assistance appreciated!! :?:--Posted using the http://www.dbforumz.com interface, at author's requestArticles individually checked for conformance to usenet standardsTopic URL: http://www.dbforumz.com/General-Dis...pict254266.htmlVisit Topic URL to contact author (reg. req'd). Report abuse: http://www.dbforumz.com/eform.php?p=877989

View Replies !
Searching A Datetime Field By Time
I have the time of an event stored on each record as a datetime field.Itincludes the year,month,day, etc. Suppose my user wants to search the tablefor all events over the lunch hour, say between11am and 1pm. How do Iconstruct the SELECT query to peek into each datetime field and return onlythose records that satify the specified time range?Many thanks.

View Replies !
Strip Time Out Of A Date Field - Sql
Hi all,

I have a table that I've imported into SQL - there is a field in there for date that must have used now(); as its default value (access).

So the values are something like:

01/11/2004 12:16:42

I need a way to change the data so that the time element removed is the field just holds the date. Failing that a way to insert this from the existing field into a new field stripping the date off en route would be a great help.

Many thanks

Phil

View Replies !
Updating Time Of Smalldatetime Field
How does one update the time part of a smalldatetime field...?
2006-11-16 20:12:00 ---> 2006-11-16 16:30:00
2005-06-01 18:19:00 ---> 2005-06-01 16:30:00

I have tried using the datepart but I'm doing something incorrectly.

thanks,

Jonathan

View Replies !
Date/time Field Problems
I've developed a system that uses SQL Server as the DB backend. I'm having problems saving date/time fields from SOME- not all, workstations. The workstations I'm having problems with are all NT WORKSTATION 4.0, and the
native OS language is portuguese. The server is NT SERVER 4.0, and the native OS language is english. All machines have the same international settings,
portuguese(Brazilian). SQL Server is english version 6.5.

I've been using the SQL Trace utility to track what's been going on, and I
know that on the NT WORKSTATION machines, the dates get sent to the SQL Server in portuguese format, whereas on the other machines, it gets properly sent, in english format. I've read the booksonline, but just don't seem to figure out what and where to configure. Can anyone shed some light into this problem, ie, HOW EXACLTY TO CONFIGURE client workstations in order to get date/time problems solved?

View Replies !
Insert Time Into DateTime Field
I would like to be able to insert a time value only into a SQL 7 table colum which has been set as a datetime datatype. When I insert '12:34:44 PM' into the colum it actually inserts '1900-1-1 12:34:44 PM'. An Access table will allow you to insert the time value without adding the '1/1/1900' date value. Can this be done in SQL7?

Thanks for any help.

View Replies !
Time Part Of Smalldatetime Field
I'm trying to extract the time part of a smalldatetime field in a usprocedure to return just the time. I've used Datepart() to get the hours or minutes but you can't get both without getting messy. Anyone know a way to keep it neat & simple?

Thanks, archie

View Replies !
Grouping Date Field By Day Only, Not Time
I'm adding up quantities of an item that are entered in one after another, so the date is the same, but the time differs.

I used the "first" function in access which works the way I want, but sql7 doesn't use the same function. The "convert" function does not work in access but Here is the gist of the query:

SELECT first(CONVERT(varchar,transactions.tran_date,101)) AS [trandate], transactions.tran_type,
SUM(transactions.qty) AS totqty,...etc.

thanx,

Herb

View Replies !
Remove Time From Datetime Field
I have two columns COLUMNA & COLUMNB

They both store date & time. In COLUMNA, I would like do delete the time, in COLUMNB, I would like to delete the date.

They are stored like this YYYY-MM-DD HH:MM:SS

View Replies !
Create Sql Table With Time Field
I'm want to store a time from a datetimepicker control(format = time) into a sql table.  I'm using c# and windows forms with vs2008. Some example code would be nice. Thanks.

// dateTimePicker2

//

this.dateTimePicker2.Format = System.Windows.Forms.DateTimePickerFormat.Time;

this.dateTimePicker2.Location = new System.Drawing.Point(225, 21);

this.dateTimePicker2.Name = "dateTimePicker2";

this.dateTimePicker2.ShowUpDown = true;

this.dateTimePicker2.Size = new System.Drawing.Size(96, 20);

this.dateTimePicker2.TabIndex = 1;
 
Question?
 
1. What type should the time field be in the sql table?  I want to be able to calculate with it at some time.
 
 

View Replies !
Saving A Time In A Datetime Field
Hi,
 
I'm trying to save times in datetime fields, but seem to have lots of issues with formats.
 
I'm using a multiline text box, where the user will pick from 09:00 09:30 10:00 etc, so the value that comes out in the .text property is "09:30"
 
Once I have that, whats the best way to convert this into the right format for a dt field? I understand it'll have todays date in it which is fine. It seems to work ok if I overwrite a textbox that's bound to a datetime field, but not if I'm sending it via an insert statement.
 
Also I'm using 24 hour format times, eg 14:00, do I need to do anything to ensure they're store in this format?

View Replies !
Inserting Time In Smallint Field
I need to insert rows into a table which contains a smallint field
for time. The times are stored in that colum as integers (898,
11345, 1259, etc.) How can I enter a time like 9:15 AM into this field? I know how to display integer data in hh:mm format but I'm stumped on how I can do the reverse.

Thanks for any help offered.

View Replies !
How To Find Database Table And Their Field Name Run Time.
 I am using sql server as back end. Through connection string
I am getting database name. But in A dropdown I want to show list of table in
that database. And in another B drop down I want to show fields of table
selected in A dropdown. can any one help in getting the field .

 

View Replies !
Want To Hide The Time From The Date Field In GridView In ASP.Net With SQL
I m using ASP.NET 2005 with VB,C#.
I m using GridView to display the data.

My problem is with the database field date.
I want to use only the date and the fields are manufacturing date and expiry date of some items.
But,in the gridview it displays the time which is by default same for all the entries which 12:00A.M.

I have used date picker for designing.

What should be the validation for showing only the date and not the time ??
How to hide the time from the gridview.
I m using SQL Server 2005 to store database where i have selected the datatype as date/time.

View Replies !
Filtering On Parts Of A Date/time Field
Hi,I have a date/time field in a SQL2000 database, and what I would liketo do is to filter on a specific part of the field, for example thetime or hour.Supposing I have a set of data for the last 5 years and would like tofilter out any records which are outside working hours i.e. I wouldlike to show records where the time is between 9am and 5pm.Does anyone know if there is a simple way to do this in SQL? If yousimply don't specify the date part in the where clause (e.g. WHEREissuedatetime between '09:00:00' and '17:00:00') it defaults it to1900-01-01 so basically no data is returned.The only way I can see to do this is by using the DATEPART function,converting it to a varchar, appending 1900-01-01 on to it andconverting it to a datetime, and then using the where clause as statedabove. This is quite a long-winded way, however. Any other suggestions?Thanks,Matt

View Replies !
Drop The Time Portion Of A Smalldatetime Field
In VBA I'd use Format(myDateField,"Short Date") to display 1/31/2004instead of 1/31/2004 10:30:25 AMHow can I do this in a stored procedure?lq

View Replies !
Create A Table With A Field With Only Time Datatype
Hello experts,
I want to create a table to store only time in a fileld. There is "DateTime" for my purpose but i dont want to save the Date part only the time part as "12:30:44 AM". I know i can select only time part from Datetime field but i want to save only time.Can anybody help me how can i create that kinda table ?

View Replies !
Ignore Time Portion Of Datetime Field
I have a PHP page where the user enters a date that represents the last day of a timesheet (ts_end) and the hours worked on that timesheet. That is then written into a table where the date is a datetime type. Because the user just enters a date, the time portion of the field is set to 00:00:00. In another place, I need to sum the columns for reports submitted between the beginning of a timesheet (ts_end -6 days) and the ts_end date.

The problem is that chartreviewed values entered on the ts_end date are getting lost because the time part of the ts_end field is 00:00:00 and the time part of the dateentered for the chartreviewed value is not. For instance using 2/4/2004 as the ts_end date looses the 192 charts.

Reporter activity chartsdateentered
2001576 20672 563 2004-01-29 13:55:51.000
2001576 20665 202 2004-02-02 19:54:57.000
2001576 20666 160 2004-02-03 22:48:11.000
2001576 20667 192 2004-02-04 19:41:51.000

I know I can revise the query to look for charts where the dateentered is less than dateadd(d,1,ts_end) and get the right values. It seems like there has to be a way though to tell sqlserver to ignore the time part of a datetime field when querying.

Anybody know what it is?

Thanks,
Ursus

View Replies !
Setting A Date/time Field To Null
Hello!

I am using a Ms-Access DS which is accessed by a website's server-side scripts.

What I would like to do is set an existing record's date/time field to null. I have tried to simply alter its value by not including any data within the sharps (##), however that did not work.

How can I accomplish this?

Thank you!

Dave

View Replies !
How To Test The Time Part Of A DateTime Field
 

Dear all,
 
I have an application where I need to implement a Team Shift management.
 
The team shift table need to be defined as follow :
 
Shift table
=========
 
Id             DateTime       IsCurrent
1              08:00:00              True
2              16:00:00              False
3              00:00:00              False

 
From the table above the current running shift is Id = 1
 
Based on that I have following question:
 
1 - Is there a way to specified for a DateTime field that it will recieved only Time part ?
 
2 -  When a shift change occurs, I need to compare the Current time with the time shift in the table. Then according to that I set the IsCurrent flag to proper new Shift ID.. how to perform this ?
 
Thnaks for your help
regards
serge

View Replies !
How Do I Convert As/400 Time Field Being Seen As Dt_I8 To String
 

I am struggling getting a time field from as/400 into SQL 200 using SSIS.  The time field for some reason is being seen as dt_I8,  And every type of conversion I try to do with it, it gives me an error about truncation. Example of my time field 12.35.00
 
How do you convert time field from as/400 which sql is seeing as DT_I8 to a string so that I can combine it with a date field to put it into a database timestamp field. 
 Stacy

View Replies !
Format Date/time Field In Ssrs
 

hi all
 
I have two date/time fields as below:
 

=(Fields!ClosedDate.Value)-(Fields!CreatedDate.Value)
 
result can sometimes look like this  14:01:42.3840000
 
how do I format this
 
I have tried
 

=FormatDateTime((Fields!ClosedDate.Value)-(Fields!CreatedDate.Value), 2)

but this gives an error
 
I want the result to look like this
 
14:01:42.38
 
thanks
Dianne

View Replies !
Select Statement With Run Time Field Selection
 

I have this SELECT statement.
 

SELECT [issueID], [name] FROM [MyIssue]
 

What I wanted to do is in addition to the above statement, I want to add two run time fields like this:
 

99 [issueID],'All Issues' [name]
 
So let's say the above select statements generates this list:
 
Summer 2007 Issue
Winter 2007 Issue
 
The two addition fields will make the result list like this:
 
01   Summer 2007 Issue
02   Winter 2007 Issue
99   All Issues

 
How do I accomplish this? Any help is much appreciated.

View Replies !
Update Time Portion Of The Datetime Field In Sql
I have a datetime field named 'EntryDate' in one of the sql tables.
 
I want to update the time portion of this field and provide a default time of 8:00 AM IF the time portion is empty.
 
How can i do this?
 

View Replies !

Copyright © 2005-08 www.BigResource.com, All rights reserved