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 Mike Lewis 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: *

  1. gmmastros

    Status of dBase?

    I haven't touched a dbase file in.... a couple months. It is common for map data to be distributed in "Shape Files". Each map layer has it's own set of shape files. For example, street centerlines.... the shape files are a set of files. One for the config, One for the index, one for the...
  2. gmmastros

    SSMS question

    The keyboard shortcut is CTRL-SHIFT-R. This refreshes the intellisense cache and prevents the red squigglies.
  3. gmmastros

    split one row into multiple rows... help pls

    Your expected results are a little weird with respect to the dates. There are various methods of creating multiple rows from a single row. You could join to a table that has multiple matches, this is a bit more complicated but can sometimes work well depending on your situation. In this...
  4. gmmastros

    SQL Performance

    Greg, I think you're looking at the details instead of the bigger picture. I can probably count on one hand the number of times I've needed to rename a column within a table. I encourage you to step back and think about why you want to rename a column. I suspect this is to facilitate reporting...
  5. gmmastros

    PK-FK Relations

    May I ask... what is the point of analyzing this database? Is the ultimate goal to improve performance? -George Microsoft SQL Server MVP My Blogs SQLCop twitter "The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom
  6. gmmastros

    Where do we put public functions in C# (modules don't exist) ?

    You can use a static class and static methods to do this. Ex: public static class Anything { public static void Search() { MessageBox.Show("Did you find it?"); } } Then, anywhere else in your code, you can do this.... Anything.Search(); In this example, the...
  7. gmmastros

    Insert into query adds records to unreadable format, how do I change that?

    Be very careful about changing the collation of anything. This is a very complex issue and should not be taken lightly. Collations do not affect how the data is stored. It only affects how data is sorted and compared. There is a default collation on the SQL Server instance. This is used...
  8. gmmastros

    Field types question

    I've changed my mind numerous times throughout my career. Initially, I was in the camp, "shortest fields possible", but in recent years it's morphed into "Shortest possible with wiggle room". To be clear, I rarely use marchar(max) unless it's a Notes column, because then you never know. Max...
  9. gmmastros

    VB6 Post to webservice with MSXML2 error

    strongm, Thanks for the advice. Unfortunately, I get the same error. Error: The connection with the server was terminated abnormally Code: 80072EFE Source: WinHttp.WinHttpRequest I think you know what my product name is, so I was wondering if you had an opportunity to run the code and whether...
  10. gmmastros

    VB6 Post to webservice with MSXML2 error

    I have code in VB6 that sends a web request to my server to pass and get data. Once upon a time it was working, but now it's not. To be clear, this is used in a VB6 app that is distributed to my customers. It passes a webrequest to a web server that I fully control. I mention this because I...
  11. gmmastros

    Is "IF EXISTS()..." better than "IF (SELECT COUNT...) > 0"

    If the execution plan is the same, then it really doesn't matter which one you use. Even with the same execution plan, the EXISTS version is probably faster, but only by a couple of clock cycles (too small to measure). I would encourage you to always use the right tool for the job. Sometimes...
  12. gmmastros

    Update with a month name

    We're in the weeds now. Implicit data type conversions can cause weird, previously unknown problems to surface. Based on my previous post, it should be clear that when an implicit conversion exists between string (varchar et al) and number, sql server prefers to convert to number. This is a...
  13. gmmastros

    Update with a month name

    There is an article that talks about how implicit conversions are done. It can be found here: https://learn.microsoft.com/en-us/sql/t-sql/data-types/data-type-precedence-transact-sql?view=sql-server-ver16 There is also a SQL_VARIANT_PROPERTY function that can give you information regarding...
  14. gmmastros

    Connection String in .NET program Config File

    You can use whatever port you want, but there are some configuration settings that you need to set. 1. You need to make sure that the SQL Browser service is running on the database server machine. The SQL Browser service converts an instance name to a port number. If you use default port 1433...
  15. gmmastros

    Help with Json

    This may not be the best solution, but... I usually work in C#, so you will need to convert this to VB, which should be relatively simple. Whenver I do something like this, I create a C# object to hold the data, something like this: public class ApiData { public bool success...
  16. gmmastros

    How to display part number based on search string by chemical id ?

    Try this: select cp.chemicalid,cp.partnumber from #chemicalParts cp inner join #chemical c on c.chemicalid=cp.chemicalid and [!]cp.partnumber like Replace(StringPart, '*', '_')[/!] The underscore character is the single character wilcard, not the ?. -George Microsoft SQL Server MVP My...
  17. gmmastros

    Connection String in .NET program Config File

    There are a lot of reasons why this might fail. Chris mentions many of them. I have a customer that was having a similar problem connecting to SQL Server. After hours of digging, turns out they had a DNS problem. On the server, run ipconfig in a command prompt and take note of the IP address...
  18. gmmastros

    Transaction with SELECT and UPDATE with XLOCK causing deadlocks

    Hmmm.... Indexes on tiny tables have a lot less impact than larger tables. On the other hand, having another index on a tiny table won't have any detrimental impact either. Personally, I would probably leave it there. -George Microsoft SQL Server MVP My Blogs SQLCop twitter "The great things...
  19. gmmastros

    Transaction with SELECT and UPDATE with XLOCK causing deadlocks

    For your index, I would suggest: Create Index idx_IdentifierTable_Type_Identifier On IDENTIFIERTABLE(Type, Identifier); You could create an index only on Type, but then SQL Server would check the index and then go back to the table for a row look up. If you put both columns in the index, SQL...
  20. gmmastros

    Transaction with SELECT and UPDATE with XLOCK causing deadlocks

    Actually... 20 years, 1 month and 2 days. I think all this means is that you are older than you think. [bigsmile] -George Microsoft SQL Server MVP My Blogs SQLCop twitter "The great things about standards is that there are so many to choose from." - Fortune Cookie Wisdom

Part and Inventory Search

Back
Top