Viewing 15 posts - 76 through 90 (of 152 total)
When I run this code:
declare
@New_Value varchar(50),
@Col varchar(50),
@TableName varchar(50)
select @TableName = [TABLE_NAME]
from [Hosea_tblDef_Cloning_Table]
select @Col = [COLUMN_NAME]
from [Hosea_tblDef_Cloning_Table]
select @New_Value = [NEW_VALUE]
from [Hosea_tblDef_Cloning_Table]
SELECT '[' + t.table_schema + '].[' + t.table_name + ']'...
May 9, 2014 at 6:45 am
INSERT INTO [Hosea_tblDef_Cloning_Table] ([CLONE_ID]
,[TABLE_NAME]
,[COLUMN_NAME]
,[OLD_VALUE]
,[NEW_VALUE])
VALUES (1, 'Hosea_tblDef_RETURNS',...
May 9, 2014 at 6:39 am
There has been few changes to this code..
Before I used to pass parameters
declare @Fund_Id varchar(50),
@Product_Id varchar(50),
@NewFund_Id varchar(50),
@NewProduct_Id varchar(50),
...
May 9, 2014 at 6:29 am
There has been few changes to this code..
Before I used to pass parameters
declare @Fund_Id varchar(50),
@Product_Id varchar(50),
@NewFund_Id varchar(50),
@NewProduct_Id varchar(50),
...
May 9, 2014 at 6:24 am
@ChrisM@Work
Can you please explain to me your code, and why the concept of CROSS APPLY, why did you choose to go with it, you also used both of...
April 23, 2014 at 7:59 am
Thank you for the code, I'm testing it and it's working, as for other malicious events I'll look into them
April 23, 2014 at 6:12 am
Now that's an easy one cause I created a table for you, so you are working with the data you know. say now the user input tblDef_RETURNS as table, and...
April 23, 2014 at 4:32 am
I'm planning to run everything inside the PROC:
CREATE PROC (@Product_Id, @Fund_Id, @NewProduct_Id, @NewFund_Id, @TableName)
AS
BEGIN
END
that's just the shell. I'm still trying to get the inside code correctly.
April 23, 2014 at 3:55 am
If you're updating two very specific columns, they should exist in one very specific table, surely?
Yes, I'm updating two specific columns, which is [PRODUCT_ID] and [FUND_ID], then insert the new...
April 23, 2014 at 3:51 am
Here's the case;
CREATE permTable
(
[RETURNS_ID] [int] IDENTITY(1,1) NOT NULL,
[REPORT_ID] [varchar](50) NOT NULL,
[COMPANY] [varchar](150) NULL,
[PRODUCT_TYPE] [varchar](150) NULL,
[PRODUCT_ID] [varchar](150) NULL,
[PRODUCT_DESC] [varchar](150) NULL,
[FUND_ID] [varchar](150) NULL
)
INSERT INTO permTable ([REPORT_ID]
...
April 23, 2014 at 3:29 am
For now I'm using SELECT ... INTO
SET @InsertSQL = 'SELECT * INTO Hosea_tempTable FROM ' + @TableName +' WHERE (Product_Id = '+ QUOTENAME(@Product_Id, '''''') +' or Product_Id = '''' )...
April 23, 2014 at 2:40 am
The scenario is this..
I have a product AGP with Fund E01, and other attributes
then later I want to creat another product with the same attributes as AGP product,...
April 23, 2014 at 2:23 am
I changed my code now and I'm using SELECT ... INTO to create the table rather than generating a CREATE TABLE statement. I want to cancel the identity column to...
April 23, 2014 at 1:07 am
I do have that line of code, I just didn't put it here.
SET @SQLStatement = REPLACE(@SQLStatement,'(,','('); -- remove first comma
I don't think I will be able to list columns...
April 23, 2014 at 12:41 am
I tried 123.456789 and it worked fine,
Then I tried 1234.56789 I got the same error:
Msg 8115, Level 16, State 8, Line 32
Arithmetic overflow error converting numeric to data type...
April 10, 2014 at 5:01 am
Viewing 15 posts - 76 through 90 (of 152 total)