|
ramina sen wrote: any sample code or input is highly appreciated!!!
MSDN[^], see the heading "Using a recursive CTE in an UPDATE statement". More info, also on MSDN[^]
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
Is there some reason for doing this recursively, you should be able to achieve a simple update in one sql statement using an inner join!
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
correct,
but as I have mention my inner query is giving me only parent but I want to make use of the result of the inner query again as input till I did not find any child ,so I am using procedure as I have to collect all the parent I get from the inner query and then update the outer query using the inner query result.it is the requirement what I want to achive,
e.g
update table A
set A.a as "xyz"
//here I will get t
where A.id in
(
select A.child_id from A,B,C
--I get the child by passing parent as input and again consider the child as parent
and find the child
where A.id= b.id
b.name = x and A.prent_id = ?
//few join condtion here
)
e.g
input 1 result 1.1
input 1.1 result 1.1.1
input 1.1.1 result 1.1.1.1
update A
where A.id in
('1.1','1.1.1','1.1.1.1')--here I want to use a container and make use of it
Hope you get my intention now ..Thanks for your response.
|
|
|
|
|
can you plz explain me join query and all types of join with simple example so that i can use it very well..
thanks and regards
rushabh parekh
|
|
|
|
|
|
|
|
I am new at this.
I made a Access Database that produces a report that via an entered date range, displays data contained in the table when a user enters a Start Date and End Date to pull up the report.
The report works fine; providing dates, time, caller names, locations, and a few other statistics.
The Table has a field where the user notes the time a call is made(10:16).
I need to enable the report to break down all calls in that field and count them in one of the three categories: (4:30 to 6:29), (6:30 to 8:29), and 8:30 to 10:30)
I will look something like this on the report: (Where n is the total count of calls received within these three sequential time frames.
Call Count 4:30 to 6:29 (n)
Call Count 6:30 to 8:29 (n)
Call Count 8:30 to 10:30 (n)
|
|
|
|
|
Caveat I have not worked with Access for a decade or more
I would add a calculated field to the table/view called ShiftNo - function is obvious. Calculate the shift and then group the report by the ShiftNo. Your query changes from a simple select to a grouped query. (not sure what the terminology is these days in Access)
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
Hello i am Rodney and i have a problem on how should i arrange the seatmap database.
i have id, busNumber, from, to, seatId, column, reserveStatus, firstname,lastName, paid, tripStatus(finish/not).
i have made this working but the thing that im talking about multiple reservation from Point A to Point E, then there is substation of B,C, and D. What i have in mind is assuming there are 3 stopovers, should i just add columns in my seatMap table, like (stop1 = stopover1) stop1Firstname,stop1LastName,stop1ReserveStatus,stop1Paid,stop1TripStatus.
Thats what i have in mind but is there any better way solving these? or should i make new tables for stopover1 stopover stopover3 if it is so could u please guide me, i mean i dont have that much of an idea regarding to that. Thanks a lot. Sorry for my english.
|
|
|
|
|
|
hello, thanks a lot. anyway, so it is much better to make new tables per stopovers right? for example buses have stopovers i.e PointA - Point D, which means it has stopover of Stopover B and Stopover C. In my mind is that a table for the origin and destination, reservation (id,busNum,reserveStatus,seatId,seatColuumn,fullName,date)
and for the stopovers(id,busNum,date,stopoverName,seatId,seatColumn,reserveStatus,fullName). Could you please guide me for a better way or if this would do? Thanks a lot
|
|
|
|
|
To be able to design a database correctly, one has to understand the users' requirements and their business rules. Many considerations arise, such as:
1. Can a passenger start and end his journey at any stopovers?
2. How to ensure a seat in a bus is not reserved by more than one passengers for a journey on the same date and time.
Based on the limited info that you have given and my own assumption, I have drafted a preliminary database schema for your reference and adaptation, you will have to work out your final solution yourself:
Table: reservation
reserveID (PRIMARY KEY),
busID,
reserveStatus,
custID (Foreign Key to custID in customer table),
start_stopoverID,
end_stopoverID,
[other fields]
Table: customer
custID (PRIMARY KEY),
custName,
[other fields]
Table: bus
busID (PRIMARY KEY),
busNum,
[other fields]
Table: stopovers
stopoverID (PRIMARY KEY),
stopoverName,
[other fields]
Table: bus_stopovers
stopoverID (PRIMARY KEY),
busID (PRIMARY KEY),
[other fields]
|
|
|
|
|
Thank you so much for the draft. I will work for it. i hope i could do these multiple seatmap. i need it do be done soon. Thanks a bunch.
|
|
|
|
|
Have a look at this[^] schema. It's for an Airline, but I believe you can reuse most of the info.
|
|
|
|
|
what is criteria for a SCN number change ? Means when it changes and when it not changes ?
|
|
|
|
|
|
hi...Im newly member..please help me settle this
server: Ubuntu 12.04 LTS
database use postgresql 9.1 with ebikko engine
for edms system
after transfering from the actual server with is vm worstation
to another vm worstation and change the ip..the system cannot been log in..assume some sort of hard code that need to change but does not know where.
How to solve this?
Guide me somebody
|
|
|
|
|
aswadmanap wrote: the system cannot been log in..assume some sort It's hard to pinpoint where something goes wrong if you're using assumptions. I could assume that it's already solved.
aswadmanap wrote: some sort of hard code that need to change but does not know where. Use the "search" option in your code-editor to locate the IP; we can't locate it for you.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
i don't know how to find the file..its is in Ubuntu 12.04 LTS server but using database postgresql version 9.1
|
|
|
|
|
Who set up the system? These things can become quite difficult without documentation.
Bastard Programmer from Hell
If you can't read my code, try converting it here[^]
|
|
|
|
|
check that the database engine is running. If not, scrutinzie the system logs for corresponding error messages.
As already pointed out, an IP address might be hard-coded in some configuration file.
|
|
|
|
|
actually i was just transfering the system to another server by imaging procedure without making any change..but still yet cannot make authorization access..because the system is not develop by me..the vendor itself have made it.But the maintainance period is over..so i want to know exactly the problem by myself.
|
|
|
|
|
Is there any way of creating say 100 different tables using a single SQL query/statement..Or is there another way around?
|
|
|
|
|
You could use a cursor or loop, generating inline create table statements which you then execute
=========================================================
I'm an optoholic - my glass is always half full of vodka.
=========================================================
|
|
|
|