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

  1. gmmastros

    Commas in CSV fle

    This was not a simple mistake. It required knowledge of both commands, Print and Write. It also required knowing the nuanced difference between them. Regardless, I'm glad you got your problem sorted.
  2. gmmastros

    Commas in CSV fle

    From here: https://learn.microsoft.com/en-us/office/vba/language/reference/user-interface-help/writestatement The link here takes you to VBA documentation, which can sometimes be different from VB6, but in this case, they are the same.
  3. gmmastros

    Commas in CSV fle

    Try changing Write #intF, sNewLine to Print #intF, sNewLine
  4. gmmastros

    Commas in CSV fle

    This is probably an easy fix, but I think more information would be helpful. Are you starting with a CSV file, or are you creating it? If you are creating it, what is the source? What does your code look like now?
  5. gmmastros

    Need help creating a date from two fields to be used in where clause

    You'll need to be very careful here. Storing a month as the name ("January", "February") can be problematic because of typos and whatnot. Regardless, since you want to compare these things as dates (as you should), you will need to also have a "day" component, specifically, which day of the...
  6. gmmastros

    Group results into one row

    Try this... SELECT ProductCode, CASE WHEN PackStatus = 10 THEN 'Free' WHEN PackStatus = 11 THEN 'Allocated' ELSE 'Received/Reconciled' END AS Status, Min(CASE WHEN Length = 2.4 THEN Packs ELSE NULL END) AS [2.4], Min(CASE WHEN Length =...
  7. gmmastros

    Buttons not aligned after another button is clicked

    Feherke, First, I agree with your assesment of the problem. It seems to me that there are several ways to solve this problem by setting display to: 1. inline 2. unset 3. (empty string) Setting the display to inline would only work if the element was set to inline previously. If there was...
  8. gmmastros

    select a single row based on conditions in multiple rows

    What you have here is considered an Entity-Attribute-Value table. https://en.wikipedia.org/wiki/Entity%E2%80%93attribute%E2%80%93value_model This type of table structure is fairly decent when storing "sparse" data, but doesn't do so well otherwise. The problem with this type of data structure...
  9. 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...
  10. gmmastros

    SSMS question

    The keyboard shortcut is CTRL-SHIFT-R. This refreshes the intellisense cache and prevents the red squigglies.
  11. 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...
  12. 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...
  13. 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
  14. 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...
  15. 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...
  16. 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...
  17. 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...
  18. 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...
  19. 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...
  20. 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...

Part and Inventory Search

Back
Top