Thursday, March 29, 2012
Creditcard Validation script
numbers?
I am not talking about whether the account is current, just whether the
numeric value of the card is valid. Something similar to what one might use
for zip codes or phone numbers.
Right now I have something that looks for 15 or 16 characters in length and
then checks the first digit for the type of card (e.g., 3 = Amex).
However I was hoping that someone who has worked with this issue might give
me some insights into what conventions or standards a credit card number mus
t
comply with in order to be valid.
ThanksOn Sun, 19 Feb 2006 11:12:26 -0800, "Dave" <Dave@.discussions.microsoft.com>
wrote:
in <331D1E4C-2EB2-4ABF-ACC5-08F5D3E5FC2A@.microsoft.com>
>Does anyone have a T-SQL script or function that validates US creditcard
>numbers?
>I am not talking about whether the account is current, just whether the
>numeric value of the card is valid. Something similar to what one might use
>for zip codes or phone numbers.
>Right now I have something that looks for 15 or 16 characters in length and
>then checks the first digit for the type of card (e.g., 3 = Amex).
>However I was hoping that someone who has worked with this issue might give
>me some insights into what conventions or standards a credit card number mu
st
>comply with in order to be valid.
>Thanks
Here's a URL that I took to heart and converted to VBScript for use in my
classic ASP environment:
http://www.sitepoint.com/print/card...ation-class-php
If you want to see the VBScript also, post back and I'll put it up. I felt
that
this covered it well enough that ashamedly I didn't make any efforts to furt
her
validate the facts that the author presented.
Stefan Berglund
Sunday, March 25, 2012
Creating View
I know that this is b'coz of GO statement. but GO is not a
T-SQL command and it works only inside Query analyser. if
the same string i execute through VB code by using
connection.execute, it doesn't recognise GO so i removed
it. It works for creating tables if i remove GO and
execute through VB-code. now i have to run this
query "CREATE VIEW" from my vb code and at one go as i do
for tables, i want to create all the views. ur suggestions
are welcome.
Billi98Hello,
The GO statement only works through osql and isql (or in
this case Query Analyser).
All it does is signal the end of Transact-SQL statements,
including creating views SP or tables.
To be honest I am not too sure what your asking, you do
not actually need it when you are creating a view, but its
a 'nice to have' is you have a script you need running
though QA.
J
>--Original Message--
>Dear Sender,
>I know that this is b'coz of GO statement. but GO is not
a
>T-SQL command and it works only inside Query analyser. if
>the same string i execute through VB code by using
>connection.execute, it doesn't recognise GO so i removed
>it. It works for creating tables if i remove GO and
>execute through VB-code. now i have to run this
>query "CREATE VIEW" from my vb code and at one go as i do
>for tables, i want to create all the views. ur
suggestions
>are welcome.
>Billi98
>
>.
>|||You cannot combine CREATE VIEW with any other command in the same batch ("execution"). So you need to loop the
input file, and each time you find a GO, execute what you have in the buffer.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"billi98" <anonymous@.discussions.microsoft.com> wrote in message
news:49f701c42c33$be5f7e20$a601280a@.phx.gbl...
> Dear Sender,
> I know that this is b'coz of GO statement. but GO is not a
> T-SQL command and it works only inside Query analyser. if
> the same string i execute through VB code by using
> connection.execute, it doesn't recognise GO so i removed
> it. It works for creating tables if i remove GO and
> execute through VB-code. now i have to run this
> query "CREATE VIEW" from my vb code and at one go as i do
> for tables, i want to create all the views. ur suggestions
> are welcome.
> Billi98
>
Thursday, March 8, 2012
Creating Pull Subscription using T-SQL
Hello,
i am trying to create a pull subscription to my publication using T-SQL. The pull subcription is created successfully but the problem is that data is not merged correctly. I mean when i run the agent ( despite of having data in subscription / publication ) the data is not merged and i get "No Data Needed To Be Merged" message.
i run following sp in this sequence:
At Subscrber:
1 - sp_addmergepullsubscription
2 - sp_addmergepullsubscription_agent
At Publisher:
1 - sp_addmergesubscription
Again at subscriber :
Transaction for adding merge agent job.
Regards,
You must have subsetfiltering enabled, are you using hostname() or suser_sname()? It's common error where the agent is connecting with some value that doesn't match any of the rows. So check what value agent is connecting with, and check what rows have the matching filter value.|||Dear Gregg,i have not enabled anything. it is a simple replication without Filtering.|||OK, just to be clear, you've generated the snapshot and applied it to the subscriber, correct? Now you've made more changes (at publisher or subscriber), like inserts, updates or deletes, run merge agent, but merge agent says no changes need to be sync'd, correct?|||Yes, Exactly.
I applied snapshot, and then after make some changes but it says "No Data Needed to be Merged".|||what version and build of sql server are you using?|||
i am using MSDE 2000 With SP4.
Microsoft SQL Server 2000 - 8.00.2039 (Intel X86)
May 3 2005 23:18:38
Copyright (c) 1988-2003 Microsoft Corporation
Desktop Engine on Windows NT 5.1 (Build 2600: Service Pack 2)
If you're positive you have no filtering, and you're positive you're making changes to the correct tables, then it's not clear to me what the problem is without looking at your machine/subscription/publication.
Only suggestion I can offer is to try and create a new publication and/or new subscription, but using the UI Wizards as opposed to TSQL scripts. I know MSDE doesn't come with Enterprise Manager, but if you find a machine with it installed, you can connect to the necessary machines to do so.
|||Greg,
i have tried this with EM and it works fine but my requirement is that i need to create script for same operation so that it be included in my setup program and be deployed. EM works fine but it does not fulfill my requirements which is a script file to be run at time of setup.
Looking forward to your kind reply.
Regards,
|||If it works fine via EM, then after you create the subscription via the wizard, script out the subscription and compare it to what you originally had.|||i did the same. the script that i am running is based on script generated from Wizard. the question is that why is it not running with OSQL utility ?!Regards,|||I'm not sure what you're asking, but the wizard will generate TSQL statements that you can execute any way you want - via osql, isqlw, vb app, etc. Just make sure to execute the statements at the proper machine, and in the proper database.|||
Dear Greg,
I am doing same as what you are suggesting. That Script is so clear with proper guidance. i just run that on proper machine and Database but the only proper is that Merge Agent does not behave properly. The rest is fine.
Regards,
|||How are you invoking the merge agent?|||Greg,Althougt i have made a schedule for merge agent to be run after creating Test Enviroppment i run it by right clicking on Merge Agent and START SYNCHRONZIE. but in both cases it does not work properly.
Regards,
Wednesday, March 7, 2012
creating Powerpoint presentations (etc) from SS 2000 T-SQL
2000). Contents will involve sharts and tables. Now, I can think of some
crude hacks to accomplish this but I'm looking for the most elegant method
that doesn't require an intranet server (not a possibility at the moment).
So my questions are:
1) What is the best way to do this?
2) How do I make xp_cmdshell transactions run on the client instead of the
server?
Thanks,
Randall ArnoldOops, "sharts" should be "charts".
"Randall Arnold" <randall.nospam.arnold@.nospamnokia.com.> wrote in message
news:3nUmg.32998$_k2.579673@.news2.nokia.com...
>I have a need to create Powerpoint presentations from T-SQL queries (SS
>2000). Contents will involve sharts and tables. Now, I can think of some
>crude hacks to accomplish this but I'm looking for the most elegant method
>that doesn't require an intranet server (not a possibility at the moment).
>So my questions are:
> 1) What is the best way to do this?
> 2) How do I make xp_cmdshell transactions run on the client instead of the
> server?
> Thanks,
> Randall Arnold
>|||I assumed that you were creating 'charts' for attorneys...
Arnie Rowland, YACE*
"To be successful, your heart must accompany your knowledge."
*Yet Another certification Exam
"Randall Arnold" <randall.nospam.arnold@.nospamnokia.com.> wrote in message
news:wFUmg.32999$_k2.579608@.news2.nokia.com...
> Oops, "sharts" should be "charts".
> "Randall Arnold" <randall.nospam.arnold@.nospamnokia.com.> wrote in message
> news:3nUmg.32998$_k2.579673@.news2.nokia.com...
>|||Shart is something completely different in this neck of the woods. ;)
Arnie Rowland wrote:
> I assumed that you were creating 'charts' for attorneys...
> --
> Arnie Rowland, YACE*
> "To be successful, your heart must accompany your knowledge."
> *Yet Another certification Exam
>
> "Randall Arnold" <randall.nospam.arnold@.nospamnokia.com.> wrote in message
> news:wFUmg.32999$_k2.579608@.news2.nokia.com...|||Yeah, yeah, yuck it up : P.
But-- no suggestions?
: (
Randall
"PSPDBA" <DissendiumDBA@.gmail.com> wrote in message
news:1151083679.040836.66940@.i40g2000cwc.googlegroups.com...
> Shart is something completely different in this neck of the woods. ;)
> Arnie Rowland wrote:
>|||Why would you not consider SQL Reporting Services?
With SRS you have extensive formatting control over the presentation output.
I assume you mean that you desire to have 'sharts' (couldn't resist) and
tables reflective of data -not DDL or DML.
With SRS the learning curve is relatively short for relatively simple
presentations.
Arnie Rowland, YACE*
"To be successful, your heart must accompany your knowledge."
*Yet Another certification Exam
"Randall Arnold" <randall.nospam.arnold@.nospamnokia.com.> wrote in message
news:CkZmg.33001$_k2.579688@.news2.nokia.com...
> Yeah, yeah, yuck it up : P.
> But-- no suggestions?
> : (
> Randall
> "PSPDBA" <DissendiumDBA@.gmail.com> wrote in message
> news:1151083679.040836.66940@.i40g2000cwc.googlegroups.com...
>|||I *have* considered it. I just can't get our IT guys on the ball to respond
to requests about it (services not currently running). In the meantime,
I've got this growing daily demand for reports in a company that lives on
Powerpoint presentations...
Randall Arnold
"Arnie Rowland" <arnie@.1568.com> wrote in message
news:%23WOmwBxlGHA.4772@.TK2MSFTNGP04.phx.gbl...
> Why would you not consider SQL Reporting Services?
> With SRS you have extensive formatting control over the presentation
> output. I assume you mean that you desire to have 'sharts' (couldn't
> resist) and tables reflective of data -not DDL or DML.
> With SRS the learning curve is relatively short for relatively simple
> presentations.
> --
> Arnie Rowland, YACE*
> "To be successful, your heart must accompany your knowledge."
> *Yet Another certification Exam
>
> "Randall Arnold" <randall.nospam.arnold@.nospamnokia.com.> wrote in message
> news:CkZmg.33001$_k2.579688@.news2.nokia.com...
>|||It would seem that if the company 'lives on Powerpoint presentation" then
you would be able to gain significant management support for getting SSRS
installed.
Go around the "IT guys" and directly engage management in asking for the
support tools they need to get their work done.
Arnie Rowland, YACE*
"To be successful, your heart must accompany your knowledge."
*Yet Another certification Exam
"Randall Arnold" <randall.nospam.arnold@.nospamnokia.com.> wrote in message
news:wFaog.32765$Nb2.602046@.news1.nokia.com...
>I *have* considered it. I just can't get our IT guys on the ball to
>respond to requests about it (services not currently running). In the
>meantime, I've got this growing daily demand for reports in a company that
>lives on Powerpoint presentations...
> Randall Arnold
> "Arnie Rowland" <arnie@.1568.com> wrote in message
> news:%23WOmwBxlGHA.4772@.TK2MSFTNGP04.phx.gbl...
>|||The problem is that this is an immediate need yet this facility may not be
open much longer. So I'm in a catch-22 where purchases are concerned. I've
been stuck with doing things with free or cheap tools and I'm reaching the
limits of what I can do under that constraint...
Randall
"Arnie Rowland" <arnie@.1568.com> wrote in message
news:uflvIffmGHA.3844@.TK2MSFTNGP04.phx.gbl...
> It would seem that if the company 'lives on Powerpoint presentation" then
> you would be able to gain significant management support for getting SSRS
> installed.
> Go around the "IT guys" and directly engage management in asking for the
> support tools they need to get their work done.
> --
> Arnie Rowland, YACE*
> "To be successful, your heart must accompany your knowledge."
> *Yet Another certification Exam
>
> "Randall Arnold" <randall.nospam.arnold@.nospamnokia.com.> wrote in message
> news:wFaog.32765$Nb2.602046@.news1.nokia.com...
>|||A short term solution would be to use Microsoft Excel as a front end
for your charts, and then use OLE to embed the spreadsheet in the
PowerPoint presentation. Not the most ideal scenario, but might get
you through.
If it were me, based on what you describe, I'd work on the Excel
solution AFTER I blew the dust off my resume. :)
Randall Arnold wrote:
> The problem is that this is an immediate need yet this facility may not be
> open much longer. So I'm in a catch-22 where purchases are concerned. I'
ve
> been stuck with doing things with free or cheap tools and I'm reaching the
> limits of what I can do under that constraint...
> Randall
> "Arnie Rowland" <arnie@.1568.com> wrote in message
> news:uflvIffmGHA.3844@.TK2MSFTNGP04.phx.gbl...
Tuesday, February 14, 2012
Creating Cursor from Stored Procedure
i want to create one cursor in the t-sql. the problem is i want to use
stored procedure instead of select command in cursor.
can anyone tell me how can i use stored procedure's o/p to create
cursor?
i'm using sql 2000 and .net 2.0
thanks,
LuckyFirst, try to rewrite your app so you don't use cursors.
Second, if you must use a cursor, you can create a temp table to hold
the output of your stored procedure, and then build a cursor from that;
e.g.:
CREATE TABLE #splat (columnlist)
INSERT INTO #splat
exec myproc
DROP TABLE #splat
Stu
Lucky wrote:
> Hi guys!
> i want to create one cursor in the t-sql. the problem is i want to use
> stored procedure instead of select command in cursor.
> can anyone tell me how can i use stored procedure's o/p to create
> cursor?
> i'm using sql 2000 and .net 2.0
> thanks,
> Lucky|||Post your exact requirement. There can be better method of what you are
trying to do now
Madhivanan
Lucky wrote:
> Hi guys!
> i want to create one cursor in the t-sql. the problem is i want to use
> stored procedure instead of select command in cursor.
> can anyone tell me how can i use stored procedure's o/p to create
> cursor?
> i'm using sql 2000 and .net 2.0
> thanks,
> Lucky|||Stu wrote:
> First, try to rewrite your app so you don't use cursors.
Second, Seriously. Try to rewrite your app so you don't use cursors.
You might also consider dropping the guts of your stored procedure into
a User Defined Function that returns a table. Then you can use that
UDF for both the Stored Procedure and your sketchy thing that uses
Cursors.
Good luck!
Jason Kester
Expat Software Consulting Services
http://www.expatsoftware.com/
--
Get your own Travel Blog, with itinerary maps and photos!
http://www.blogabond.com/|||Hi ,
Here i'm pasting the sql code that i want to run. the code is ment to
fetch datbase list and update each database with some specific business
logic.
DECLARE authors_cursor CURSOR FOR
SELECT sp_databases
OPEN authors_cursor
FETCH NEXT FROM authors_cursor
INTO @.Database_name, @.database_size, @.Remarks
WHILE @.@.FETCH_STATUS = 0
BEGIN
print 'database : ' + @.Database_name
print 'some business logic'
FETCH NEXT FROM authors_cursor
INTO @.au_id, @.au_fname, @.au_lname
END
CLOSE authors_cursor
DEALLOCATE authors_cursor
NOTE:
please notice the use of procedure to get list of the database in the
select statement of the DECLARING CURSOR. i want to use stored
procedure's o/p to iterate through the rows returned by the procedure.
Please let me know if you know how to do this.
thanks
Madhivanan wrote:
> Post your exact requirement. There can be better method of what you are
> trying to do now
> Madhivanan
>
> Lucky wrote:
> > Hi guys!
> > i want to create one cursor in the t-sql. the problem is i want to use
> > stored procedure instead of select command in cursor.
> > can anyone tell me how can i use stored procedure's o/p to create
> > cursor?
> > i'm using sql 2000 and .net 2.0
> > thanks,
> > Lucky|||Lucky (tushar.n.patel@.gmail.com) writes:
> Here i'm pasting the sql code that i want to run. the code is ment to
> fetch datbase list and update each database with some specific business
> logic.
> DECLARE authors_cursor CURSOR FOR
> SELECT sp_databases
There is no table?
> OPEN authors_cursor
> FETCH NEXT FROM authors_cursor
> INTO @.Database_name, @.database_size, @.Remarks
> WHILE @.@.FETCH_STATUS = 0
> BEGIN
> print 'database : ' + @.Database_name
> print 'some business logic'
>
> FETCH NEXT FROM authors_cursor
> INTO @.au_id, @.au_fname, @.au_lname
> END
> CLOSE authors_cursor
> DEALLOCATE authors_cursor
> NOTE:
> please notice the use of procedure to get list of the database in the
> select statement of the DECLARING CURSOR. i want to use stored
> procedure's o/p to iterate through the rows returned by the procedure.
What does "o/p" mean?
It would be interesting to know what "some business logic" contains.
It's possible that you could use sp_MSforeachdb:
EXEC sp_MSforeachdb N'SELECT db = ''?'', COUNT(*) FROM [?]..sysobjects'
This procedure is undocumented and not supported from Microsoft, so
you would have to look into the source code for the gory details on
how it works. But basically it iterates over all databases, and
run as the SQL statement once for each database. ? works as placeholder
for the database name.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||yeah there is no table. its just a database list that i need. and the
business logic is very very big to paste here. i need some different
tables in different DB and the idea of using the foreachloop is
interesting but i dont know wether it will work with more than 250
lines of PL SQL code.
the o/p mean OUTPUT.
let me know if you want to know anything else.
Erland Sommarskog wrote:
> Lucky (tushar.n.patel@.gmail.com) writes:
> > Here i'm pasting the sql code that i want to run. the code is ment to
> > fetch datbase list and update each database with some specific business
> > logic.
> > DECLARE authors_cursor CURSOR FOR
> > SELECT sp_databases
> There is no table?
> > OPEN authors_cursor
> > FETCH NEXT FROM authors_cursor
> > INTO @.Database_name, @.database_size, @.Remarks
> > WHILE @.@.FETCH_STATUS = 0
> > BEGIN
> > print 'database : ' + @.Database_name
> > print 'some business logic'
> > FETCH NEXT FROM authors_cursor
> > INTO @.au_id, @.au_fname, @.au_lname
> > END
> > CLOSE authors_cursor
> > DEALLOCATE authors_cursor
> > NOTE:
> > please notice the use of procedure to get list of the database in the
> > select statement of the DECLARING CURSOR. i want to use stored
> > procedure's o/p to iterate through the rows returned by the procedure.
> What does "o/p" mean?
> It would be interesting to know what "some business logic" contains.
> It's possible that you could use sp_MSforeachdb:
> EXEC sp_MSforeachdb N'SELECT db = ''?'', COUNT(*) FROM [?]..sysobjects'
> This procedure is undocumented and not supported from Microsoft, so
> you would have to look into the source code for the gory details on
> how it works. But basically it iterates over all databases, and
> run as the SQL statement once for each database. ? works as placeholder
> for the database name.
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/pr...oads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodin...ions/books.mspx|||Lucky (tushar.n.patel@.gmail.com) writes:
> yeah there is no table. its just a database list that i need.
So how does the actual cursor declaration look like? The code you
posted was incorrect, as it referred to a non-existing column. It's
very difficult to assist when I don't really know what you are trying
to do.
> and the business logic is very very big to paste here. i need some
> different tables in different DB and the idea of using the foreachloop
> is interesting but i dont know wether it will work with more than 250
> lines of PL SQL code.
PL/SQL? What are you using? MS SQL Server or Oracle?
To me it sounds very funny of wanting to run 250 lines of business logic
in multiple databases. I can envision situations where this may be
necessary, but I can also see this as a result of a poor design.
If you explained what your are actually trying to achieve in business
terms, it may be easier to suggest a good solution.
For a general discussion on multiple databases, this section in my
article on dynamic SQL may give some ideas:
http://www.sommarskog.se/dynamic_sql.html#Dyn_DB.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||I'm quite dissappointed with your Questions. what i wanted to do so far
is to use output of the stored procedure in the select statement of the
Declaring CURSOR. but you have diverted the conversation on the
different track.
-- first i clearly said in my first post that i'm using MS SQL Server
2000 and .NET 2.0
-- for your convinience i gave you expamle of declaring cursor that i
had copied form the ms sql help but instead of understanding the
problem you complained about the syntaxt though that example was for to
understand the problem but you missed the target.
-- PL SQL is of course in Oracle to write some custom business logic.
the same way you can do in SQL Server the name used in here is T-SQL.
it shouldn't be hard for you to understand.
-- As far as i know, nobody ever asked me what kind of business logic i
want to use. we always disscus problems here and asked for the
solution.
-- what kind of businees logic i'm using and why i'm using and what
should be the size of the logic. these all depends on the requirements
and the scererios. i didn't ask your opinion on that.
We have streached the conversation to far and i dont want to continue
it further more.
thanks for nothing. and by the way i found what i was looking for.
Lucky
Erland Sommarskog wrote:
> Lucky (tushar.n.patel@.gmail.com) writes:
> > yeah there is no table. its just a database list that i need.
> So how does the actual cursor declaration look like? The code you
> posted was incorrect, as it referred to a non-existing column. It's
> very difficult to assist when I don't really know what you are trying
> to do.
> > and the business logic is very very big to paste here. i need some
> > different tables in different DB and the idea of using the foreachloop
> > is interesting but i dont know wether it will work with more than 250
> > lines of PL SQL code.
> PL/SQL? What are you using? MS SQL Server or Oracle?
> To me it sounds very funny of wanting to run 250 lines of business logic
> in multiple databases. I can envision situations where this may be
> necessary, but I can also see this as a result of a poor design.
> If you explained what your are actually trying to achieve in business
> terms, it may be easier to suggest a good solution.
> For a general discussion on multiple databases, this section in my
> article on dynamic SQL may give some ideas:
> http://www.sommarskog.se/dynamic_sql.html#Dyn_DB.
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/pr...oads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodin...ions/books.mspx|||Lucky (tushar.n.patel@.gmail.com) writes:
> I'm quite dissappointed with your Questions. what i wanted to do so far
> is to use output of the stored procedure in the select statement of the
> Declaring CURSOR. but you have diverted the conversation on the
> different track.
Yes, I want to help you to solve the real problem.
I've been following technical newsgroups on Usenet for many years, and I
early made the observation that when people asked "funny questions" was
that they were trying to get from A to B, but instead they were asking
of how to get from C ro D, because they the way from A to C and from
D to B and now they were standing at deep ravine and not being able to
cross. While there in fact there was a straight motorway from A to B,
which was easy to point to, once the real problem had been uncovered.
> -- for your convinience i gave you expamle of declaring cursor that i
> had copied form the ms sql help but instead of understanding the
> problem you complained about the syntaxt though that example was for to
> understand the problem but you missed the target.
I'm afraid that those are the rules. If you cannot make yourself clear
what you are asking for, then you will not get very good answers. I'm
sorry, but while I'm good at SQL, I am not good reading other people's
thoughts.
> -- PL SQL is of course in Oracle to write some custom business logic.
> the same way you can do in SQL Server the name used in here is T-SQL.
> it shouldn't be hard for you to understand.
It happens frequently enough that people who use Oracle, MySQL or some
other engine post to this newsgroup, that I felt obliged to rule out this
possibility.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||i didn't get you. what do you mean by make myself clear? didn't i gave
you the example? check my post before. and i clearly said what i wanted
to know. in the same post. but instead of targeting the problem you
said there is a syntaxt mistake in the code.
The problem is quite simple to understand. and tha is HOW TO USE OUTPUT
OF THE PROCEDURE TO CREATE CURSOR.
is it very hard to understand? i didnt know the syntaxt and all i
wanted to know was the syntaxt.
but instead telling me that, you asked me what kind of business logic i
want to use. do it really matter to know how the cursor can be created
from the output of the procedure?
and if you are member of the group for years than you should at least
be experienced by now to understand what one is asking.
as far as i know. the example i've posted was of MS SQL SERVER wasn't
from Oracle. but you cared to know wether i want to use PL/SQL or
T-SQL? i didn't asked to optimize some code.
ALL I ASKED IS JUST ONE DEFINATION OF CREATING CURSOR.
Erland Sommarskog wrote:
> Lucky (tushar.n.patel@.gmail.com) writes:
> > I'm quite dissappointed with your Questions. what i wanted to do so far
> > is to use output of the stored procedure in the select statement of the
> > Declaring CURSOR. but you have diverted the conversation on the
> > different track.
> Yes, I want to help you to solve the real problem.
> I've been following technical newsgroups on Usenet for many years, and I
> early made the observation that when people asked "funny questions" was
> that they were trying to get from A to B, but instead they were asking
> of how to get from C ro D, because they the way from A to C and from
> D to B and now they were standing at deep ravine and not being able to
> cross. While there in fact there was a straight motorway from A to B,
> which was easy to point to, once the real problem had been uncovered.
> > -- for your convinience i gave you expamle of declaring cursor that i
> > had copied form the ms sql help but instead of understanding the
> > problem you complained about the syntaxt though that example was for to
> > understand the problem but you missed the target.
> I'm afraid that those are the rules. If you cannot make yourself clear
> what you are asking for, then you will not get very good answers. I'm
> sorry, but while I'm good at SQL, I am not good reading other people's
> thoughts.
> > -- PL SQL is of course in Oracle to write some custom business logic.
> > the same way you can do in SQL Server the name used in here is T-SQL.
> > it shouldn't be hard for you to understand.
> It happens frequently enough that people who use Oracle, MySQL or some
> other engine post to this newsgroup, that I felt obliged to rule out this
> possibility.
>
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/pr...oads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodin...ions/books.mspx|||Lucky (tushar.n.patel@.gmail.com) writes:
> i didn't get you. what do you mean by make myself clear?
That I did not understand what you was looking for. And I am sorry,
to that end I am the sole judge. You may know what you were looking
for, but that does not mean that you manage to convey that message.
> The problem is quite simple to understand. and tha is HOW TO USE OUTPUT
> OF THE PROCEDURE TO CREATE CURSOR.
And that is a such a strange thing to, thar there is all reason to ask
what you want really want to do. In fact, any question that involves a
cursor will be met with the suspicion that the cursor may not be needed.
But there is also one more reason to ask what you really want to do:
there may be several options, and which is the best one, depends on
your actual business problem.
Finally, please remember that on Usenet you never get less help than
you pay for.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||I'm agree with you on avoiding CURSORs and i always welcome suggestions
on doing things other ways.
the foreach loop you suggested me was a good suggestion. i already
tried that that to avoid cursor but the problem was with the bunch of
line to modify tables,procedures,views and all i wanted to do is to
write some logic to update all database rather than doing it manually.
i found the way out and i did it.
but you know when you are on job you have immense pressure on you and
that time you can't wait to explain everything. if it would be
something that i needed for more then 1 time then i would have
discussed the problem in more detail and of course also might welcomed
your suggestions.
i trully appriciate the help i get from groups and that is why i always
prefer groups then tutorials and books. Learning from others experience
is always better then anything.
Erland Sommarskog wrote:
> Lucky (tushar.n.patel@.gmail.com) writes:
> > i didn't get you. what do you mean by make myself clear?
> That I did not understand what you was looking for. And I am sorry,
> to that end I am the sole judge. You may know what you were looking
> for, but that does not mean that you manage to convey that message.
> > The problem is quite simple to understand. and tha is HOW TO USE OUTPUT
> > OF THE PROCEDURE TO CREATE CURSOR.
> And that is a such a strange thing to, thar there is all reason to ask
> what you want really want to do. In fact, any question that involves a
> cursor will be met with the suspicion that the cursor may not be needed.
> But there is also one more reason to ask what you really want to do:
> there may be several options, and which is the best one, depends on
> your actual business problem.
> Finally, please remember that on Usenet you never get less help than
> you pay for.
> --
> Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
> Books Online for SQL Server 2005 at
> http://www.microsoft.com/technet/pr...oads/books.mspx
> Books Online for SQL Server 2000 at
> http://www.microsoft.com/sql/prodin...ions/books.mspx