655 Posted Topics

Member Avatar for Fahhad

You also have a stray semicolon on line 7. Get rid of that and do as @KirstyHunter says, and it at least compiles and returns a result. The next obvious question is, what do you expect it to return? When I ran mine it returned a negative number. I can't …

Member Avatar for BitBlt
0
249
Member Avatar for moone009

This assumes you are using SSMS 2008 or above. First, open a new query window, then type your query, specifying the NOCOUNT option: [CODE]SET NOCOUNT ON select * from #tmpRPLRouting where propertydatamap = '3' [/CODE] Then right-click and select Results To->Results To Text. Then, right-click and select Query Options... (down …

Member Avatar for hrothenb
0
126
Member Avatar for <M/>

VB, SQL, COBOL, C, C++, Java, Adabas/Natural, IDEAL, FORTRAN, Smalltalk, Actor, ObjectVision, 360 Assembler... Oh, wait...HUMAN languages? <dang> Maybe that's been my problem all these years...it's really hard to pick up chicks in COBOL...

Member Avatar for Lucaci Andrew
0
420
Member Avatar for aVar++

I saw this quite a few years ago...not my work but very clever...Asciimation version of Star Wars! http://www.asciimation.co.nz/

Member Avatar for <M/>
1
404
Member Avatar for TheBrick

Or you could have a conversation with your employer and indicate you'd like to get some training or spend some time investigating a new innovative use of technology. Give them a chance to respond. I did that with my employer and I'm now happily coming up to speed on programming …

Member Avatar for TheBrick
0
183
Member Avatar for asif49

You could also spend the time googling tutorial or forum sites for the technology of your choice, either to get insight into "best practices" or to learn something new. Another alternative is to actually avoid web-surfing and build some mini-projects of your own that might help you hone your own …

Member Avatar for BitBlt
0
316
Member Avatar for Bile

Where to start? In your first statement, I assume you might be retrieving more than one row. So that means that you might have a non-EOF condition based on user-name. However, as you cycle through the rows, you might not get a match based on the additional criteria of YEAR …

Member Avatar for BitBlt
0
202
Member Avatar for nitin1
Member Avatar for <M/>

One of the greatest philosophical questions (in my humble opinion): "If is is is, is not is not is not?" Think about it... ;-)

Member Avatar for <M/>
0
389
Member Avatar for <M/>

Anything having to do with "The Most Interesting Man In the World" (Dos Equis Beer), and the Old Spice ["I'm on a horse"](http://www.youtube.com/watch?v=VX5au0LOJp8) commercials (don't remember the name of the fellow in them).

Member Avatar for <M/>
0
185
Member Avatar for rishif2

"TRUNCATE" is not a valid SQL statement for MS Access. It will work fine with MS SQL Server, though. For MSAccess you have to delete the rows with a DELETE statement. As a separate issue, you may also want to consider not using a recordset object for deleting all the …

Member Avatar for AndreRet
0
2K
Member Avatar for SyncMaster170

First off, your date criterion in your sample data is outside the bounds of the "BETWEEN". That's the most obvious thing. But that's not the real problem. Your problem is in all the "AND"s and "OR"s. If you think about it logically, what you are saying is that the ServiceCode …

Member Avatar for BitBlt
0
215
Member Avatar for dwiniers

From the Platform SDK help file, Database and Messaging Services, Microsoft Data Access SDK, Microsoft ActiveX Data Objects, ADO Programmer's Reference, Error Codes: [QUOTE]adErrInvalidArgument 3001 0x800A0BB9 The application is using arguments that are of the wrong type, are out of acceptable range, or are in conflict with one another. adErrItemNotFound …

Member Avatar for AndreRet
0
2K
Member Avatar for bnitishpai

There are a couple of ways to do it, depending on what version of SQL Server you are using and how detailed you need to get. First, in your query tool of choice (usually Management Studio) point to the database you're interested in, then use one of these: --for SQL2000 …

Member Avatar for code739
0
206
Member Avatar for <M/>

I vote for infrared...especially during winter...help people out, stay toasty warm at the same time. :-)

Member Avatar for diafol
0
414
Member Avatar for angel06

Not quite sure what you're asking for here. Do want the day of the week as a word (e.g. "Monday", "Thursday", etc.) or a day number (Sunday = 1, Monday = 2, etc.)? Day of the month? Anyway, the thing you should look into is the FORMAT statement. Here's a …

Member Avatar for vonnoy
0
148
Member Avatar for Stuugie

There are several approaches you could take. It all depends if you want to exclude the rows before the load. Given the small proportion of rows to exclude, I would suggest you just go ahead and load the entire CSV into the database, then as a next step, join that …

Member Avatar for BitBlt
0
141
Member Avatar for The Dude
Member Avatar for nitin1

> Or just relax, go to the beach and watch the girls go by. ... > Android development is great, Or you could combine both of these activities and create FemBots like Dr. Evil from Austin Powers! :-)

Member Avatar for nitin1
0
526
Member Avatar for mada.hauptfleisch

The problem is line 7. You're testing to see if there's a decimal point, then testing if there is a non-zero number after the decimal point...if there is, you return NULL. I'm not sure what you want to accomplish with that test...if you put in (for instance) 1234.0 then the …

Member Avatar for BitBlt
0
234
Member Avatar for jacksantho

Since @id is a character column, you have to make sure that you have the requisite quotes surrounding it when the @sql variable gets populated. Your line 10 should look like this: SELECT @sql= 'select @total = count(*) from details where id='''+ @id + '''' The rest of it is …

Member Avatar for BitBlt
0
210
Member Avatar for Hers2keep

Okay, so you are probably not going to like this solution, but it will work. Please study it carefully because there are nuances in it, and I don't have time at the moment to walk you through it. If, after using this, you still have questions then please post them …

Member Avatar for BitBlt
0
152
Member Avatar for silvercats

Not quite sure what you're asking for here. What do you mean by "derived attribute"? If it is simply to derive an "AGE" column in a select statement, then you can just use the DATEDIFF function and specify the years between the DOB column and GetDate(). If you're looking for …

Member Avatar for barb.saunders.5
0
4K
Member Avatar for ravenous

In your "row.xml" file, change lines 25-26 and 32-33 from: android:layout_width="0dip" android:layout_height="fill_parent" to: android:layout_width="wrap_content" android:layout_height="wrap_content" I tested this and it seemed to work fine after that little change.

Member Avatar for ravenous
0
153
Member Avatar for silversurf

So, is there an actual questions here? Some specific thing you're stuck on? Or are you just asking someone to build a report for you? If that's what you're expecting, I think you will be terribly disappointed.

Member Avatar for silversurf
0
363
Member Avatar for Stuugie

Seems that on the surface your problem doesn't sound like it should be giving you difficulties. Questions: 1. Is the combination of vSeries_Geography and vSeries_Type from the staging table enough to uniquely identify one row in the table tblVseriesList? 2. Is there a special reason you have created referential integrity …

Member Avatar for Stuugie
0
233
Member Avatar for bhavna04

Break one of the candles in half, then break one of the halves in half again. You now have a quarter-candle. Now light the whole candle, burn it until it is the same size as the quarter-candle. This assumes, of course, that there are MATCHES in the room. Just sayin... …

Member Avatar for Reverend Jim
-1
265
Member Avatar for Lethugs

This one was kind of tricky, due to the limited amount of test data you supplied. The trickiness came in when you realize that any single item should only be counted ONCE, regardless of the number of times it gets transferred. Therefore (if I got this right) you might have …

Member Avatar for Lethugs
0
286
Member Avatar for toldav

In order to use a derived table in MS SQL Server, you have to give the derived table an alias like so: -- // This is my update code insert into invoice select next value for inv_no_seq, company_id, convert(datetime, convert(date,getdate())), convert(datetime, convert(date,getdate())) + 30, amount from (select co.company_id ,sum(a.amount_paid) amount …

Member Avatar for toldav
0
239
Member Avatar for Diogo Martinho

To begin with, the test data you show for the "Group" table is wrong. I assume you meant that both CarID 2 and 3 were supposed to be in GroupID 2. Next is, if you're expecting to get the max price for a group, you have to leave out Car.Name …

Member Avatar for blocblue
0
163
Member Avatar for Dani

Questions like this are notoriously hard to solve because of two things: 1. The querent doesn't explain the situation fully or properly. 2. The querent doesn't explain the expected result fully or properly. So, for example, the original question contains the following line: >...one of the criteria is that a …

Member Avatar for BitBlt
0
293
Member Avatar for hwoarang69

You may wish to consider using different column names, because I believe at least two of your choices are reserved words in the MSAccess SQL dialect. As an alternative, you should enclose every column name (and probably the table name) in square brackets. This will force the Jet engine to …

Member Avatar for BitBlt
0
146
Member Avatar for dean8710

Besides, some of us like our anonymity...either that, or we aren't handsome devils like @happygeek! :-Þ

Member Avatar for deceptikon
0
161
Member Avatar for Dani

>Are you trying to get answers to your own questions? I first came to DaniWeb trying to get answers. Then for a long time I almost exclusively contributed. I recently started doing Android development at the behest of my boss (damn his eyes!) so I'm once again looking for answers. …

Member Avatar for john.knapp
0
272
Member Avatar for forjustincase

Is there an actual question here? It just looks like you're asking someone to do your homework for you. If you have tried to code something and are having trouble, post your code and your question and we will be happy to help. Otherwise, please do your own homework.

Member Avatar for forjustincase
0
233
Member Avatar for arohideep13
Member Avatar for Bile

No, the "Where" clause comes AFTER all the "JOIN" clauses. Your error is probably due to do with the fact that LB_No in the "where" clause is not fully qualified. It could be in any of the 5 tables, so you need to specify which one. Just a side note...putting …

Member Avatar for Bile
0
447
Member Avatar for xXghostXx

Prefixing the column name with the table name is to differentiate the columns in case both tables contain columns with the same name. For example, if I have two tables Students (student_id, last_name, first_name) Teachers (teacher_id, last_name, first_name) and I want to write a query showing all the students that …

Member Avatar for xXghostXx
0
151
Member Avatar for srkv03

In some cases, it's just better to accept what's there and don't try to judge or try to figure out WHY they did what they did. Otherwise, we'd be second-guessing without the benefit of knowing what the situation was when it was written. Perhaps when it was written, there was …

Member Avatar for srkv03
0
97
Member Avatar for mail.sujitkulkarni

For MS SQL Server, you don't have to include the parens around the entire set of values for it to work. Your syntax should look like this: insert into myTable (col1, col2, col3, col4) values (1, 'a', 'v1', 23), (2, 'b', 'v2', 24), (3, 'c', 'v3', 25), (4, 'd', 'v4', …

Member Avatar for mail.sujitkulkarni
0
3K
Member Avatar for Geli19

It would be good if you post the actual code you use. One thing to look at: how are you positioning your wildcard characters in your search?

Member Avatar for Geli19
0
830
Member Avatar for faroukmuhammad

...and herein lies the problem...YOUR one-word solution isn't the same as HIS one-word solution...and so you argue, and someone gets offended, and it escalates, and more people get offended, and someone else touches a match to that tinderbox, and BOOM. Sound like the entire history of the world? Yep, pretty …

Member Avatar for Xantipius
0
448
Member Avatar for LastMitch

I'll listen to either Chopin piano music, Strauss waltzes or Beethoven's 6th symphony ("Pastorale"). That, or the White Stripes. :-)

Member Avatar for GrimJack
0
580
Member Avatar for solomon_13000

There seems to be nothing wrong with your statement. I put together a tinkertoy version (based on a bunch of assumptions which may or may not be correct), and executed your statement on a SQL2008 instance and it seemed to work fine. So, it's impossible to help you unless you …

Member Avatar for solomon_13000
0
208
Member Avatar for Albemoi

From Dictionary.com: Ya·hoo /ˈyɑhu, ˈyeɪ-, yɑˈhu/ noun, plural Ya·hoos. 1. (in Swift's Gulliver's Travels ) one of a race of brutes, having the form and all the vices of humans, who are subject to the Houyhnhnms. 2. ( lowercase ) an uncultivated or boorish person; lout; philistine; yokel. 3. ( …

Member Avatar for BitBlt
-3
805
Member Avatar for jrm44

Unless there is some relationship between the result sets for two queries you mention above, there is no way for SQL to decide how to return data. That's not what SQL is for. You could do this programmatically without too much trouble. You just have to instantiate two recordsets, then …

Member Avatar for BitBlt
0
783
Member Avatar for king03

This is treating the parenthesized "select" statement as a joinable table. So, assuming that the table EMPLOYEES has columns JOB_ID and SALARY, lines 5 and 6 specify the join criteria between the actual table EMPLOYEES and the derived table identified as "M".

Member Avatar for BitBlt
0
125
Member Avatar for gelaisg18

Try this: If KeyAscii = 13 Or KeyAscii = 9 Then surname_txt.Text = StrConv(surname_txt.Text, 1) + " | " fname_txt.SetFocus Exit Sub End If If KeyAscii <= 90 Or KeyAscii >= 65 Then surname_txt.Text = surname_txt.Text + " | " surname_txt.SelStart = Len(surname_txt.Text) End If Basically, every time you add …

Member Avatar for gelaisg18
0
132
Member Avatar for aus525

What have you already tried? Please post the SQL statement you've got, and we'll give it a look. Some sample data (suitably scrubbed, of course) would be helpful, as well as what you expect your result set to look like. Also, I notice there are quite a few foreign key …

Member Avatar for BitBlt
0
196
Member Avatar for BigPaw

I was disappointed that it cut off before...well, I won't spoil it. :-) I can, however, see this thread becoming a "How many _________ does it take to change a lightbulb" joke collection....

Member Avatar for BigPaw
1
169

The End.