Комментарии:
Sir, how do we get back inserted value Id in a query where i use dynamic table name
ОтветитьSir, I have 25 to 30 tables, that I wanted to create dynamically using SP, can you guide me on how can I achieve that?
for example I have 4 tables
1 claim
2 claimEditor
3 claimmapc
4cliam encounter etc...
.
.
.
25
Now on executing SP if I pass 1 in parameter
My table should create as
1 claim_1
2 claimEditor_1
3 claimmapc_1
4cliam encounter _1 and so on
if I pass 2 in param
My table should be created as
1 claim_2
2 claimEditor_2
3 claimmapc_2
4cliam encounter_2
etc
alter procedure spTableLookup
@tableName nvarchar(30)
as
begin
declare @lookuptable nvarchar(100)
set @lookuptable =N'select * from ' + QUOTENAME(@tableName)
execute sp_executesql @lookuptable
end
execute spTableLookup Employees;drop database SalesDB
Thanks for the refresher
ОтветитьYou are the BEST!
ОтветитьGreat handout. Thanks with Easter blessings this day in Christ
ОтветитьYou are a champion !!
Very well explained lectures.
what if we inject by
'Countries]; Drop Databse [SalesDb'
Dear Vankat, how to pass two parameters, one as column name and other as the content of the column?
I tried to make a sp, does not seem to work as intended? Can you please give some advice? Thanks a lot
the query I want to achieve will be something like " Select * from customers where CustomerID = 'ALFKI'
so CustomerID and ALFKI will be the parameter @field and @search which are users inputs.
Create PROCEDURE [dbo].[getByColumnAndContentSearch]
@field nVarchar(50),
@search nVarchar(50)
AS
BEGIN
DECLARE @sql NVARCHAR(MAX);
SET @SQL = 'select * from customers where ' + QuoteName(@field)+' = '+QuoteName(@search)
EXEC(@sql)
END;
What is the previous video of this video sir
Please send that link
sir how to upload excel data with dynamic column name in database.Please respond its urgent...
ОтветитьHow to variabilize dynamically the table name of a 57k SQL statement ? As we can't build a stored procedure with a table name as a variable, and as a nvarchar(max) viariable can't contains more than 8k SQL statement! It seems that there is no solution with SQL server ?
Ответитьkudvenkat. plz keep going !
Ответитьplease start xamrin tutorial
Ответитьthanx again and again. you are awesome
ОтветитьSir can you please tell us how to pass table name dynamically to function?
Ответитьplease upload ssrs videos
ОтветитьVery very nice video tutorial. I respect you so much!
Ответитьthank you venkat sir.. great explanation.. ALLAH bless you !
Ответить