|
I am starting on a new project and see how powerful LINQ is. One thing I need to know before we begin is if there will be any problems using LINQ to run queries against a Sun (Oracle) Database server. Any input is welcome.
Thanks!
|
|
|
|
|
LINQ does not currently work directly with Oracle. However, you can use LINQ to Datasets if that is of any help.
|
|
|
|
|
I would like to specify a default value for a column that increments along with the row number/identity column.
i.e. Insert tbl_User (some_data) VALUES (test)
resulting in
User_id first_name last_name some_data
1 Test User 1 test
I was sure there was something like @@row_number, but searching on msdn/google has turned up nothing useful so far...
Any suggestions?
Thanks,
Al
|
|
|
|
|
Set your default value to something like
'Test' + CAST(DATEPART(second, GETDATE()) AS VARCHAR)
or for more randomness
'Test' + CAST(DATEPART(second, GETDATE()) AS VARCHAR) + CAST(DATEPART(ms, GETDATE()) AS VARCHAR)<br />
You'll get fairly random data, not entirely unique though.
SG
Cause is effect concealed. Effect is cause revealed.
|
|
|
|
|
Thanks - perfect for what I need!
|
|
|
|
|
use sonia
create table stud(roll int identity(10,2),name varchar)
insert into stud values('A')
insert into stud values('B')
select * from stud
**IDENTITY(10,2) --> 10 is the initial value
2 is the number by which the value is to be incremented.
U can also decrement the value.
|
|
|
|
|
Hallo
We have set up Replication in several locations the SQL Server Enterprise Edition which is the Publisher is running on a different location while the Subscribers are running SQL express Edition which use Windows Synchronization as it does not have agents. The problem is users entering Passwords each and every time the Synchronization starts is there a way to enter the database only once and save it to the client Computers?
|
|
|
|
|
I'm using SQL server 7. Unfortunetly, the database I'm working with was not designed very well to restrict the date format input by the user. I need to change a table's column [IncidentDate] from a format of mm/dd/yyyy (12/25/2008) to a format of ddmmmyy (25DEC08). There are over 3,000 entries within this column that have a mixture of these two formats. I'm not sure exactly how I would accomplish this task. I tried using SQL Server Enterprise Manager's export/import tool to place the data into an Excel spreadsheet, manipulate the dates, and then import back into the database. I come close to resolving my issue, but I always get an error in the import function.
Any help is appreciated.
|
|
|
|
|
make while loop in TSQL, and format is this SELECT CONVERT(VARCHAR(9), GETDATE(), 6) AS [DD MON YY] br mode="hold" />
>
I Love T-SQL
|
|
|
|
|
Thank you. I'll give this a shot and let you know how it worked out.
|
|
|
|
|
If it won't work then ask again.
I Love T-SQL
|
|
|
|
|
Hi EveryOne,
I am savitri here.I am using ODBC in VC++ programs.I am Inserting values in the tables.If i want to Edit/Update Those values how Can I do it.if i clicked on the values those are come on the text boxes in that i want to edit after clicking button those values should be updated.Please tell me How can i Do it.
I am not getting idea how to get back the values on text boxes.
PLEASE HELP ME.
THANKS IN ADVANCE,
savitri
|
|
|
|
|
the way how u execute Insert command then do it with update same thing. or share your insert code and probably we can find how to execute update command.
I Love T-SQL
|
|
|
|
|
Hey guys
im having a slight problem with the above query, the problem is the value in the variable is like this "23:00" and the value in the table is "01-01-2008 23:00:00.000"
how can i get the query to return the row i need irrespective of the date that is attached to the time?
thanx,
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
think BIG and kick ASS
you.suck = (you.passion != Programming)
|
|
|
|
|
select convert(varchar(10),columnname,108) from myTable it will return this format HH:mm:ss
hope it helps to you...
I Love T-SQL
|
|
|
|
|
thanx dude, im sure it will work!
Harvey Saayman - South Africa
Junior Developer
.Net, C#, SQL
think BIG and kick ASS
you.suck = (you.passion != Programming)
|
|
|
|
|
I guess it will work for you
I Love T-SQL
|
|
|
|
|
Oh, that's handy! i didn't know there was such easy conversion!
|
|
|
|
|
108 is returned format of datetime, also we have another formats like 100,101,102 and so on
If you wanna check this syntax in T-SQL by changing format number
select convert(varchar,getdate(),108)
I Love T-SQL
modified on Tuesday, April 22, 2008 6:09 AM
|
|
|
|
|
Blue_Boy wrote: 108 is returned format of datetime, also we have another formats like 100,101,102 and so on
Which means what? What does format "101" actually mean? Without further explanation your statement is meaningless. Technically correct, but meaningless all the same.
|
|
|
|
|
for more-meaning use google search engine
I Love T-SQL
|
|
|
|
|
hey frnd can u tell me what is 108 in the foll Query
select convert(varchar(10),columnname,108) from myTable
|
|
|
|
|
Hey man,
You can use DATEPART to get the different parts of the date.
<br />
select right('0' + convert(varchar, datepart(hh, time)), 2) + ':' + <br />
right('0' + convert(varchar, datepart(mi, time)), 2) + ':' + <br />
right('0' + convert(varchar, datepart(ss, time)), 2)<br />
With the date you've given as an example, this would return the string "23:00:00".
Hope this helps...
|
|
|
|
|
hi everyone,
I'm working on importing records from an excel file, the problem is that I'm trying to specify a time out of about 2 minutes but it still expires on 1 minute.
Here's the string that I'm using in my app.config file.
Can anyone plz help me in this regard
Driver={Microsoft Excel Driver (*.xls)};DriverId=790;Dbq=D:\Projects\BulkCopy\BulkCopy\BulkCopy\bin\Debug\test1.xls;connect timeout=120;
Rocky
Success is a ladder which you can't climb with your hands in your pockets.
|
|
|
|
|
connect timeout=120*2 will give you 2 minutes.
Try it
I Love T-SQL
|
|
|
|