655 Posted Topics

Member Avatar for nagatron

I believe line 4 should be a concatenation like so: Shell "cmd.exe /c " & command Not sure if your command will execute, but at least the Shell part will be right. Good luck!

Member Avatar for Nutster
0
14K
Member Avatar for CriticalError

Yes, there is a handy little function called "LOWER()" and it's sister function "UPPER()" that can be used to change the case of character data. So you'd do something like: select lower(pName) as PageName from dbo.Pages That will change every upper-case character in the string to lower-case. Hope that helps. …

Member Avatar for BitBlt
0
93
Member Avatar for PinoyDev

The problem is that a PIVOT clause can only provide aggregations on a base column, not on a calculated or aggregated column alias. Try this. After line 98, add the clause "into #temp1" to push the results into a temp table. Then, after line 129, put the following: select * …

Member Avatar for BitBlt
0
200
Member Avatar for Andyjava
Member Avatar for manhthaodn

Cascading delete is something that you set up when you are creating your referential integrity constraints. If it isn't set up, you have to alter your constraint to include the clause "ON DELETE CASCADE". Look in the SQL Help system, and search using the term "table_constraint". It has full syntax …

Member Avatar for BitBlt
0
86
Member Avatar for PhilEaton

You can't really mix-and-match declarative join syntax with explicit join syntax. So, for instance, you'd have to have each table joined to each other table like so: ... from demographics inner join IndexPID on IndexPID.NDoc_Number = Demographics.NDoc_Number inner join PatientSupply on PatientSupply.NDocNum = Demographics.NDoc_Number ... or like this: ... FROM …

Member Avatar for PhilEaton
0
180
Member Avatar for johncornelius23

From the help system, "ADO Error Codes": *adErrInvalidConnection 3709 0x800A0E7D The application requested an operation on an object with a reference to a closed or invalid Connection object. * So that tells me you have either a) not properly opened your connection object (but we can't see what's in the …

Member Avatar for BitBlt
0
307
Member Avatar for PinoyDev

Not sure exactly what you're asking for here. "Best" is sort of context-dependent. If you just want a common connection string, make a module-level or global variable to hold the value you want. Usually, it is of the form: Global Const ConnectionString = "provider = microsoft.jet.oledb.4.0;data source = c:\working\db1.mdb" where …

Member Avatar for AndreRet
0
1K
Member Avatar for Portgas D. Ace

A man and his friend were hunting in the woods. They weren't having any luck finding anything, so the friend suggested they split up. So the man bumbled through the thickest part of the forest and eventually came upon a sunny meadow. In the middle of the meadow was a …

Member Avatar for vinnitro
2
254
Member Avatar for schielrn

This little query ought to get you what you want: select t1.location, t1.custnum from #temp t1 left join #temp t2 on t1.location = t2.location and t1.custnum = t2.custnum and t1.driver <> t2.driver where t1.driver = 'dwcustcomm' and t2.driver is null You could always change it to "select distinct blah.blah..." if …

Member Avatar for schielrn
1
158
Member Avatar for Blank808

After reading the original request, I wonder if the OP is really asking for: "How would I COUNT the NUMBER of negative numbers in a listbox" rather than "ADDING UP the total of the numbers in the list, regardless of whether they are positive or negative". Might be something like …

Member Avatar for BitBlt
0
359
Member Avatar for johncornelius23

You are trying to set the variable "con" to be a new connection. It is defined as a Recordset object.

Member Avatar for QVeen72
0
211
Member Avatar for Afupi

Your request is a bit confusing. You appear to be asking for several different things, each of which should require it's own statement or stored proc. Your scenario needs further explanation. For example, is your Event table used like a transaction to pass forward and trigger some action, or is …

Member Avatar for Afupi
0
99
Member Avatar for sillyboy
Member Avatar for jonny_tech_brat
Member Avatar for teppuus

First, allow me to express my sympathy at losing a co-worker. Regardless whether he was your friend or associate, it is always a blow to a department or organization. On to technical stuff: It appears that if he passes a number other than zero as the parameter, it clears only …

Member Avatar for teppuus
0
121
Member Avatar for Sadun89

Could be any number of scenarios. Three examples are above, but there are others: 1. Input is always sequential or unordered, you could use a flat file. 2. Output is unordered or chronological, you could use a flat file. 3. Input is streamed or random, use a service endpoint. 4. …

Member Avatar for Sadun89
0
3K
Member Avatar for john.gale.92102

You probably won't get any help until you supply more specifics. You are not supplying nearly enough detail for us to evaluate your situation.

Member Avatar for BitBlt
0
112
Member Avatar for tudorH

The problem is that your primary key in ProductTrans consists of TWO columns, not one. Therefore, you either have to change your foreign key references in CustomerValue to point to Product and to Sprint, or you need to combine them into a single constraint pointing to ProductTrans with both columns.

Member Avatar for BitBlt
0
269
Member Avatar for M.Waqas Aslam

You kind of have to do this in two parts. First, select data from the two tables into a temp table, then use the temp table to select and sort Try this: select '1' as tblName, ContactPersonId, [Name] into #temp1 -- here is where the temp table is created from …

Member Avatar for M.Waqas Aslam
0
250
Member Avatar for WolfShield

Q: How many programmers does it take to change a light bulb? A: Can't do it...it's a hardware problem.

Member Avatar for itzarun
0
1K
Member Avatar for nquadr

I ran this test code and it seemed to work fine: Sub fred() Dim wb1 As New Excel.Workbook Set wb1 = ActiveWorkbook wb1.ActiveSheet.Cells(Rows.Count, 1).End(xlUp).Select End Sub It seemed to work for me. How are you instantiating the wb1 variable?

Member Avatar for samsylvestertty
0
106
Member Avatar for Yomet

The closest you're going to get is with a system stored proc called sp_testlinkedserver. Use the following snippet to do what you need: BEGIN TRY exec sp_testlinkedserver BKP01 print @@error PRINT 'DBName available.' END TRY BEGIN CATCH print @@error PRINT 'DBName not available.' END CATCH This should at least get …

Member Avatar for cutepinkbunnies
0
5K
Member Avatar for Sadia fatima

Short of dropping/recreating the table, the only way to reset the identity values is to issue a TRUNCATE statement. Then the identity value for identity column for that table will reset to the seed value specified at create time. Keep in mind that TRUNCATE gets rid of ALL the rows. …

Member Avatar for cutepinkbunnies
0
775
Member Avatar for sneekula

If you want them just building web pages, then PHP is fine. But if you want them to be PROGRAMMERS, I think you can't go wrong with QuickBasic (you can still find v4.5 online). It doesn't require them to be computer scientists to start, and gives them lots of room …

Member Avatar for Sanchixx
0
482
Member Avatar for jovillanuev

Actuall, @ChrisHunter, putting a GO in between the statements will separate batches so you'll just lose your variable declarations. Try it. To the OP, you're not giving us a lot of information. What is the error you get? Which statement is erroring? Can we assume the dbo.getCombinedDateTime is a user-defined …

Member Avatar for BitBlt
0
193
Member Avatar for sharmstr

I assumed that you wanted each new order number to start with line number 1 like so: 12345-1 12345-2 12345-3 23456-1 23456-2 etc. After playing a little fast and loose with your sample query and test data, here's what I came up with: [CODE]select cast(ord.orderNumber as varchar(5)) + '-' + …

Member Avatar for sharmstr
0
131
Member Avatar for mattclifton

Couple of things. 1. You shouldn't have to create a database prior to doing your restore. 2. If you HAVE created a database, run the restore command with a "WITH REPLACE" in addition to your "MOVE" clauses, like so: restore database db203021561 from disk='c:\temp\db203021561.bak' with replace, move 'db203021561' to 'c:\temp\db203021561.mdf', …

Member Avatar for BitBlt
0
728
Member Avatar for Mourin @ Dell

"Be kind to your staff...you never know but that you might wind up working for them someday!" (And yes, this actually did happen to me)

Member Avatar for BitBlt
0
155
Member Avatar for neoseeker191

Interesting...I googled your question and found this: [URL="http://stackoverflow.com/questions/6037501/sql-data-hierarchy"]http://stackoverflow.com/questions/6037501/sql-data-hierarchy[/URL] It appears you got an answer to this yesterday at a different web site. Why are you posting the same question here?

Member Avatar for Momerath
0
4K
Member Avatar for twistercool

Or, depending on what database you're using and how fancy you want to get, you can use ODBC or OLEDB connectivity to connect to your database server.

Member Avatar for twistercool
0
238
Member Avatar for webecedarian

I was going to be sarcastic and tell you to use google to look for 'best "best lists"'. Then I actually did that...and it turns out there are HUNDREDS of them. So should I google for "best 'best "best lists"' lists"? I think I just punked myself. My head is …

Member Avatar for vegaseat
0
193
Member Avatar for SBA-CDeCinko

Could be any number of things causing it. Not knowing your table structures or your data volumes, I can only recommend generic things to try, such as: 1. Are your tables indexed? If not, you might try indexing them. 2. Are your tables volatile? As in, lots of random inserts/updates? …

Member Avatar for BitBlt
0
127
Member Avatar for watoth

To expand on @JorgeM's idea, you might also consider wrapping all the updates inside a transaction to ensure that you can rollback if there are problems with one of the updates.

Member Avatar for BitBlt
0
621
Member Avatar for Parloverde

Also, you have to put actual global variables in a Module, not in a Form. Your best bet is to alter your project to use Startup Object "Sub Main" rather than a form. To do that, create a module, put in a subroutine named "main" that loads your initial form, …

Member Avatar for Parloverde
0
2K
Member Avatar for ISAYA VAIMBA

Sorry, we don't just hand you code on request. If you've already tried something and it doesn't work, post that and we can help you fix it.

Member Avatar for Jx_Man
0
67
Member Avatar for G_Waddell

I was not able to duplicate your error. More detail on your scenario is necessary. What are the datatypes of the columns? What are the join criteria? Are there selection criteria being used when you execute? What version of SQL Server are you using? How about some sample data?

Member Avatar for G_Waddell
0
153
Member Avatar for NetJunkie

I started coding professionally with COBOL in 1984. Since that time I've learned a few other languages (about 17) and other platforms/technologies to try and stay relevant (and employed :D)

Member Avatar for Reverend Jim
0
967
Member Avatar for Silentme

I sort of agree with @debasisdas...seems like your approach is overly complicated. However, if you are determined to do it the way you want to do it, try this: Every time you click on one of the labels, store its name in the form's Tag property. Then, when you click …

Member Avatar for mustaffa hasan
0
3K
Member Avatar for Labdabeta

QWERTY...until I can get the USB port surgically installed in the back of my neck. :-)

Member Avatar for hekri
0
147
Member Avatar for poojavb

If I'm not badly mistaken, it appears you guys are all missing the OP's point here. If I may make an assumption or two here, it appears that there is no "patient" table...there are TWO "patient" tables...one for InPatients and one for OutPatients. And, they don't relate to each other …

Member Avatar for poojavb
0
165
Member Avatar for suganyar

What have you already tried? We don't usually provide detailed help if you don't show any effort first. However, I'm feeling charitable today, so I can point you in the right direction. Depending on when you want to display information (as in "When the mouse gets there" or "When the …

Member Avatar for Jeff-Bennett
0
1K
Member Avatar for weeraa
Member Avatar for donjt81_yahoo

Your best bet is to use SSIS to import the spreadsheet into a work table (not a temp table!) and execute the update join from there as an "Execute SQL Task". Maybe something like this: ~~~ mssql update a set a.newproductcode = b.newproductcode from dbo.product a inner join dbo.wkProduct b …

Member Avatar for codemasters
0
183
Member Avatar for Pamilerin

You can't assume that the autoincrementing ID's will match up, so I'm pretty sure @Hearth's solution would not get the desired results. It might be useful to know more about your source table. Is there a unique natural key to use? If so, you could LEFT JOIN to Portfolio on …

Member Avatar for Pamilerin
0
231
Member Avatar for moone009

Change your fourth line to look like this: set @sqlstring = 'use ' + @DB + '(select * from Address where Customer like ''%''''%'')' Notice that there are now four single-quotes between the percent-signs. I tested this in SQL2005 Standard Edition, but it should also work with Developer Edition.

Member Avatar for BitBlt
0
139
Member Avatar for silvercats

UML is the acronym for Unified Modeling Language. It is a set of diagrams and supporting text used to represent how an automated system should behave. It is based on the merging of the work of three different OO methodologists: Grady Booch, Jim Rumbaugh and Ivar Jacobsen. Each of them …

Member Avatar for BitBlt
0
142
Member Avatar for jbennet

It looks like the code tags parser is doing funny stuff with VB code. Check out the code I posted in this thread: http://www.daniweb.com/software-development/visual-basic-4-5-6/threads/417632/need-urgent-help Specifically, when a single-quote is used to include a comment at the end of a code line, the parser seems to erroneously highlight the following line …

Member Avatar for Airshow
0
2K
Member Avatar for jumpthattb

My guess is that your final SQLString has an extra "AND" after all the selection criteria. So, when you concatenate the " order by" to the end, you wind up with "...myCriterion1 = 'A' and myCriterion2 = 'B' and order by Policy_No". You'll need to strip off the last "and" …

Member Avatar for BitBlt
0
206
Member Avatar for Raihanorium

What have you tried already? Actually, I also wanted to say that in order to get any help at all, you need to supply a LOT more detail about your data structures, your data, and your expected result. Example: What are the datatypes of the columns? What are the constraints …

Member Avatar for Raihanorium
0
4K

The End.