Viewing 15 posts - 256 through 270 (of 463 total)
Can you give us table script, test data and expected result? In the below format.
Create table ...
INSERT INTO ....
Expected REsult....
---------------------------------------------------------------------------------
October 27, 2009 at 1:21 am
Row_Number version for it. It would give the first record of the duplicate set order by your PK,
CREATE TABLE #URTABLE (PK int, Field1 int, Field2 int , Field3 int)
INSERT...
---------------------------------------------------------------------------------
October 26, 2009 at 8:19 am
siddartha pal (10/26/2009)
1: Does this setting is for the proc duration? After the procs execution, will the same set back to default level.
AS PER BOL,
If you issue SET TRANSACTION...
---------------------------------------------------------------------------------
October 26, 2009 at 7:29 am
Ok, not sure if this is what you are looking for,
Test data
CREATE TABLE #T1 (id int, date datetime)
CREATE TABLE #T2 (id int, date varchar(100))
INSERT INTO #T2 VALUES (1,'13/01/2008 22:42:20')
INSERT...
---------------------------------------------------------------------------------
October 26, 2009 at 4:51 am
Can you execute that proc in SSMS window and see if it executes successfully?
---------------------------------------------------------------------------------
October 26, 2009 at 4:23 am
I actually meant converting the value in the insert statement (see the bolded part below)
INSERT [tblAuthor] ([Author_ID], [Group_ID], [Username],
[Real_name], [User_code], [Password], [Salt], [Author_email],
[Homepage], [Location], [MSN], [Yahoo], [ICQ], [AIM],...
---------------------------------------------------------------------------------
October 26, 2009 at 4:14 am
snadowitz (10/26/2009)
what does the 103 mean in the statement?
The character string that you are trying to convert is in this format dd/mm/yyyy (British/French) and its 3 if the input...
---------------------------------------------------------------------------------
October 26, 2009 at 2:12 am
SELECT * FROM
(SELECT * ,ROW_NUMBER()
OVER (PARTITION BY FIELD1, Field2, Field3 Order BY PK) as row_no
FROM URTABLE) T
WHERE ROW_NO > 1
This will give you duplicates, and all the...
---------------------------------------------------------------------------------
October 26, 2009 at 1:54 am
cant u convert the date format something like this while importing?
Select Convert (datetime, '13/01/2008 22:42:20', 103)
I doubt if you will get AM/PM format for time in yyyy-mm-dd date format(lets see...
---------------------------------------------------------------------------------
October 26, 2009 at 12:49 am
sorry, to be honest, I am not sure of the .net part of your application(I dont know .net that much 🙁 ). I was trying to see if there is...
---------------------------------------------------------------------------------
October 24, 2009 at 11:19 am
Not sure if I undestood your situation completely, but you are using this update command,
UPDATE Data
SET Slot1 = @Slot1,
Slot2 = @Slot2,
Slot3 = @Slot3,
Slot4 = @Slot4,...
---------------------------------------------------------------------------------
October 24, 2009 at 5:00 am
I guess there are tools. (not sure about ss2k5 itself) checkout readgate's sqlcompare, that one should be useful.
---------------------------------------------------------------------------------
October 24, 2009 at 12:42 am
I think you are not trying to understand what your query is doing! just put whatever column you want in your select clause!!
SELECT CASE WHEN RowCnt > 1...
---------------------------------------------------------------------------------
October 24, 2009 at 12:39 am
This wont help you?
SELECT *, CASE WHEN Row_no > 1 THEN
CONVERT(varchar, WO)+ CHAR(63 + Row_no)
ELSE CONVERT(varchar,WO) END FROM
(Select * ,
Row_Number() OVER (Partition BY WO ORDER BY WO)...
---------------------------------------------------------------------------------
October 23, 2009 at 10:31 am
Will this do?
CREATE TABLE #WO(WO int, RD varchar(10))
INSERT INTO #WO VALUES (122 ,'asas')
INSERT INTO #WO VALUES (123 ,'der')
INSERT INTO #WO VALUES (124 ,'wer3er')
INSERT INTO #WO VALUES (124 ,'rtre')
INSERT INTO #WO...
---------------------------------------------------------------------------------
October 23, 2009 at 7:56 am
Viewing 15 posts - 256 through 270 (of 463 total)