Viewing 15 posts - 6,166 through 6,180 (of 7,187 total)
dr_csharp (12/18/2007)
declare @Id int
INSERT INTO A (CompanyName)VALUES('Iran');
SELECT @Id=@@IDENTITY
INSERT INTO B (CompanyID,Tel)VALUES(@Id,'0912')
Make sure you understand the difference between @@IDENTITY and SCOPE_IDENTITY before rolling this code out into a live environment.
John
December 19, 2007 at 5:42 am
So is there no natural key in your Access table, something like create_date or order_number? If not, how about adding an extra column and populating that with an ascending...
December 19, 2007 at 4:41 am
From Books Online: "Floating point data is approximate; therefore, not all values in the data type range can be represented exactly." Please post both queries you are using and...
December 19, 2007 at 4:14 am
Is the data in the spreadsheet ordered according to any particular column(s)? If so, import the data and create a clustered index on that/those column(s). If you insist...
December 19, 2007 at 4:11 am
Use DATEDIFF to calculate the number of minutes after midnight the employee arrives each day, take an average of that, and then use DATEADD and DATEPART to manipulate that figure...
December 19, 2007 at 3:58 am
I see that you need an "urgent" query. Does that mean this is homework? What have you tried so far?
John
December 18, 2007 at 5:52 am
Karthik
You've got two options:
(1) Think about it for yourself
(2) Read Jeff's post, which is only 5 above your one and gives you an alternative way of doing what you want...
December 17, 2007 at 3:42 am
Ramesh (12/9/2007)
In Mathematics, if one cannot prove a statement is true then it termed to be as false. In simple terms, if one says a=b and he cannot prove...
December 10, 2007 at 5:48 am
No need to post the same question in two different forums. Answered here:
November 29, 2007 at 6:01 am
This looks slightly like a homework question. Yes, you can have a foreign key constraint wherein two columns in one table reference two columns in another. The syntax is...
November 29, 2007 at 5:58 am
majorbloodnock (11/28/2007)
😀
"Always in the sh-t, it's just the depth that varies"
Sorry to be pedantic, but shouldn't the comma come after "sumus"?
John
November 29, 2007 at 5:40 am
This is hard work, isn't it? You've been asked four times now to post the code of the trigger. You have to help yourself if you expect anyone...
November 24, 2007 at 2:35 am
Read about BCP, bulk insert and SSIS and choose the one that suits you best. You can also use linked servers and OPENROWSET.
John
November 23, 2007 at 5:04 am
Do you have any DDL triggers defined on the database or server?
John
November 23, 2007 at 4:57 am
Rajeev
You've got seven different SELECT statements in there. Have you tried running them individually to see which one is taking most of the time? Once you identify that,...
November 22, 2007 at 6:32 am
Viewing 15 posts - 6,166 through 6,180 (of 7,187 total)