Viewing 15 posts - 6,151 through 6,165 (of 7,185 total)
I think it would help if you posted some DDL for all relevant tables, because I'm confused about what tables you have and what they're for. Please include foreign...
December 21, 2007 at 7:21 am
Create a table of dates (as I suggested in answer to another of your questions) and left join it to table1.
John
December 21, 2007 at 6:12 am
Karthik
We're checking that the first character is equal to the last, the second is equal to the second to last, and so on. You only need to do that...
December 21, 2007 at 5:19 am
C'mon, Karthik - do some of the work yourself! What don't you understand?
John
December 21, 2007 at 4:47 am
Karthik
Try this.
John
DECLARE @word varchar(20)
DECLARE @length smallint
SET @word = 'AbleWasIEreISawElba'
SET @length = LEN(@word)
IF EXISTS (
SELECT *
FROM master.dbo.spt_values
WHERE type = 'P'
AND number between 1 and @length/2.0 + 1
AND SUBSTRING(@word,number,1) <> SUBSTRING(@word,@length-number+1,1)
)
PRINT...
December 21, 2007 at 4:29 am
Why don't you want to use REVERSE? Is this a homework question?
John
December 21, 2007 at 3:46 am
Please will you post your table structure and some sample data and expected results. It's difficult to visualise your problem without this.
John
December 20, 2007 at 7:27 am
If you want to use dynamic SQL then you to use it for the whole statement. Something like this:
EXEC 'DECLARE C CURSOR FOR ' + @QueryString + ' '
I...
December 20, 2007 at 4:44 am
Do Antares's solutions not work? If no, tell us why not and we'll see if we can help.
John
December 20, 2007 at 4:21 am
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
Viewing 15 posts - 6,151 through 6,165 (of 7,185 total)