Viewing 15 posts - 2,026 through 2,040 (of 2,894 total)
siva 20997 (3/6/2012)
my find and repalce gave that problem
here is the corrected code
CREATE TABLE #a (id INT PRIMARY KEY, name VARCHAR(20), igroup INT)
INSERT #a VALUES (1,...
March 6, 2012 at 7:34 am
Here how you can do it with calendar table:
-- just small calendar table which has week_day's for 2012
-- YOU WILL BE BETTER USING A PROPER ONE!
select cdate, datepart(weekday,cdate) week_day_no, DATENAME(weekday,cdate)...
March 6, 2012 at 7:01 am
oops, can see your try now...
Comments removed.
March 6, 2012 at 6:43 am
Gianluca Sartori (3/6/2012)
Eugene Elutin (3/6/2012)
If so, may be legacy DB2 database has some unique idexes?
In my experience, DB2 on z/OS is often used without indexes and has "logical views" to...
March 6, 2012 at 6:38 am
Also, back to the question: UNIQUE NOT NULL vs PRIMARY KEY
PRIMARY KEY term has the clear definition -it's contstraint
But "UNIQUE NOT NULL" what do you exactly refer to?...
March 6, 2012 at 6:33 am
If so, may be legacy DB2 database has some unique idexes?
March 6, 2012 at 6:00 am
Much better now!
So, what else we can add:
1. they differ in purpose:
We are using PK for referential integrity (when paired with FK)
While UNIQUE NOT NUL index(key) we use...
March 6, 2012 at 5:23 am
deepikamm (3/6/2012)
Thank you for your reply.Sqlservercentral is best place to post this question.
Kindly help me out.
Exactly right! Have you tried to google for the title you gave to the post?...
March 6, 2012 at 5:12 am
assefam (3/4/2012)
For security reason( SQL Injection),Dynamic SQL is not allowed for me...
If you use sp_executesql with parameters, there are no risks of SQL Injection and dynamic SQL is safe to...
March 6, 2012 at 4:24 am
Just an idea:
CREATE TABLE [dbo].[MyTable](
[id] [int] IDENTITY(1,1) NOT NULL,
[realvalue] [varchar](50) NULL,
[firstChar] AS (left([realvalue],(1))),
CONSTRAINT [PK_MyTable] PRIMARY KEY CLUSTERED ([id] ASC)
)
GO
CREATE TABLE dbo.SpecialCharSort (SpecialChar char(1), sortOrder int)
insert dbo.SpecialCharSort
values ('!',...
March 5, 2012 at 10:40 am
guerillaunit (3/5/2012)
March 5, 2012 at 10:18 am
Please provide setup of data for each of the rule you've listed, so we can see exactly what your rules are.
March 5, 2012 at 9:19 am
You don't need to set a variable @location for thing you are want to do.
Create a UserLocation table which will hold all locations per user:
-- just an example, you want...
March 5, 2012 at 9:11 am
Stefan Krzywicki (3/5/2012)
March 5, 2012 at 8:51 am
Cadavre (3/5/2012)
chandarcst (3/5/2012)
HiI asked you Send the standard sql tutorial links suppose if you have.
I have no idea what you want me to send you. What "standard sql tutorial"...
March 5, 2012 at 5:00 am
Viewing 15 posts - 2,026 through 2,040 (of 2,894 total)