This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Currently editing: | |
/home/vegmomos/public_html/tst/index.php | |
Encoding: Reopen Switch to Code Editor Close Save | |
<?php | |
//header( 'Location: http://bigloop.in', true, 301 ); | |
//header( 'Location: http://vegmomos.in', false, 302 ); | |
header( 'Refresh: 5; url=http://rambler.ru/', false, 302 ); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select [ORDER_DATE] as date, '$'+cast(ISNULL([COST_TOTAL],'0') as varchar) | |
+' order '+ cast(ISNULL([ORDER_NUMBER],'') as varchar) | |
+' taken by '+ cast(ISNULL([ORDER_TAKEN_BY],'') as varchar) as text | |
from [dbo].[OC_Repository] | |
where [CUSTOMER] = 'ANDALL2' | |
union | |
select [ORDER_DATE] as date, '$'+cast(ISNULL([COST_TOTAL],'0') as varchar) | |
+' order '+ cast(ISNULL([ORDER_NUMBER],'') as varchar) | |
+' taken by '+ cast(ISNULL([ORDER_TAKEN_BY],'') as varchar) as text | |
from [dbo].[OC_Repository_History] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select -- userid -- from table prefix_user_info_data | |
p1.survey_pin, ss.numpartners, p1.age as age | |
-- main part of 5 partners | |
, p1.id as P1_id, p1.partnerName as P1_partname, p1.partrank as P1_partrank, p1.partnerType as P1_parttype | |
, p1.vaginal as P1_Vagsex, p1.vaginalSexNumber as P1_Vagsxnum, p1.vaginalSexCondomNumber as P1_Vagsxcon | |
, p1.oral as P1_Oralsex, p1.oralSexNumber as P1_Orasxnum, p1.oralSexCondomNumber as P1_Orasxcon | |
, p1.anal as P1_Analsex, p1.analSexNumber as P1_Anasxnum, p1.analSexCondomNumber as P1_Anasxcon | |
, p1.otherWomen as P1_Partsxw, p1.otherMan as P1_Partsxm | |
, p1.shootingUp as P1_Parshdrg, p1.hivTest as P1_ParEVtst | |
, p1.unprotectedCheck as P1_ParTGtst, p1.perceivedPartnerRiskCheck as P1_ParhsHIV -- , p1.age as P1_age |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select userid -- from table prefix_user_info_data | |
, p1.survey_pin | |
, (select count(sm.id) from survey sm where sm.survey_pin = p1.survey_pin) as cnt_rows_for_pin | |
, null as ResponseID, null as Started, null as Ended, null as TotalTime, null as LastEdit, null as IP, null as 'Language', null as UniqueIdentifier, null as NetworkUser | |
, ifnull(ssd.user_email, p1.email) as Email | |
, ssd.user_name, ssd.user_dob -- , ssd.* | |
-- main part of 5 partners | |
, p1.id as P1_id, p1.partnerName as P1_Name, p1.partnerType as P1_Rel | |
, p1.vaginal as P1_V_Sex, p1.vaginalSexNumber as P1_V_Sex_N, p1.vaginalSexCondomNumber as P1_V_Sex_Cond_N | |
, p1.oral as P1_O_Sex, p1.oralSexNumber as P1_O_Sex_N, p1.oralSexCondomNumber as P1_O_Sex_Cond_N |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
drop table n; | |
CREATE TABLE [dbo].[n]( | |
[id] [bigint] NOT NULL identity(1,1) primary key, | |
[nbr] [tinyint] NOT NULL | |
); | |
go | |
alter PROCEDURE fill_n | |
AS | |
BEGIN |