Viewing 15 posts - 6,166 through 6,180 (of 7,191 total)
Please answer my question about the shift column and I'll see what I can do.
John
December 20, 2007 at 3:21 am
No loop is necessary, especially a loop within a loop, which would kill performance if you have a lot of data. It should be possible to solve this with...
December 20, 2007 at 2:59 am
To solve this, I think you'll need a table of dates. Search this site for Jeff Moden's tally table - this is just a table of sequential numbers, to...
December 20, 2007 at 2:43 am
Not from my reading of it, no. But study the @@IDENTITY topic in Books Online carefully, and maybe carry out a few tests as well.
John
December 19, 2007 at 6:17 am
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
Viewing 15 posts - 6,166 through 6,180 (of 7,191 total)