Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by pdbowling

  1. pdbowling

    SMO db.StoredProcedures not finding stored procedures in different schema by name.

    Hello, Everyone. While I do not completely understand why I can't seem to find the stored procedure I am looking for by name straight from the collection, I did come up with a solution. If you use Linq, you can find your item. StoredProcedure storedProcedure =...
  2. pdbowling

    SMO db.StoredProcedures not finding stored procedures in different schema by name.

    Hello, Everyone. I am using Sql Management Objects (SMO) in Visual Studio 2012 C#. I am attempting to instantiate a new StoredProcedure object from the db.StoredProcedures Collection. When I try to find a stored procedure in the [dbo] schema. It works fine. StoredProcedure sproc =...
  3. pdbowling

    Smo stored procedure creation.

    Hello, Everyone. I resolved this a while back. I came here to post another question and thought I would update this post for future search engine users. This won't compile out of the box since I am passing in variables to the method, but hopefully it will help someone in the future...
  4. pdbowling

    Querying a table name that contains underscore.

    Hello, All. I have a query where I am looking for tables that end in _AM. SELECT sch.[name] AS SchemaName, tab.[name] AS TableName FROM sys.Tables AS tab JOIN sys.Schemas AS sch ON tab.schema_id = sch.schema_id WHERE tab.[name] LIKE '%_AM' AND sch.[name] = 'dbo' I get back: dbo...
  5. pdbowling

    Smo stored procedure creation.

    Hello, Everyone. I am new to SMO, so I do not know the accepted methodologies. From my attempts, it appears that I am way off track on how to use this set of tools. Suggestions and guidance appreciated. This is the error. "An unhandled exception of type...
  6. pdbowling

    Where can I query clustered or nonclustered table pk?

    Thank you, gmmastros. That is perfect. fredericofonseca I googled these before posting. Just didn't find anything about clustering. This gets me my primary keys SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS AS tab JOIN INFORMATION_SCHEMA.CONSTRAINT_COLUMN_USAGE AS col...
  7. pdbowling

    Where can I query clustered or nonclustered table pk?

    I was curious if there was a way to query in tsql whether or not a table's key in clustered or not using table_name or object_id or whatever is best? Here is a table that has a clustered primary key set. I know that there are tables in my database that are Not clustered on the pk and I will...
  8. pdbowling

    Is there a way to query "Script table as"

    Hello, Everyone. I am trying to do some automated re-creation of some tables in Sql Server 2008. When you right click a table, you can choose 'Script table as' and get everything you need to know to re-create the table. I was curious if there was a way to do this using tsql that I could read...
  9. pdbowling

    Not clustering on identity.

    Certainly looks like it worked. Scripted table. CREATE TABLE [dbo].[BendInspection]( [BendInspectionID] [int] IDENTITY(1,1) NOT NULL, [TemplateVersionID] [uniqueidentifier] NOT NULL, [ReportTypeID] [int] NOT NULL, [ReportID] [uniqueidentifier] NOT NULL, [GeneralInformationInspectionDate]...
  10. pdbowling

    Not clustering on identity.

    Good day everyone. My boss said to me 'Do not put a clustered index on the identity. I want to look at the data later and decide what to cluster on.' I have a snippet of code. It functions, but I am not sure that I completely grasp what is happening when I run it. Here is my snippet that I...
  11. pdbowling

    Sort an html table by day of week.

    Hello, All. I have an html table. The first column is a drop list with the days of the week in it Sunday through Saturday. Second column is two text boxes for start time and end time. The other column is a drop list (true/false). In the html, each row (other than the header) has a GUID for...
  12. pdbowling

    What version of Outlook am I using?

    Hello, Everyone. For years I went to the File Menu and chose Help->About and that would tell me everything about my version on the About Page. Then Outlook switched to the Ribbon and Tabs and got rid of the File Menu. At that point, I would click the File Tab and 'Help' was an option there...
  13. pdbowling

    Dynamic query result set

    Thank you for your input everyone. @bborissov. Yes, the sql certainly runs in the EXEC() but it does not return the record set to the stored proc. I need to manipulate the table. @gk53. Very good point. @SaltyTheFrog. Thank you. I will see how this affects race conditions for nearly...

Part and Inventory Search

Back
Top