|
Hi!
I cant understand your problem exatly. But if you want to generate a script
then try this. It is for SQL.
<br />
1) Right Click the table/dataBase/View under Object Explorer<br />
2) Select the option "Script Table/DataBase/View as " and choose CREATE TO
This will generate appropriate Script.
I hope this will help you.
Regards.
"Save water,It's precious"
|
|
|
|
|
Thaks for ur response.
I cant udnerstand how to run script?I have generated before export,but i dont know how to use it.
Otherwise in the object brower,It is give like
Script Object to New window.,to file,to clipboard etc.
Here how i have to use??
Plz dont irritate and give me solution/idea/example.
please..
kissy
|
|
|
|
|
Hi!
Connect to your DB at Server and execute the script.
"Save water,It's precious"
|
|
|
|
|
Thanks 4 ur answer.My problem got solved
kissy
|
|
|
|
|
You are Welcome!
"Save water,It's precious"
|
|
|
|
|
Hi
Its Salman I want to disable the Print Statement in all the stored procedure i have in SQL 2005 Database. so can anyone give me idea that how i can do this.
thanks in Advance
I am new in this Field so please guide me
Regards,
Salman
|
|
|
|
|
m_salman wrote: I want to disable the Print Statement in all the stored procedure
Err...comment them out?
Paul Marfleet
"No, his mind is not for rent
To any God or government"
Tom Sawyer - Rush
|
|
|
|
|
there are some 2000+ stored procedures so i cant do that manually as even in some stored procedures they have been written more then once
for example:
Print @strSQL + @strSQL2
this kind of statement is present in almost all the Stored procedures so i want to disable them.
Thanks
Regards,
Salman
|
|
|
|
|
i am using a DTSPackage named "DTPkg" ... this DTS Package i am invoking from my VB.NET Windows Application... In the DTS Package what i am trying to do is that ia am populating the text file with the records that are selected from SQL Server Table .... i am using Dynamic Property for Global variable ... the name of the Global variable is CSN ... the text file should be created whose name shud be the value containing in the CSN variable ... in the destination text file we need to give the file name no ? how we can do that ? anybody know how to do this ? PLz help
Any help Appreciated ..
|
|
|
|
|
I wrote a web page a while back on using DTS packages with Microsoft Access.
The page describes outputting data to a text file.
I think it should cover most of what you need to know.
Clickety here
You always pass failure on the way to success.
|
|
|
|
|
VIEW Schemabinding
Does anyone know if I can use the system views such as master..sysprocesses within a view bound to the base table?
Ravikumar
[Coimbatore]
|
|
|
|
|
Views can be used in views, but then they may not be update-able i.e. the views using other views may only be read-only!
Give it a try!
Regards,
Adeel
Do rate the reply, if it helps or even if it doesnot, because it helps the members to know, what solved the issue. Thanks.
|
|
|
|
|
hi
Any one please suggest me how to write a sql query based on the following, in my table i am having a bit column, when the column value is true then it should retun me a string as checke else unchecked if false.
please suggest me
thanks in advance
Know is Drop, Unknown is Ocean
|
|
|
|
|
SELECT
CASE myBitField
WHEN 1 THEN 'Checked'
ELSE 'Unchecked
END AS IReallyShouldNotDoThisToBitFields
FROM PerfectlyWellFormedTable
Seriously, If the table has a bit field then return as-is. Do any logic where logic should be, not in the database. You're just upping the IO from your server to your client.
Returning a bit field sends 1 bit of data, returning the string "checked" and "unchecked" is significantly greater.
|
|
|
|
|
Hi,
Check If following statement works for you.
SELECT CASE WHEN BITCOL = 1 THEN 'CHECKED' ELSE 'UNCHECKED' END
FROM TABLENAME
Regards,
Sulaman
|
|
|
|
|
Could anyone out there assist me with the data-replication problem that i have here.
i have a database which is in a different continent and like 5 clients have to replicate data to it from different countries.
My problem is that i need to allow the subscribers to be able to be able to publish to the main server but it is giving me problems that are related to IP
Anyone with a tutorial that could help?
|
|
|
|
|
I am currently optimising an internal intranet site, and I have spotted a possible gain - moving the abbreviation of a text field from the RowDataBound event of a GridView into the SQL stored proc that retrieves the data.
My question is - can anyone suggest the best way to choose an appropriate abbreviation point so that the ellipsis is added only after a break in the text?
i.e.
This is a...
rather than
This is a te...
As I am looking for performance gains, I'll put up with ugly abbreviation if I have to, but it would be nice if there were a [relatively] quick, simple solution to keep it looking pretty...
|
|
|
|
|
|
Thanks for the suggestion - I'll give it a go.
I guess there's no definitive answer to whether it's faster more efficient to do the abbreviation on the SQL server as opposed to the web-server, what with hardware variables and the like?
My thinking was along the lines of avoiding looping algorithms - the c# code is currently doing a split, then adding words back until a limit is reached - in favour of a more set-based operation...
Maybe I should just grasp the nettle, and use a fixed length abbreviation...
|
|
|
|
|
OK - halfway there...
SUBSTRING(description,0,CHARINDEX(' ',description,70))+'...' AS tooltip
Just need to wrap this in a case/if to exclude descriptions shorter than 70 characters...
Thanks for the nudge!
|
|
|
|
|
CASE
WHEN LEN(description) > 71 THEN
SUBSTRING(description,0,CHARINDEX(' ',description,70))+'...'
ELSE '' END AS tooltip,
Got it - thanks again.
|
|
|
|
|
You can also do this in a stylesheet if you don't care too much about the bandwidth. The benefits to this approach are that the text is trimmed at the appropriate position as the client lays it out.
To be honest I sincerely doubt there is any real gain to be made trimming the string on the database vs in the code behind... (unless we are talking massive amounts of text)
|
|
|
|
|
I am using the following statement in a SP.
EXECUTE (' INSERT INTO #OutPut
EXEC h_DailyDividend
@TickerTable = '+@TickerTableName+',
@DateTable = '+@DateTableName+',
@Units = '+@Units )
AND IN DailyDividend I am using the following statement.
EXECUTE ('INSERT INTO #TickerTable
EXEC h_SecMstr_SecMap_TQAExch_Info
@IDList = '+@TickerTable+',
@IsTable = 1,
@Type = 0,
@OutPutFormat = 0,
@VenType = 14 ')
And i am getting the following error.
Message: An INSERT EXEC statement cannot be nested.
Can any body help me out how to solve this problem.
Regards
Sulaman
|
|
|
|
|
I don't understand why you need to nest these in the first place?
And I don't understand why you feel the need to inject parameters back in. Does this not work:
EXEC h_DailyDividend
@TickerTable = @TickerTableName,
@DateTable = @DateTableName,
@Units = @Units
|
|
|
|
|
Actually the h_dailydividend procedure returns a result set which needs to be inserted in #Output table, thats why i write like this. I read somewhere that dynamic statement does not produce this error but even using dynamic string i am getting the same error
|
|
|
|