Click here to Skip to main content
15,907,492 members
Home / Discussions / Database
   

Database

 
GeneralRe: Help in Stored Procedure sqlserver Pin
aaraaayen23-Jan-08 0:02
aaraaayen23-Jan-08 0:02 
GeneralAttaching an .MDF file without an LDF file Pin
ffowler22-Jan-08 11:25
ffowler22-Jan-08 11:25 
GeneralRe: Attaching an .MDF file without an LDF file Pin
Mike Dimmick23-Jan-08 12:40
Mike Dimmick23-Jan-08 12:40 
QuestionSybase Linked Server Pin
mobius11100122-Jan-08 3:22
mobius11100122-Jan-08 3:22 
QuestionHow to use one sp's result in my new Sp Pin
pashitech21-Jan-08 18:26
pashitech21-Jan-08 18:26 
AnswerRe: How to use one sp's result in my new Sp Pin
Joe21-Jan-08 18:49
Joe21-Jan-08 18:49 
AnswerRe: How to use one sp's result in my new Sp Pin
andyharman22-Jan-08 0:13
professionalandyharman22-Jan-08 0:13 
GeneralCreating a User Defined Type For Time Pin
AAGTHosting21-Jan-08 13:46
AAGTHosting21-Jan-08 13:46 
I need to create a User Defined Type for time. I tried rewriting my database tables as shown below and I get the error that is shown below.

Do I need to do something else to create them? Do I need to use hh:mm for the formatting of the datapart I need to use?

All I need in ts_from and ts_to is the hour and the minutes.

I am using SQL Server Express 2005.

create table tbl_teach_sched (<br />
ts_id int NOT NULL IDENTITY(1000,1),<br />
teach_id int,<br />
ts_day text,<br />
ts_datetime datetime,<br />
ts_from as (datepart(hh:mm, ts_datetime)) persisted,<br />
ts_to as (datepart(hh:mm, ts_datetime)) persisted,<br />
primary key(ts_id),<br />
foreign key(teach_id) references tbl_teachers(teach_id));



This is the error.


Msg 102, Level 15, State 1, Line 7
Incorrect syntax near 'hh:'.
Msg 132, Level 15, State 1, Line 8
The label 'hh' has already been declared. Label names must be unique within a query batch or stored procedure.
GeneralRe: Creating a User Defined Type For Time Pin
PIEBALDconsult21-Jan-08 14:54
mvePIEBALDconsult21-Jan-08 14:54 
GeneralRe: Creating a User Defined Type For Time Pin
AAGTHosting21-Jan-08 20:35
AAGTHosting21-Jan-08 20:35 
GeneralAccess/Jet SQL (Uggh!!) Code Commenting Pin
martin_hughes21-Jan-08 10:52
martin_hughes21-Jan-08 10:52 
GeneralMysql strong typed dataset relations error. Pin
Y_R21-Jan-08 4:28
Y_R21-Jan-08 4:28 
Generalselect count values in sql Pin
eyeseetee21-Jan-08 4:01
eyeseetee21-Jan-08 4:01 
GeneralRe: select count values in sql Pin
Pete O'Hanlon21-Jan-08 4:52
mvePete O'Hanlon21-Jan-08 4:52 
Questionhow to use the keyword LIKE in the SQL query in C# statement Pin
mavii21-Jan-08 2:29
mavii21-Jan-08 2:29 
AnswerRe: how to use the keyword LIKE in the SQL query in C# statement Pin
Pete O'Hanlon21-Jan-08 4:56
mvePete O'Hanlon21-Jan-08 4:56 
AnswerRe: how to use the keyword LIKE in the SQL query in C# statement [modified] Pin
Michael Potter22-Jan-08 5:20
Michael Potter22-Jan-08 5:20 
GeneralUnable to see SQL Server Agent in Object Explorer of sqlserver 2005 Pin
Satish - Developer21-Jan-08 2:24
Satish - Developer21-Jan-08 2:24 
QuestionHow can we access a Table from a Database to the another DataBase Pin
John.L.Ponratnam21-Jan-08 1:15
John.L.Ponratnam21-Jan-08 1:15 
AnswerRe: How can we access a Table from a Database to the another DataBase Pin
pmarfleet21-Jan-08 2:02
pmarfleet21-Jan-08 2:02 
AnswerRe: How can we access a Table from a Database to the another DataBase Pin
PIEBALDconsult21-Jan-08 3:36
mvePIEBALDconsult21-Jan-08 3:36 
Generalnewbie in Crystal report Pin
wasimsharp21-Jan-08 1:13
wasimsharp21-Jan-08 1:13 
GeneralCross post - please ignore Pin
Pete O'Hanlon21-Jan-08 1:39
mvePete O'Hanlon21-Jan-08 1:39 
GeneralEncryption / Decryption Pin
Syed Mujtaba Hassan21-Jan-08 1:11
Syed Mujtaba Hassan21-Jan-08 1:11 
GeneralRe: Encryption / Decryption Pin
StianSandberg21-Jan-08 10:19
StianSandberg21-Jan-08 10:19 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.