Viewing 15 posts - 181 through 195 (of 898 total)
raghuldrag (6/7/2013)
if suppose choose the first row of the table,
create table journey
(
journey_id int identity,
depdate datetime,
fromplace varchar(20),
toplace varchar(20),
mode nvarchar(20),
seattype nvarchar(20),
)
insert into journey (deapdate,fromplace,toplace,mode,seattype) values ('2013-05-13', 'chennai','Banglore','air','Business')
insert...
June 7, 2013 at 4:24 am
Your requirement is still not very clear. Which is the column you want to update and How?
raghuldrag (6/7/2013)
June 7, 2013 at 2:51 am
It seems you are calling the procedure 5 times for the 5 rows
You will have to change this approach and call the procedure only once and insert all the 5...
June 7, 2013 at 2:46 am
A sample data of 1 rows might not be enough
Please provide a few more rows to replicate the issue properly
Now, the main questions, What do you want to update and...
June 7, 2013 at 2:34 am
lordzoster (6/7/2013)
Hallo Craig.It's not so easy, thank you anyway.
Why do you think it is not so easy? Applying referential integrity is not so difficult either.
Can you explain us the...
June 7, 2013 at 12:53 am
ananda.murugesan (6/7/2013)
DELETE statement will be hang due to 76554566 total records.. any suggestion Pls.
You can try the below steps
1. DELETE or TRUNCATE the data from all tables that are dependent...
June 7, 2013 at 12:50 am
dwain.c (6/5/2013)
Stefan Krzywicki (6/5/2013)
Don't you hate it when you finally figure out a solution for a difficult problem and it creates 5 more problems that the old way disguised?
I would...
June 6, 2013 at 2:35 am
What is the result you are expecting based on your sample data?
June 6, 2013 at 2:05 am
lsalih (6/5/2013)
I know that by querying sys.dm_db_index_usage_stats you can get the information
You will not get all this information by querying this table.
A better option would be to create a trigger...
June 5, 2013 at 8:52 am
Your explanation is not very clear
Can you explain the logic behind the expected results based on your sample data?
It would be a bit more helpful if you could add some...
June 5, 2013 at 7:51 am
One way to do this..
SELECTSUBSTRING
(
C.Col,
CHARINDEX(']',C.Col,1)+1,
LEN(C.Col) - CHARINDEX('[',REVERSE(C.Col),1) - CHARINDEX(']',C.Col,1)
)
FROM(
SELECT'[N] 18. Is the C.B. removed from the panel? [Yes / No]' AS Col UNION ALL
SELECT'[NABCD] 18. Is it removed from the...
June 5, 2013 at 7:17 am
Something like this..
SELECTCVFileName
,RIGHT(CVFileName,CHARINDEX('.',REVERSE(CVFileName),0)-1)
FROMCandCV
June 5, 2013 at 6:52 am
You probably have some data which is not a valid date
SELECT*
FROMYourTableName
WHEREISDATE(LEFT(perControl,8)) = 0
The above code will give you the list of invalid dates.
June 4, 2013 at 6:58 am
The data type DATE is not available in SQL Server 2005 and hence, the error
Change it to DATETIME or SMALLDATETIME
select cast(left('201301042',8) as datetime)
June 4, 2013 at 6:52 am
ChrisM@Work (6/4/2013)
ALTER PROCEDURE update_use(
@name varchar(20),
@class nvarchar(30)
)
AS
UPDATE grts SET class = @class WHERE name = @name
IF @@ROWCOUNT = 0
INSERT INTO grts (name, class) VALUES (@name, @class)
Wow. This is the shortest INSERT/UPDATE...
June 4, 2013 at 6:29 am
Viewing 15 posts - 181 through 195 (of 898 total)