Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
sky1224
Starting Member
12 Posts |
Posted - 2009-12-15 : 22:23:21
|
Good morning. I use MS SQL Server 2005. I'm <converting> MS Access database(mdb) file to SQL Server.I can't convert Access query because of the Val() function. In some pages I got infomations about the difference between Access and SQL server.And about <upsizing to SQL Server...>, so I want to use <scalar-valued functions> in MS SQL Server Management Studio.But can't register the functions... No functions I editted was registerd in <Object Explorer> window of MSSSMS.(Functions was saved *.sql in my hard drive, but no display in my <object explorer> window. so i can't use it View queries...)Please tell me how to make the <scalar-valued functions> and to use it with MS SQL Server Management Studio.Thank you... |
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2009-12-15 : 22:26:11
|
post one of the queries that u need help converting |
|
|
sky1224
Starting Member
12 Posts |
Posted - 2009-12-15 : 22:30:26
|
SELECT Val([C_sSeiCd]) AS ??????FROM dbo_T_DJis WHERE dbo_T_DJis.C_SyoriNendo='2009'ORDER BY dbo_T_DJis.C_iDaiNo; |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-12-16 : 02:04:57
|
SELECT cast([C_sSeiCd] as int) AS [C_sSeiCd]FROM dbo_T_DJis WHERE dbo_T_DJis.C_SyoriNendo='2009'ORDER BY dbo_T_DJis.C_iDaiNo;MadhivananFailing to plan is Planning to fail |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-12-16 : 02:05:50
|
Note that if the values are decimals, better approach isSELECT cast([C_sSeiCd] as decimal(18,2)) AS [C_sSeiCd]FROM dbo_T_DJis WHERE dbo_T_DJis.C_SyoriNendo='2009'ORDER BY dbo_T_DJis.C_iDaiNo;MadhivananFailing to plan is Planning to fail |
|
|
sky1224
Starting Member
12 Posts |
Posted - 2009-12-16 : 21:13:34
|
Thank you for your help... But I feel something wrong about the availability of MS SQL Server Management Studio.Anything was inconvinient...Anyway I made the scalar-valued function successfully. |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2009-12-16 : 22:32:02
|
Once you get comfortable using it, you will find that it is FAR MORE convienient than MSACCESS.The best tools are always the ones you know. But once you learn how to use the more powerful ones, you'll never go back. |
|
|
|
|
|