o
k
q
u
e
s
t
i
o
n
s
.
c
o
m

Need help in sql statement -

Hello everybody,

I need help in writing sql statement to traverse data. For example if I have a table that contains family information where there is a PersonID and ParentID where parent is also a person, how can I traverse person, say if I need to find all the parents of a person or count of all the parents etc.

Thanks.

 

SQL Syntax in English -
Hi Does this exist ? Is there anything that would take an SQL statement, and translate it into English ? Sometimes, I've created a long and complex statement, and either get my statement rejected, or it doesn't return the results I expect. Sometimes, I've checked a statement time an


END statement -
I use END statement when the user press the Cancel button on my vbYesNoCancel MsgBox. But when I use the End statement it clear all my variables. But I wanna preserve the value of my variables. And I use the Stop statement instead. But it doesen't work? Why?


VB.Net 2005 Debug statement not working -
I've inserted a Debug.Print statement in my application and when I put a breakpoint in the same procedure where the statement is....the statement is bypassed for some reason. This is the first time I've ever ran into this. Any ideas what I did wrong. Thanks,


Case Statement in Stored Procedures -
hi how can i use case statement in storedprocedures like if else statement. i know to use case-when-then-end statement in the SELECT statement. but in my stored procedure, i will be passing parameters and i have to execute a query according to the parameters. so i have to go f


Records Moving -
I created a master file for my statements that has only 30 statements per customer in it. Now my question. I would like to Post to a statement that its paid and create a paid match of that statement.below the statement. I have done this in a random file buy doing a reverse move of t


convoluted if statement -
i have an if statement with the standard if...elseif that goes for a lot elseifs, when one is true, it calls a function using certain conditions. However i found a glitch, and to fix it i need to change it so that, if one if statement is found true then it runs the function, but if th


Gödel's theorem is a contradiction -
This statement is true If this statement was false then YES, that statement must have been false because not (this statement = true) this statement = false. If this statement was true then YES, that statement must be true because This statement is true is true but it can't be


problem in update statement -
Hi All I am trying to write a simple update statement but its not working. my update statement is // update tasklog set workdone='fbfbfgbfb',percentage='32' where UserId='seema' and finishtime='11/14/2006 4:05:42 PM' // this update statement is affected o raws can anybody help me


[2005] Help with SQL Statement -
Hi all, Need help with a SQL statement. I need to seach 3 different fields (Field1,Field2,Field3) for a certain numerical value. In each field, there will only be one value between 1-20. Now, can I have select statement to do this or would I need 3 different statements? Che


Flexgrid, Bringing in two SQL statements -
Hi guys, I can populate the Flexgrid with data from one SQL statement. This one SQL statement brings in three columns of data. However, I would like to bring in another SQL statement for supplying information to the 4th and 5th column. Any ideas how i can go about doing this? I h


Randomize Statement -
I'm having a problem with this randomize statement that I am trying to learn. Does anyone know how to use this statement in databases for Visual Basic 6? Lets just say that I have a database with countries and I add a command button that randomly goes to one of the records in the datab


Sending SQL Statement cause error -
I have create an sql connection, and the sql statement in code, using a field within a database. The problem that i am having is that the field in the database contain characters that sql uses, thus causing the statement to fall over. Is there anyway around this, without me havin


question on if statement -
below is the if statement I am using, but I don't think that is relavent for the question. but just in case. If Len(Dir$(App.Path & "\invoice.txt")) <> 0 Then Open App.Path & "\invoice.txt" For Input As #1 Do While Not EOF(1) Inp


For statement question -
i need help with a for statement or a do loop that will process the number 50 2222 times. so it would start at 0 then 50, 100, 150, 200, etc. I tried a Do Loop statement but it seems to make the program hang after a while


**RESOLVED** OR Statement Skips Sixth Line -
I ran into this scenerio: If s = 1 OR _ s = 2 OR _ s = 3 OR _ s = 4 OR _ s = 5 OR _ s = 6 OR _ s = 7 Then VB6 SP5 seems to skip the s = 6 statement. If you move value around like so: If s = 1 OR _ s = 2 OR _ s = 3 OR _ s = 4 OR _ s = 6 OR _ s = 5 OR _ s = 7 Then


IIF() Statement -
I want to duplicate the functionality of an IIF statement inside a MSDE View (T-SQL). Problem is, I try and use CASE and it tells me that the CASE Statement is not supported. Any ideas? Thanks, Ben


studying for a test -
i'm just wondering if you have any suggestion how to study for a test.. i must admit, i feel insecure since most of the people in my class has some experience with programming. im soo shy to ask. sometimes i feel they think im stupid. ahh! i dunno.. help me! the topic that im focusing


Simple SQL Statement -
I'm trying to execute this simple SQL statement and I get this error Compile Error Expected: Line Number or Label or statement or end of statement Here is the sql statement I'm using Dim strSQL As String strSQL = "Select * From tblCompany" "Where cCom


To go in an if statement(posted code for ye) -
HI all I have an if statement and i want it to go back to a certain part of code if a condition isn't met.... [/vbcofe] ''go to here!!!! if check = true then '''''' performs a task else ''''go to before the if statement end if [/highlight] Than


One SQL statement 2 activities -
Hi, i wonder with one Connection at Save Button Can perform two SQL statement. Or can i Insert Two Table with One SQL statement? SQL = "INSERT INTO tbA and TbC .... possible?


evaluating values in variables -
I am working on a table driven app. I have placed all of my Select and insert statements in an sql 7 DB table. Things seemed to be going great until I needed to do an insert using an insert statement stored in the table. I query the DB to get the insert statement, place the statemen


For each next statement -
Hellofor each next statement) what is this statement does and how to use and plz example of if Bye


Fuuny happenings in an IF statement -
I have an IF ... ELSE statement that just drops out halfway thru the instructions. It gets to a statement that is setting the value of a text box on a form to a recordset value and just falls to the bottom of the sub. The recordset value is null and I would expect an error rather than


SQL Statement Problem -
Hello, again eveyrone! I am writing a SQL statement in VB to gether info form an Access Database. At the end of the statement, I have a "WHERE" clause that says to pull the data from a particular field in the database. Here's the WHERE statement: "WHERE ((([98PEE


SQL If/Case statement!!! -
Hi, I am trying validate 2 columns at a time but i can't do that in SQL. CASE statement validates 1 column at a time and If also seems to be something like that. I want to check if A=0 then don't do any calculation. If A<>0 then check if B>0 then (c+d) else (c-d).


how to use END statement in .ocx file -
when we want to terminate the application in vb we use END statement, similarly i want to use the END statement in the ocx file ie. the project/application using this .ocx control must be terminated. <vbcode> Public Sub check() If Flag = 100 Then 'allow the user


Print statement - LineFeed -
In using the Print statement to write stuff to files, a new line is automatically inserted after the end of each Print statement. Is there anyway to disable this? Thanks.


GoTo statement -
need help everytime i use the GoTo statement in EVB i get this comple error stating "Expected Statement" This is the code which i reallly need to use the goto statement if there is anyother control i could use i am open for ideas top: x = nPHI Mod nE y = x


Record Seletion in Crystal Reports -
Hello: I want to thank all that reply. I have created a report using Crystal Report Version 7. What I want to do is allow the end user to select from several drop down list and build an SQL statement that will select the records that my report can use. Like I said I have already


Single Quotes in SQL statement -
I would like to be able to insert a statement into my table which contains a number of single quotes. For ex., 'John's friend'. What do I surround this statement with in my SQL to avoid errors? Thank you, Olga


sql statement in oracle -
Hi, I am having this funny problem with my sql statement. My sql statement looks like this: "select * from mytable where myfield1 >= 'abc'" with the above sql statement it works fine in oracle. But when i add the extra statement such as: " select * fro


SQL statement strange behavior -
I have a very extensive SQL statement for the purpose of creating a crosstab query. I did not write the statement, I am troubleshooting error. Inserting a carraige return at a critical point within the statement creates the desired dataset. Shouldn't I get an error with a carraige


How to run a .SQL file using ADO -
I have a complicated 'Select' statement that I am running from my VB program using ADO. I would like to move the SQL statement out of the VB code and put in a .SQL file. I want ADO to run the SQL statement from that file. How can I do that? Many Thanks...


insert statement -
Help! The following statement causes compile error: expected end of statement INSERT INTO table1 SELECT * FROM table2 WHERE field = '" & variable & "'


[2005] sql statement question -
when you use the LIKE statement in a statement to find a string, how does the length of the string factor into the search? For example: If I have this text in one of my entries "AAAAAAAAGGGTTTAAAAAAAAA" and I: SELECT * FROM TABLE WHERE COLUMN1 LIKE 'GGGTTT' Would it


Create Report on Visual basic -
I tried to make report using Datareport in VB. For this purpose I use dataenvironment|Connection1|command1 as datasource. To get the specific record I used the following statement on the SQL Statement on Command1 properties. SELECT * FROM expatdata WHERE firsname = '" & do


[2005] Name Statement -
What is the VB.net equivalent to vb6 name statement Name Statement Name oldpathname As newpathname Renames the file, directory, or folder specified by the oldpathname argument to the name specified by newpathname.


data environment and between sql statement -
I was wondering if anyone could help me with the syntax for the following query I need to perform: I have a field in my data base called DATE_OPENED. I need to make a sql statement that has the number of DATE_OPENED for the month or March. I have SELECT COUNT(*) AS MarchReceiv


My PC dosen't know that 1+1 = 2 -
I have posted the code and the results of the Debug screen on my Website at http://home.satx.rr.com/jimwrichards...s/Selects1.gif The watch window shows that (i + 1) = 2 when i = 1 but the first statement using Selects(i + 1) shows the value of Selects(i + 1) to be 1. This causes


Create String for SQL Statement -
I am trying to create a string from strings and predefined words so that I can pass it in my SQL Statement. I want to fit the following string in my SQL Statement: “Field: “ & strWhat & “ From: “ & strOld & “ To: “ & strNew where the str* are string