Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help needed with a push down query

Status
Not open for further replies.

dariopowell

Programmer
Jun 15, 2004
14
US
Does anyone know of a better way to do the following?

The code pushes out BLANKS/NULLS in a row of records.
i.e.

Before push code is run:
Field1 = "Summer"
Field2 = NULL
Field3 = "Fall"
Field4 = NULL
Field5 = "Winter"
Field6 = NULL
Field7 = "Spring"

After push code is run:

Field1 = "Summer"
Field2 = "Fall"
Field3 = "Winter"
Field4 = "Spring"
Field5 = NULL
Field6 = NULL
Field7 = NULL

HOWEVER: In the case below, there are 55 fields and the code takes about 3 hours to run. As you can imagine, this is unexceptable for production.

Here is the code as it currently is:



-----------------------------------------------------------
--PUSH DOWN
update Table_XYZ
set
pub_1 = pub_2,
pub_2 = pub_3,
pub_3 = pub_4,
pub_4 = pub_5,
pub_5 = pub_6,
pub_6 = pub_7,
pub_7 = pub_8,
pub_8 = pub_9,
pub_9 = pub_10,
pub_10 = pub_11,
pub_11 = pub_12,
pub_12 = pub_13,
pub_13 = pub_14,
pub_14 = pub_15,
pub_15 = pub_16,
pub_16 = pub_17,
pub_17 = pub_18,
pub_18 = pub_19,
pub_19 = pub_20,
pub_20 = pub_21,
pub_21 = pub_22,
pub_22 = pub_23,
pub_23 = pub_24,
pub_24 = pub_25,
pub_25 = pub_26,
pub_26 = pub_27,
pub_27 = pub_28,
pub_28 = pub_29,
pub_29 = pub_30,
pub_30 = pub_31,
pub_31 = pub_32,
pub_32 = pub_33,
pub_33 = pub_34,
pub_34 = pub_35,
pub_35 = pub_36,
pub_36 = pub_37,
pub_37 = pub_38,
pub_38 = pub_39,
pub_39 = pub_40,
pub_40 = pub_41,
pub_41 = pub_42,
pub_42 = pub_43,
pub_43 = pub_44,
pub_44 = pub_45,
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_1 is null or pub_1 = '')
-----------------------------------
update Table_XYZ
set
pub_2 = pub_3,
pub_3 = pub_4,
pub_4 = pub_5,
pub_5 = pub_6,
pub_6 = pub_7,
pub_7 = pub_8,
pub_8 = pub_9,
pub_9 = pub_10,
pub_10 = pub_11,
pub_11 = pub_12,
pub_12 = pub_13,
pub_13 = pub_14,
pub_14 = pub_15,
pub_15 = pub_16,
pub_16 = pub_17,
pub_17 = pub_18,
pub_18 = pub_19,
pub_19 = pub_20,
pub_20 = pub_21,
pub_21 = pub_22,
pub_22 = pub_23,
pub_23 = pub_24,
pub_24 = pub_25,
pub_25 = pub_26,
pub_26 = pub_27,
pub_27 = pub_28,
pub_28 = pub_29,
pub_29 = pub_30,
pub_30 = pub_31,
pub_31 = pub_32,
pub_32 = pub_33,
pub_33 = pub_34,
pub_34 = pub_35,
pub_35 = pub_36,
pub_36 = pub_37,
pub_37 = pub_38,
pub_38 = pub_39,
pub_39 = pub_40,
pub_40 = pub_41,
pub_41 = pub_42,
pub_42 = pub_43,
pub_43 = pub_44,
pub_44 = pub_45,
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_2 is null or pub_2 = '')
-----------------------------------
update Table_XYZ
set
pub_3 = pub_4,
pub_4 = pub_5,
pub_5 = pub_6,
pub_6 = pub_7,
pub_7 = pub_8,
pub_8 = pub_9,
pub_9 = pub_10,
pub_10 = pub_11,
pub_11 = pub_12,
pub_12 = pub_13,
pub_13 = pub_14,
pub_14 = pub_15,
pub_15 = pub_16,
pub_16 = pub_17,
pub_17 = pub_18,
pub_18 = pub_19,
pub_19 = pub_20,
pub_20 = pub_21,
pub_21 = pub_22,
pub_22 = pub_23,
pub_23 = pub_24,
pub_24 = pub_25,
pub_25 = pub_26,
pub_26 = pub_27,
pub_27 = pub_28,
pub_28 = pub_29,
pub_29 = pub_30,
pub_30 = pub_31,
pub_31 = pub_32,
pub_32 = pub_33,
pub_33 = pub_34,
pub_34 = pub_35,
pub_35 = pub_36,
pub_36 = pub_37,
pub_37 = pub_38,
pub_38 = pub_39,
pub_39 = pub_40,
pub_40 = pub_41,
pub_41 = pub_42,
pub_42 = pub_43,
pub_43 = pub_44,
pub_44 = pub_45,
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_3 is null or pub_3 = '')
-----------------------------------
update Table_XYZ
set
pub_4 = pub_5,
pub_5 = pub_6,
pub_6 = pub_7,
pub_7 = pub_8,
pub_8 = pub_9,
pub_9 = pub_10,
pub_10 = pub_11,
pub_11 = pub_12,
pub_12 = pub_13,
pub_13 = pub_14,
pub_14 = pub_15,
pub_15 = pub_16,
pub_16 = pub_17,
pub_17 = pub_18,
pub_18 = pub_19,
pub_19 = pub_20,
pub_20 = pub_21,
pub_21 = pub_22,
pub_22 = pub_23,
pub_23 = pub_24,
pub_24 = pub_25,
pub_25 = pub_26,
pub_26 = pub_27,
pub_27 = pub_28,
pub_28 = pub_29,
pub_29 = pub_30,
pub_30 = pub_31,
pub_31 = pub_32,
pub_32 = pub_33,
pub_33 = pub_34,
pub_34 = pub_35,
pub_35 = pub_36,
pub_36 = pub_37,
pub_37 = pub_38,
pub_38 = pub_39,
pub_39 = pub_40,
pub_40 = pub_41,
pub_41 = pub_42,
pub_42 = pub_43,
pub_43 = pub_44,
pub_44 = pub_45,
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_4 is null or pub_4 = '')
-----------------------------------
update Table_XYZ
set
pub_5 = pub_6,
pub_6 = pub_7,
pub_7 = pub_8,
pub_8 = pub_9,
pub_9 = pub_10,
pub_10 = pub_11,
pub_11 = pub_12,
pub_12 = pub_13,
pub_13 = pub_14,
pub_14 = pub_15,
pub_15 = pub_16,
pub_16 = pub_17,
pub_17 = pub_18,
pub_18 = pub_19,
pub_19 = pub_20,
pub_20 = pub_21,
pub_21 = pub_22,
pub_22 = pub_23,
pub_23 = pub_24,
pub_24 = pub_25,
pub_25 = pub_26,
pub_26 = pub_27,
pub_27 = pub_28,
pub_28 = pub_29,
pub_29 = pub_30,
pub_30 = pub_31,
pub_31 = pub_32,
pub_32 = pub_33,
pub_33 = pub_34,
pub_34 = pub_35,
pub_35 = pub_36,
pub_36 = pub_37,
pub_37 = pub_38,
pub_38 = pub_39,
pub_39 = pub_40,
pub_40 = pub_41,
pub_41 = pub_42,
pub_42 = pub_43,
pub_43 = pub_44,
pub_44 = pub_45,
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_5 is null or pub_5 = '')
-----------------------------------
update Table_XYZ
set
pub_6 = pub_7,
pub_7 = pub_8,
pub_8 = pub_9,
pub_9 = pub_10,
pub_10 = pub_11,
pub_11 = pub_12,
pub_12 = pub_13,
pub_13 = pub_14,
pub_14 = pub_15,
pub_15 = pub_16,
pub_16 = pub_17,
pub_17 = pub_18,
pub_18 = pub_19,
pub_19 = pub_20,
pub_20 = pub_21,
pub_21 = pub_22,
pub_22 = pub_23,
pub_23 = pub_24,
pub_24 = pub_25,
pub_25 = pub_26,
pub_26 = pub_27,
pub_27 = pub_28,
pub_28 = pub_29,
pub_29 = pub_30,
pub_30 = pub_31,
pub_31 = pub_32,
pub_32 = pub_33,
pub_33 = pub_34,
pub_34 = pub_35,
pub_35 = pub_36,
pub_36 = pub_37,
pub_37 = pub_38,
pub_38 = pub_39,
pub_39 = pub_40,
pub_40 = pub_41,
pub_41 = pub_42,
pub_42 = pub_43,
pub_43 = pub_44,
pub_44 = pub_45,
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_6 is null or pub_6 = '')
-----------------------------------
update Table_XYZ
set
pub_7 = pub_8,
pub_8 = pub_9,
pub_9 = pub_10,
pub_10 = pub_11,
pub_11 = pub_12,
pub_12 = pub_13,
pub_13 = pub_14,
pub_14 = pub_15,
pub_15 = pub_16,
pub_16 = pub_17,
pub_17 = pub_18,
pub_18 = pub_19,
pub_19 = pub_20,
pub_20 = pub_21,
pub_21 = pub_22,
pub_22 = pub_23,
pub_23 = pub_24,
pub_24 = pub_25,
pub_25 = pub_26,
pub_26 = pub_27,
pub_27 = pub_28,
pub_28 = pub_29,
pub_29 = pub_30,
pub_30 = pub_31,
pub_31 = pub_32,
pub_32 = pub_33,
pub_33 = pub_34,
pub_34 = pub_35,
pub_35 = pub_36,
pub_36 = pub_37,
pub_37 = pub_38,
pub_38 = pub_39,
pub_39 = pub_40,
pub_40 = pub_41,
pub_41 = pub_42,
pub_42 = pub_43,
pub_43 = pub_44,
pub_44 = pub_45,
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_7 is null or pub_7 = '')
-----------------------------------
update Table_XYZ
set
pub_8 = pub_9,
pub_9 = pub_10,
pub_10 = pub_11,
pub_11 = pub_12,
pub_12 = pub_13,
pub_13 = pub_14,
pub_14 = pub_15,
pub_15 = pub_16,
pub_16 = pub_17,
pub_17 = pub_18,
pub_18 = pub_19,
pub_19 = pub_20,
pub_20 = pub_21,
pub_21 = pub_22,
pub_22 = pub_23,
pub_23 = pub_24,
pub_24 = pub_25,
pub_25 = pub_26,
pub_26 = pub_27,
pub_27 = pub_28,
pub_28 = pub_29,
pub_29 = pub_30,
pub_30 = pub_31,
pub_31 = pub_32,
pub_32 = pub_33,
pub_33 = pub_34,
pub_34 = pub_35,
pub_35 = pub_36,
pub_36 = pub_37,
pub_37 = pub_38,
pub_38 = pub_39,
pub_39 = pub_40,
pub_40 = pub_41,
pub_41 = pub_42,
pub_42 = pub_43,
pub_43 = pub_44,
pub_44 = pub_45,
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_8 is null or pub_8 = '')
-----------------------------------
update Table_XYZ
set
pub_9 = pub_10,
pub_10 = pub_11,
pub_11 = pub_12,
pub_12 = pub_13,
pub_13 = pub_14,
pub_14 = pub_15,
pub_15 = pub_16,
pub_16 = pub_17,
pub_17 = pub_18,
pub_18 = pub_19,
pub_19 = pub_20,
pub_20 = pub_21,
pub_21 = pub_22,
pub_22 = pub_23,
pub_23 = pub_24,
pub_24 = pub_25,
pub_25 = pub_26,
pub_26 = pub_27,
pub_27 = pub_28,
pub_28 = pub_29,
pub_29 = pub_30,
pub_30 = pub_31,
pub_31 = pub_32,
pub_32 = pub_33,
pub_33 = pub_34,
pub_34 = pub_35,
pub_35 = pub_36,
pub_36 = pub_37,
pub_37 = pub_38,
pub_38 = pub_39,
pub_39 = pub_40,
pub_40 = pub_41,
pub_41 = pub_42,
pub_42 = pub_43,
pub_43 = pub_44,
pub_44 = pub_45,
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_9 is null or pub_9 = '')
-----------------------------------
update Table_XYZ
set
pub_10 = pub_11,
pub_11 = pub_12,
pub_12 = pub_13,
pub_13 = pub_14,
pub_14 = pub_15,
pub_15 = pub_16,
pub_16 = pub_17,
pub_17 = pub_18,
pub_18 = pub_19,
pub_19 = pub_20,
pub_20 = pub_21,
pub_21 = pub_22,
pub_22 = pub_23,
pub_23 = pub_24,
pub_24 = pub_25,
pub_25 = pub_26,
pub_26 = pub_27,
pub_27 = pub_28,
pub_28 = pub_29,
pub_29 = pub_30,
pub_30 = pub_31,
pub_31 = pub_32,
pub_32 = pub_33,
pub_33 = pub_34,
pub_34 = pub_35,
pub_35 = pub_36,
pub_36 = pub_37,
pub_37 = pub_38,
pub_38 = pub_39,
pub_39 = pub_40,
pub_40 = pub_41,
pub_41 = pub_42,
pub_42 = pub_43,
pub_43 = pub_44,
pub_44 = pub_45,
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_10 is null or pub_10 = '')
-----------------------------------
update Table_XYZ
set
pub_11 = pub_12,
pub_12 = pub_13,
pub_13 = pub_14,
pub_14 = pub_15,
pub_15 = pub_16,
pub_16 = pub_17,
pub_17 = pub_18,
pub_18 = pub_19,
pub_19 = pub_20,
pub_20 = pub_21,
pub_21 = pub_22,
pub_22 = pub_23,
pub_23 = pub_24,
pub_24 = pub_25,
pub_25 = pub_26,
pub_26 = pub_27,
pub_27 = pub_28,
pub_28 = pub_29,
pub_29 = pub_30,
pub_30 = pub_31,
pub_31 = pub_32,
pub_32 = pub_33,
pub_33 = pub_34,
pub_34 = pub_35,
pub_35 = pub_36,
pub_36 = pub_37,
pub_37 = pub_38,
pub_38 = pub_39,
pub_39 = pub_40,
pub_40 = pub_41,
pub_41 = pub_42,
pub_42 = pub_43,
pub_43 = pub_44,
pub_44 = pub_45,
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_11 is null or pub_11 = '')
-----------------------------------
update Table_XYZ
set
pub_12 = pub_13,
pub_13 = pub_14,
pub_14 = pub_15,
pub_15 = pub_16,
pub_16 = pub_17,
pub_17 = pub_18,
pub_18 = pub_19,
pub_19 = pub_20,
pub_20 = pub_21,
pub_21 = pub_22,
pub_22 = pub_23,
pub_23 = pub_24,
pub_24 = pub_25,
pub_25 = pub_26,
pub_26 = pub_27,
pub_27 = pub_28,
pub_28 = pub_29,
pub_29 = pub_30,
pub_30 = pub_31,
pub_31 = pub_32,
pub_32 = pub_33,
pub_33 = pub_34,
pub_34 = pub_35,
pub_35 = pub_36,
pub_36 = pub_37,
pub_37 = pub_38,
pub_38 = pub_39,
pub_39 = pub_40,
pub_40 = pub_41,
pub_41 = pub_42,
pub_42 = pub_43,
pub_43 = pub_44,
pub_44 = pub_45,
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_12 is null or pub_12 = '')
-----------------------------------
update Table_XYZ
set
pub_13 = pub_14,
pub_14 = pub_15,
pub_15 = pub_16,
pub_16 = pub_17,
pub_17 = pub_18,
pub_18 = pub_19,
pub_19 = pub_20,
pub_20 = pub_21,
pub_21 = pub_22,
pub_22 = pub_23,
pub_23 = pub_24,
pub_24 = pub_25,
pub_25 = pub_26,
pub_26 = pub_27,
pub_27 = pub_28,
pub_28 = pub_29,
pub_29 = pub_30,
pub_30 = pub_31,
pub_31 = pub_32,
pub_32 = pub_33,
pub_33 = pub_34,
pub_34 = pub_35,
pub_35 = pub_36,
pub_36 = pub_37,
pub_37 = pub_38,
pub_38 = pub_39,
pub_39 = pub_40,
pub_40 = pub_41,
pub_41 = pub_42,
pub_42 = pub_43,
pub_43 = pub_44,
pub_44 = pub_45,
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_13 is null or pub_13 = '')
-----------------------------------
update Table_XYZ
set
pub_14 = pub_15,
pub_15 = pub_16,
pub_16 = pub_17,
pub_17 = pub_18,
pub_18 = pub_19,
pub_19 = pub_20,
pub_20 = pub_21,
pub_21 = pub_22,
pub_22 = pub_23,
pub_23 = pub_24,
pub_24 = pub_25,
pub_25 = pub_26,
pub_26 = pub_27,
pub_27 = pub_28,
pub_28 = pub_29,
pub_29 = pub_30,
pub_30 = pub_31,
pub_31 = pub_32,
pub_32 = pub_33,
pub_33 = pub_34,
pub_34 = pub_35,
pub_35 = pub_36,
pub_36 = pub_37,
pub_37 = pub_38,
pub_38 = pub_39,
pub_39 = pub_40,
pub_40 = pub_41,
pub_41 = pub_42,
pub_42 = pub_43,
pub_43 = pub_44,
pub_44 = pub_45,
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_14 is null or pub_14 = '')
-----------------------------------
update Table_XYZ
set
pub_15 = pub_16,
pub_16 = pub_17,
pub_17 = pub_18,
pub_18 = pub_19,
pub_19 = pub_20,
pub_20 = pub_21,
pub_21 = pub_22,
pub_22 = pub_23,
pub_23 = pub_24,
pub_24 = pub_25,
pub_25 = pub_26,
pub_26 = pub_27,
pub_27 = pub_28,
pub_28 = pub_29,
pub_29 = pub_30,
pub_30 = pub_31,
pub_31 = pub_32,
pub_32 = pub_33,
pub_33 = pub_34,
pub_34 = pub_35,
pub_35 = pub_36,
pub_36 = pub_37,
pub_37 = pub_38,
pub_38 = pub_39,
pub_39 = pub_40,
pub_40 = pub_41,
pub_41 = pub_42,
pub_42 = pub_43,
pub_43 = pub_44,
pub_44 = pub_45,
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_15 is null or pub_15 = '')
-----------------------------------
update Table_XYZ
set
pub_16 = pub_17,
pub_17 = pub_18,
pub_18 = pub_19,
pub_19 = pub_20,
pub_20 = pub_21,
pub_21 = pub_22,
pub_22 = pub_23,
pub_23 = pub_24,
pub_24 = pub_25,
pub_25 = pub_26,
pub_26 = pub_27,
pub_27 = pub_28,
pub_28 = pub_29,
pub_29 = pub_30,
pub_30 = pub_31,
pub_31 = pub_32,
pub_32 = pub_33,
pub_33 = pub_34,
pub_34 = pub_35,
pub_35 = pub_36,
pub_36 = pub_37,
pub_37 = pub_38,
pub_38 = pub_39,
pub_39 = pub_40,
pub_40 = pub_41,
pub_41 = pub_42,
pub_42 = pub_43,
pub_43 = pub_44,
pub_44 = pub_45,
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_16 is null or pub_16 = '')
-----------------------------------
update Table_XYZ
set
pub_17 = pub_18,
pub_18 = pub_19,
pub_19 = pub_20,
pub_20 = pub_21,
pub_21 = pub_22,
pub_22 = pub_23,
pub_23 = pub_24,
pub_24 = pub_25,
pub_25 = pub_26,
pub_26 = pub_27,
pub_27 = pub_28,
pub_28 = pub_29,
pub_29 = pub_30,
pub_30 = pub_31,
pub_31 = pub_32,
pub_32 = pub_33,
pub_33 = pub_34,
pub_34 = pub_35,
pub_35 = pub_36,
pub_36 = pub_37,
pub_37 = pub_38,
pub_38 = pub_39,
pub_39 = pub_40,
pub_40 = pub_41,
pub_41 = pub_42,
pub_42 = pub_43,
pub_43 = pub_44,
pub_44 = pub_45,
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_17 is null or pub_17 = '')
-----------------------------------
update Table_XYZ
set
pub_18 = pub_19,
pub_19 = pub_20,
pub_20 = pub_21,
pub_21 = pub_22,
pub_22 = pub_23,
pub_23 = pub_24,
pub_24 = pub_25,
pub_25 = pub_26,
pub_26 = pub_27,
pub_27 = pub_28,
pub_28 = pub_29,
pub_29 = pub_30,
pub_30 = pub_31,
pub_31 = pub_32,
pub_32 = pub_33,
pub_33 = pub_34,
pub_34 = pub_35,
pub_35 = pub_36,
pub_36 = pub_37,
pub_37 = pub_38,
pub_38 = pub_39,
pub_39 = pub_40,
pub_40 = pub_41,
pub_41 = pub_42,
pub_42 = pub_43,
pub_43 = pub_44,
pub_44 = pub_45,
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_18 is null or pub_18 = '')
-----------------------------------
update Table_XYZ
set
pub_19 = pub_20,
pub_20 = pub_21,
pub_21 = pub_22,
pub_22 = pub_23,
pub_23 = pub_24,
pub_24 = pub_25,
pub_25 = pub_26,
pub_26 = pub_27,
pub_27 = pub_28,
pub_28 = pub_29,
pub_29 = pub_30,
pub_30 = pub_31,
pub_31 = pub_32,
pub_32 = pub_33,
pub_33 = pub_34,
pub_34 = pub_35,
pub_35 = pub_36,
pub_36 = pub_37,
pub_37 = pub_38,
pub_38 = pub_39,
pub_39 = pub_40,
pub_40 = pub_41,
pub_41 = pub_42,
pub_42 = pub_43,
pub_43 = pub_44,
pub_44 = pub_45,
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_19 is null or pub_19 = '')
-----------------------------------
update Table_XYZ
set
pub_20 = pub_21,
pub_21 = pub_22,
pub_22 = pub_23,
pub_23 = pub_24,
pub_24 = pub_25,
pub_25 = pub_26,
pub_26 = pub_27,
pub_27 = pub_28,
pub_28 = pub_29,
pub_29 = pub_30,
pub_30 = pub_31,
pub_31 = pub_32,
pub_32 = pub_33,
pub_33 = pub_34,
pub_34 = pub_35,
pub_35 = pub_36,
pub_36 = pub_37,
pub_37 = pub_38,
pub_38 = pub_39,
pub_39 = pub_40,
pub_40 = pub_41,
pub_41 = pub_42,
pub_42 = pub_43,
pub_43 = pub_44,
pub_44 = pub_45,
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_20 is null or pub_20 = '')
-----------------------------------
update Table_XYZ
set
pub_21 = pub_22,
pub_22 = pub_23,
pub_23 = pub_24,
pub_24 = pub_25,
pub_25 = pub_26,
pub_26 = pub_27,
pub_27 = pub_28,
pub_28 = pub_29,
pub_29 = pub_30,
pub_30 = pub_31,
pub_31 = pub_32,
pub_32 = pub_33,
pub_33 = pub_34,
pub_34 = pub_35,
pub_35 = pub_36,
pub_36 = pub_37,
pub_37 = pub_38,
pub_38 = pub_39,
pub_39 = pub_40,
pub_40 = pub_41,
pub_41 = pub_42,
pub_42 = pub_43,
pub_43 = pub_44,
pub_44 = pub_45,
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_21 is null or pub_21 = '')
-----------------------------------
update Table_XYZ
set
pub_22 = pub_23,
pub_23 = pub_24,
pub_24 = pub_25,
pub_25 = pub_26,
pub_26 = pub_27,
pub_27 = pub_28,
pub_28 = pub_29,
pub_29 = pub_30,
pub_30 = pub_31,
pub_31 = pub_32,
pub_32 = pub_33,
pub_33 = pub_34,
pub_34 = pub_35,
pub_35 = pub_36,
pub_36 = pub_37,
pub_37 = pub_38,
pub_38 = pub_39,
pub_39 = pub_40,
pub_40 = pub_41,
pub_41 = pub_42,
pub_42 = pub_43,
pub_43 = pub_44,
pub_44 = pub_45,
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_22 is null or pub_22 = '')
-----------------------------------
update Table_XYZ
set
pub_23 = pub_24,
pub_24 = pub_25,
pub_25 = pub_26,
pub_26 = pub_27,
pub_27 = pub_28,
pub_28 = pub_29,
pub_29 = pub_30,
pub_30 = pub_31,
pub_31 = pub_32,
pub_32 = pub_33,
pub_33 = pub_34,
pub_34 = pub_35,
pub_35 = pub_36,
pub_36 = pub_37,
pub_37 = pub_38,
pub_38 = pub_39,
pub_39 = pub_40,
pub_40 = pub_41,
pub_41 = pub_42,
pub_42 = pub_43,
pub_43 = pub_44,
pub_44 = pub_45,
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_23 is null or pub_23 = '')
-----------------------------------
update Table_XYZ
set
pub_24 = pub_25,
pub_25 = pub_26,
pub_26 = pub_27,
pub_27 = pub_28,
pub_28 = pub_29,
pub_29 = pub_30,
pub_30 = pub_31,
pub_31 = pub_32,
pub_32 = pub_33,
pub_33 = pub_34,
pub_34 = pub_35,
pub_35 = pub_36,
pub_36 = pub_37,
pub_37 = pub_38,
pub_38 = pub_39,
pub_39 = pub_40,
pub_40 = pub_41,
pub_41 = pub_42,
pub_42 = pub_43,
pub_43 = pub_44,
pub_44 = pub_45,
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_24 is null or pub_24 = '')
-----------------------------------
update Table_XYZ
set
pub_25 = pub_26,
pub_26 = pub_27,
pub_27 = pub_28,
pub_28 = pub_29,
pub_29 = pub_30,
pub_30 = pub_31,
pub_31 = pub_32,
pub_32 = pub_33,
pub_33 = pub_34,
pub_34 = pub_35,
pub_35 = pub_36,
pub_36 = pub_37,
pub_37 = pub_38,
pub_38 = pub_39,
pub_39 = pub_40,
pub_40 = pub_41,
pub_41 = pub_42,
pub_42 = pub_43,
pub_43 = pub_44,
pub_44 = pub_45,
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_25 is null or pub_25 = '')
-----------------------------------
update Table_XYZ
set
pub_26 = pub_27,
pub_27 = pub_28,
pub_28 = pub_29,
pub_29 = pub_30,
pub_30 = pub_31,
pub_31 = pub_32,
pub_32 = pub_33,
pub_33 = pub_34,
pub_34 = pub_35,
pub_35 = pub_36,
pub_36 = pub_37,
pub_37 = pub_38,
pub_38 = pub_39,
pub_39 = pub_40,
pub_40 = pub_41,
pub_41 = pub_42,
pub_42 = pub_43,
pub_43 = pub_44,
pub_44 = pub_45,
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_26 is null or pub_26 = '')
-----------------------------------
update Table_XYZ
set
pub_27 = pub_28,
pub_28 = pub_29,
pub_29 = pub_30,
pub_30 = pub_31,
pub_31 = pub_32,
pub_32 = pub_33,
pub_33 = pub_34,
pub_34 = pub_35,
pub_35 = pub_36,
pub_36 = pub_37,
pub_37 = pub_38,
pub_38 = pub_39,
pub_39 = pub_40,
pub_40 = pub_41,
pub_41 = pub_42,
pub_42 = pub_43,
pub_43 = pub_44,
pub_44 = pub_45,
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_27 is null or pub_27 = '')
-----------------------------------
update Table_XYZ
set
pub_28 = pub_29,
pub_29 = pub_30,
pub_30 = pub_31,
pub_31 = pub_32,
pub_32 = pub_33,
pub_33 = pub_34,
pub_34 = pub_35,
pub_35 = pub_36,
pub_36 = pub_37,
pub_37 = pub_38,
pub_38 = pub_39,
pub_39 = pub_40,
pub_40 = pub_41,
pub_41 = pub_42,
pub_42 = pub_43,
pub_43 = pub_44,
pub_44 = pub_45,
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_28 is null or pub_28 = '')
-----------------------------------
update Table_XYZ
set
pub_29 = pub_30,
pub_30 = pub_31,
pub_31 = pub_32,
pub_32 = pub_33,
pub_33 = pub_34,
pub_34 = pub_35,
pub_35 = pub_36,
pub_36 = pub_37,
pub_37 = pub_38,
pub_38 = pub_39,
pub_39 = pub_40,
pub_40 = pub_41,
pub_41 = pub_42,
pub_42 = pub_43,
pub_43 = pub_44,
pub_44 = pub_45,
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_29 is null or pub_29 = '')
-----------------------------------
update Table_XYZ
set
pub_30 = pub_31,
pub_31 = pub_32,
pub_32 = pub_33,
pub_33 = pub_34,
pub_34 = pub_35,
pub_35 = pub_36,
pub_36 = pub_37,
pub_37 = pub_38,
pub_38 = pub_39,
pub_39 = pub_40,
pub_40 = pub_41,
pub_41 = pub_42,
pub_42 = pub_43,
pub_43 = pub_44,
pub_44 = pub_45,
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_30 is null or pub_30 = '')
-----------------------------------
update Table_XYZ
set
pub_31 = pub_32,
pub_32 = pub_33,
pub_33 = pub_34,
pub_34 = pub_35,
pub_35 = pub_36,
pub_36 = pub_37,
pub_37 = pub_38,
pub_38 = pub_39,
pub_39 = pub_40,
pub_40 = pub_41,
pub_41 = pub_42,
pub_42 = pub_43,
pub_43 = pub_44,
pub_44 = pub_45,
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_31 is null or pub_31 = '')
-----------------------------------
update Table_XYZ
set
pub_32 = pub_33,
pub_33 = pub_34,
pub_34 = pub_35,
pub_35 = pub_36,
pub_36 = pub_37,
pub_37 = pub_38,
pub_38 = pub_39,
pub_39 = pub_40,
pub_40 = pub_41,
pub_41 = pub_42,
pub_42 = pub_43,
pub_43 = pub_44,
pub_44 = pub_45,
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_32 is null or pub_32 = '')
-----------------------------------
update Table_XYZ
set
pub_33 = pub_34,
pub_34 = pub_35,
pub_35 = pub_36,
pub_36 = pub_37,
pub_37 = pub_38,
pub_38 = pub_39,
pub_39 = pub_40,
pub_40 = pub_41,
pub_41 = pub_42,
pub_42 = pub_43,
pub_43 = pub_44,
pub_44 = pub_45,
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,

pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_33 is null or pub_33 = '')
-----------------------------------
update Table_XYZ
set
pub_34 = pub_35,
pub_35 = pub_36,
pub_36 = pub_37,
pub_37 = pub_38,
pub_38 = pub_39,
pub_39 = pub_40,
pub_40 = pub_41,
pub_41 = pub_42,
pub_42 = pub_43,
pub_43 = pub_44,
pub_44 = pub_45,
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_34 is null or pub_34 = '')
-----------------------------------
update Table_XYZ
set
pub_35 = pub_36,
pub_36 = pub_37,
pub_37 = pub_38,
pub_38 = pub_39,
pub_39 = pub_40,
pub_40 = pub_41,
pub_41 = pub_42,
pub_42 = pub_43,
pub_43 = pub_44,
pub_44 = pub_45,
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_35 is null or pub_35 = '')
-----------------------------------
update Table_XYZ
set
pub_36 = pub_37,
pub_37 = pub_38,
pub_38 = pub_39,
pub_39 = pub_40,
pub_40 = pub_41,
pub_41 = pub_42,
pub_42 = pub_43,
pub_43 = pub_44,
pub_44 = pub_45,
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_36 is null or pub_36 = '')
-----------------------------------
update Table_XYZ
set
pub_37 = pub_38,
pub_38 = pub_39,
pub_39 = pub_40,
pub_40 = pub_41,
pub_41 = pub_42,
pub_42 = pub_43,
pub_43 = pub_44,
pub_44 = pub_45,
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_37 is null or pub_37 = '')
-----------------------------------
update Table_XYZ
set
pub_38 = pub_39,
pub_39 = pub_40,
pub_40 = pub_41,
pub_41 = pub_42,
pub_42 = pub_43,
pub_43 = pub_44,
pub_44 = pub_45,
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_38 is null or pub_38 = '')
-----------------------------------
update Table_XYZ
set
pub_39 = pub_40,
pub_40 = pub_41,
pub_41 = pub_42,
pub_42 = pub_43,
pub_43 = pub_44,
pub_44 = pub_45,
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_39 is null or pub_39 = '')
-----------------------------------
update Table_XYZ
set
pub_40 = pub_41,
pub_41 = pub_42,
pub_42 = pub_43,
pub_43 = pub_44,
pub_44 = pub_45,
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_40 is null or pub_40 = '')
-----------------------------------
update Table_XYZ
set
pub_41 = pub_42,
pub_42 = pub_43,
pub_43 = pub_44,
pub_44 = pub_45,
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_41 is null or pub_41 = '')
-----------------------------------
update Table_XYZ
set
pub_42 = pub_43,
pub_43 = pub_44,
pub_44 = pub_45,
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_42 is null or pub_42 = '')
-----------------------------------
update Table_XYZ
set
pub_43 = pub_44,
pub_44 = pub_45,
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_43 is null or pub_43 = '')
-----------------------------------
update Table_XYZ
set
pub_44 = pub_45,
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_44 is null or pub_44 = '')
-----------------------------------
update Table_XYZ
set
pub_45 = pub_46,
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_45 is null or pub_45 = '')
-----------------------------------
update Table_XYZ
set
pub_46 = pub_47,
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_46 is null or pub_46 = '')
-----------------------------------
update Table_XYZ
set
pub_47 = pub_48,
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_47 is null or pub_47 = '')
-----------------------------------
update Table_XYZ
set
pub_48 = pub_49,
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_48 is null or pub_48 = '')
-----------------------------------
update Table_XYZ
set
pub_49 = pub_50,
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_49 is null or pub_49 = '')
-----------------------------------
update Table_XYZ
set
pub_50 = pub_51,
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_50 is null or pub_50 = '')
-----------------------------------
update Table_XYZ
set
pub_51 = pub_52,
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_51 is null or pub_51 = '')
-----------------------------------
update Table_XYZ
set
pub_52 = pub_53,
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_52 is null or pub_52 = '')
-----------------------------------
update Table_XYZ
set
pub_53 = pub_54,
pub_54 = pub_55,
pub_55 = ''
where (pub_53 is null or pub_53 = '')
-----------------------------------
update Table_XYZ
set
pub_54 = pub_55,
pub_55 = ''
where (pub_54 is null or pub_54 = '')
-----------------------------------------------------------
 
Yes. Normalise this table into two tables. Then you won't have to do it at all...
 
Stevexff

How would that help me bleed out the BLANK/NULL fields?
 
Code:
+------------+      +------------+
| XYZ        |      | XYZ_item   |
+------------+      +------------+
| XYZId      |<---->| XYZid      |
| ..         |      | seq        |
+------------+      | value      |
                    +------------+
Either create 55 rows on XYZ_item with nullable values, or more sensibly, only add rows to XYZ_item that actually have values. Then you can just
Code:
SELECT * FROM XYZ a, XYZ_item b
   WHERE a.XYZId = b.XYZid
   AND a.XYZid = ?
   ORDER BY seq;
The point I was trying to make, is that the only reason you are having this problem is because your table design is not normalised. You have 55 columns on your table which should really be separate rows on another table. If you change the design, then the problem you are struggling to solve just goes away.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top