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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: jararaca
  • Order by date
  1. jararaca

    How do Rules work?

    Hi-- I routinely create constraints in my database tables, e.g., EndDate >= StartDate, etc. But I don't know of a way to create a constraint that works across tables. For example, let's say I have a 1:Many relationship between these two tables: Admission(AdmitID (PK), AdmitDate,...)...
  2. jararaca

    Combine Fields

    SELECT CONVERT(VARCHAR(10), Charge_id) + CONVERT(... AS FieldName FROM dbo.dbo_charges
  3. jararaca

    Virtual table?

    Is there a way to create a virtual table in a stored procedure that holds the results of a call to another stored procedure? In other words, say I have sp1. Can I do something like this in sp2: VirtualTable = EXEC(sp1 param1, param2) SELECT<field list> FROM VirtualTable If so, what is the...
  4. jararaca

    Calculation that spans rows (probably non-aggregate)

    Hi, I have a table with a column called AdmitDate and I need to know how many rows in that table have AdmitDates that are within 30 days of the AdmitDate of the previous row. I'm stumped about how to write such a query, or if it is even possible to do so. Can anyone please help? thanks
  5. jararaca

    Heterogeneous queries

    Hi, I'm trying to create a query in a database on one SQL Server that refers to a database on another SQL server. Even though the other Server is listed properly under "Security/Linked Servers," and all user permissions are correct, when I try to save the query, I get this error: "Error 7405...
  6. jararaca

    Parameter data type problem

    Thanks! I'll try these things.
  7. jararaca

    Parameter data type problem

    Hi-- I've got the following sp (not sure how to demark code in this forum): ======================================================= CREATE PROCEDURE dbo.UP_Get_Program @PACEId INT AS DECLARE @Program VARCHAR(7) SET @Program = (SELECT Program FROM...
  8. jararaca

    ALTER TABLE to add column with nulls

    How do I use ALTER TABLE to add a column that allows nulls? Thank you!
  9. jararaca

    Ref integrity constraint for tables in diff db

    Well, thanks for the reply, anyway! I'm trying to figure out why that would not be allowed. If a database is a model of a miniworld, and a miniworld can relate to other miniworlds, you'd think that something like this should be allowed... Another way of looking at it is that miniworlds are just...
  10. jararaca

    Ref integrity constraint for tables in diff db

    How, if it is possible, does one set up a foreign key in one table to point to a primary key in a table that's in another database (same server)? Thanks.
  11. jararaca

    Short Circuit?

    When you use an OR, will SQL Server evaluate the left part before it determines it is necessary to evaluate the right part? You know what I mean? For example: a = 1 or b = 2 If a = 1, it's not necessary to evaluate the b = 2 part. Is SQL Server smart enough to figure this kind of thing out...
  12. jararaca

    How to access dbs on different serves

    Thanks. It doesn't want to open it when I double-click on it, and judging by the icon, the file does not seem to have an association. When I open it in a text editor or Explorer, tt seems to be an XML file. How do you open it to view it properly? Thanks, again.
  13. jararaca

    How to access dbs on different serves

    Thanks for the reply. Please pardon the ignorance, but how do I access bol? Thank you!
  14. jararaca

    How to access dbs on different serves

    Hi, How do I refer to a database on a different SQL Server from inside a view or stored procedure? Both servers are registered in MMC (or Enterprise Manager). Thank you!
  15. jararaca

    Get view timestamp?

    Does anyone know of a way to get the date and time that a view was last changed? I've tried looking in the sysobjects table, but it doesn't seem to be there... Thanks
  16. jararaca

    Simple date question

    Thank you, all, very much.
  17. jararaca

    Simple date question

    Hi-- I need to update all rows in a table that have a date in a datetime field that comes after a certain date. I'm not sure how to write that. ... WHERE DateTimeColumn >= '9/1/2005' I must need to convert the string value at the end of this WHERE clause to an actual datetime? Can someone...
  18. jararaca

    Modular stored procedure?

    Thank you very much for the replies. I guess I'll just leave things as they are, in that case. :)

Part and Inventory Search

Back
Top